summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIru Cai <mytbk920423@gmail.com>2018-08-20 10:30:29 +0800
committerIru Cai <mytbk920423@gmail.com>2018-08-20 10:51:56 +0800
commitcc131b99f9fee8754977bc4c003dcfb7f37f7169 (patch)
tree6dd6a001b6d88f5afa900a1ec7125fe5c4d2be3e
parente48d39e9734c1947bdaf5971b4a413d60a7de929 (diff)
downloadrich4-cc131b99f9fee8754977bc4c003dcfb7f37f7169.tar.xz
put the global data in global.h
and complete the type of gwindowhandle, g_rect
-rw-r--r--csrc/global.h22
-rw-r--r--csrc/main.c6
-rw-r--r--csrc/media_init.c2
3 files changed, 27 insertions, 3 deletions
diff --git a/csrc/global.h b/csrc/global.h
new file mode 100644
index 0000000..eb5e703
--- /dev/null
+++ b/csrc/global.h
@@ -0,0 +1,22 @@
+#include <windows.h>
+
+/* media_init.c */
+extern IDirectDraw *pddraw; // 0x0048a0d8
+
+extern DDSURFACEDESC sfdesc1; // 0x0048a068
+extern IDirectDrawSurface *pddrawsf1; // 0x0048a0dc
+extern IDirectDrawSurface *pddrawsf2; // 0x0048a0e0
+
+extern int mkf_data; // 0x48a0e4
+extern int mkf_speaking; // 0x48a054
+extern int mkf_panel; // 0x48a05c
+extern int mkf_effect; // 0x48a058
+
+extern HHOOK ghook; // 0x48a050
+
+char * read_mkf(int mkf_idx, int a1, char *buf, int *bufsize);
+
+/* main.c */
+extern HINSTANCE ghInstance; // 48a064
+extern HWND gwindowHandle; // 48a0d4
+extern RECT g_rect; /* struct tagRECT { left, top, right, bottom } @ 0x46cadc */
diff --git a/csrc/main.c b/csrc/main.c
index e85f7ac..e0eb664 100644
--- a/csrc/main.c
+++ b/csrc/main.c
@@ -1,8 +1,8 @@
#include <windows.h>
HINSTANCE ghInstance; // 48a064
-gwindowHandle; // 48a0d4
-uint32_t dw_46cadc;
+HWND gwindowHandle; // 48a0d4
+RECT g_rect;
Surface **sf1;
@@ -113,7 +113,7 @@ int WINAPI WinMain(HINSTANCE hInstance,
}
ShowWindow(gwindowHandle, SW_SHOW);
UpdateWindow(gwindowHandle);
- play_avi("START.AVI", &dw_46cadc, 1);
+ play_avi("START.AVI", &g_rect, 1);
case_401de8_0:
w_4991b6 = 0;
w_4991b8 = 0;
diff --git a/csrc/media_init.c b/csrc/media_init.c
index 0c893c4..724523d 100644
--- a/csrc/media_init.c
+++ b/csrc/media_init.c
@@ -1,3 +1,5 @@
+#include "global.h"
+
IDirectDraw *pddraw; // 0x0048a0d8
DDSURFACEDESC sfdesc1; // 0x0048a068