summaryrefslogtreecommitdiff
path: root/csrc
diff options
context:
space:
mode:
authorIru Cai <mytbk920423@gmail.com>2018-09-01 14:54:50 +0800
committerIru Cai <mytbk920423@gmail.com>2018-09-01 14:54:50 +0800
commit4db2469e205b33ecfdfa05467ecfa302970e0d88 (patch)
tree349b82eb334e4e8b7b8b2d4d286fb36ce2d344f5 /csrc
parent11139c47674d3b8ae63cead2ce1bce3fe6da4cd3 (diff)
downloadrich4-4db2469e205b33ecfdfa05467ecfa302970e0d88.tar.xz
0x48a010 -> windowCallbacks
Diffstat (limited to 'csrc')
-rw-r--r--csrc/global.h2
-rw-r--r--csrc/main.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/csrc/global.h b/csrc/global.h
index eb5e703..a076f44 100644
--- a/csrc/global.h
+++ b/csrc/global.h
@@ -20,3 +20,5 @@ char * read_mkf(int mkf_idx, int a1, char *buf, int *bufsize);
extern HINSTANCE ghInstance; // 48a064
extern HWND gwindowHandle; // 48a0d4
extern RECT g_rect; /* struct tagRECT { left, top, right, bottom } @ 0x46cadc */
+typedef LRESULT (CALLBACK *wProc)(HWND, UINT, WPARAM, LPARAM);
+extern wProc windowCallbacks[100]; // 48a010
diff --git a/csrc/main.c b/csrc/main.c
index 4c1ef62..04f30b5 100644
--- a/csrc/main.c
+++ b/csrc/main.c
@@ -7,7 +7,7 @@ RECT g_rect;
Surface **sf1;
char mid_status[7]; // 0x46cb00
-uint32_t windowCallbacks[100]; // 48a010
+wProc windowCallbacks[100]; // 48a010
LRESULT CALLBACK windowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
@@ -76,10 +76,10 @@ LRESULT CALLBACK windowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPara
return 0;
L4:
ebx = dw_46cad8 << 2;
- if (dw_48a010[ebx] == 0)
+ if (windowCallbacks[ebx] == 0)
return DefWindowProcA(hWnd, message, wParam, lParam);
edi = lParam;
- return (dw_48a010[ebx](hWnd, message, wParam, lParam));
+ return (windowCallbacks[ebx](hWnd, message, wParam, lParam));
}
int WINAPI WinMain(HINSTANCE hInstance,