diff options
author | Iru Cai <mytbk920423@gmail.com> | 2018-10-04 17:20:19 +0800 |
---|---|---|
committer | Iru Cai <mytbk920423@gmail.com> | 2018-10-04 17:20:19 +0800 |
commit | 287472628b86043c3fffef88b02b6002c5e6d8a5 (patch) | |
tree | bd01a44374ab4d91f0b4a3fae36bde6968b4d932 /csrc/fcn_4021f8.c | |
parent | 14a900f2088b3b8b073ebee910f4c2ad7872e209 (diff) | |
download | rich4-287472628b86043c3fffef88b02b6002c5e6d8a5.tar.xz |
set_cursor_icon
Diffstat (limited to 'csrc/fcn_4021f8.c')
-rw-r--r-- | csrc/fcn_4021f8.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/csrc/fcn_4021f8.c b/csrc/fcn_4021f8.c index 9ffcc95..f5b81bf 100644 --- a/csrc/fcn_4021f8.c +++ b/csrc/fcn_4021f8.c @@ -4,10 +4,13 @@ */ #include <windows.h> +#include "mkf/mkf.h" -void fcn_004021f8(int a1, int a2, int a3) +struct graph_st *current_cursors; // 0x48a0f4 + +void set_cursor_icon(int data0_idx, int a2, int a3) { - dw_48a0f4 = &data0->chunk_tab[a1]; + current_cursors = &data0->chunk_tab[data0_idx]; w_48a170 = a2; w_48a174 = a3; w_48a172 = w_48a176 = 0; @@ -46,7 +49,7 @@ void GetCursorPos_35d(RECT *rect) GetCursorPos(&p); if (rect != NULL) { - eax = w_48a172 * 12 + dw_48a0f4; + eax = ¤t_cursors[w_48a172]; edx = *(int16_t*)(eax + 4); /* sign extend */ edx = p.x - edx; eax = *(int16_t*)(eax + 6); @@ -93,7 +96,7 @@ void GetCursorPos_250(RECT *rect) GetCursorPos(&p); if (rect != NULL) { - eax = w_48a172 * 12 + dw_48a0f4; + eax = ¤t_cursors[w_48a172]; edx = *(int16_t*)(eax + 4); /* sign extend */ edx = p.x - edx; eax = *(int16_t*)(eax + 6); |