diff options
author | Ash Wolf <ninji@wuffs.org> | 2023-07-01 23:04:04 +0100 |
---|---|---|
committer | Ash Wolf <ninji@wuffs.org> | 2023-07-01 23:04:04 +0100 |
commit | c2efba6907fab934a04959b9bb644cf7141cc955 (patch) | |
tree | c047244f99870e44a7a5d7e733c2857434c03765 /src/T2DLL/T2Message.cpp | |
parent | 1eb8da84d77d0c865623421069ec38bfc7b0d461 (diff) | |
download | t2win-c2efba6907fab934a04959b9bb644cf7141cc955.tar.gz t2win-c2efba6907fab934a04959b9bb644cf7141cc955.zip |
matched T2DLL as well as i can
Diffstat (limited to '')
-rw-r--r-- | src/T2DLL/T2Message.cpp | 41 |
1 files changed, 23 insertions, 18 deletions
diff --git a/src/T2DLL/T2Message.cpp b/src/T2DLL/T2Message.cpp index f8cf66f..15876af 100644 --- a/src/T2DLL/T2Message.cpp +++ b/src/T2DLL/T2Message.cpp @@ -7,16 +7,17 @@ static char THIS_FILE[] = __FILE__; #endif -static BOOL s100E3E08; - // unknown name - 100E3E0C static BOOL sVisible; +static BOOL s100E3E08; + T2Message::T2Message() { } void T2Message::ShowMessage(const CString& str) { if (!sVisible) { +#pragma var_order(rect, bmi, pixels, brushResult, y, pattern, cols, buffer, x) sVisible = true; s100E3E08 = true; @@ -44,26 +45,27 @@ void T2Message::ShowMessage(const CString& str) { cols[1].rgbBlue = 0; unsigned char *pixels = ((unsigned char *) buffer) + sizeof(BITMAPINFOHEADER) + sizeof(RGBQUAD) * 2; - unsigned char row[8]; - row[0] = 1; - row[1] = 1; - row[2] = 1; - row[3] = 1; - row[4] = 0; - row[5] = 0; - row[6] = 0; - row[7] = 0; - - for (int y = 0; y < 8; y++) { - for (int x = 0; x < 8; x++) { - pixels[x + y * 8] = row[(x + y) % 8]; + unsigned char pattern[8]; + pattern[0] = 1; + pattern[1] = 1; + pattern[2] = 1; + pattern[3] = 1; + pattern[4] = 0; + pattern[5] = 0; + pattern[6] = 0; + pattern[7] = 0; + + int x, y; + for (y = 0; y < 8; y++) { + for (x = 0; x < 8; x++) { + pixels[x + y * 8] = pattern[(x + y) % 8]; } } - int result = mBrush.CreateDIBPatternBrush((const void *) buffer, DIB_RGB_COLORS); + BOOL brushResult = mBrush.CreateDIBPatternBrush((const void *) buffer, DIB_RGB_COLORS); free(buffer); #line 64 - _ASSERT(result != 0); + _ASSERT(brushResult != false); mString = AfxRegisterWndClass(CS_VREDRAW | CS_HREDRAW | CS_NOCLOSE, NULL, (HBRUSH) GetStockObject(WHITE_BRUSH)); @@ -103,6 +105,7 @@ int T2Message::OnCreate(CREATESTRUCT* cs) { if (CWnd::OnCreate(cs) == -1) return -1; +#pragma var_order(desktopRect, save, str, cursorPos, clientRect, dc) CString str; GetWindowText(str); @@ -229,7 +232,8 @@ void T2Message::OnDestroy() { KillTimer(1); } -int T2Message::OnEraseBkgnd(CDC* dc) { +BOOL T2Message::OnEraseBkgnd(CDC* dc) { +#pragma var_order(rect2, brush, pen, save, rect1, brush2) CRect rect1; GetClientRect(rect1); @@ -282,6 +286,7 @@ int T2Message::OnEraseBkgnd(CDC* dc) { dc->SetBkMode(TRANSPARENT); dc->SelectObject(mFont); +#pragma var_order(textRect, str) CString str; GetWindowText(str); |