From da8289ed3ee43f5d239e285439bb7791c11d3b91 Mon Sep 17 00:00:00 2001 From: Iru Cai Date: Tue, 2 Oct 2018 11:24:02 +0800 Subject: fullscreen_overlay @ 0x456418 --- csrc/drawing.c | 12 +++++++----- csrc/main.c | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/csrc/drawing.c b/csrc/drawing.c index 5389058..eca1431 100644 --- a/csrc/drawing.c +++ b/csrc/drawing.c @@ -168,9 +168,11 @@ void graph_st_overlay(struct graph_st * a0, struct graph_st * a1, int xpos, int graph_overlay(a0->width, a0->height, a0->gdata, a1, xpos, ypos, 0); } -void fcn_456418(uint16_t *a0, struct graph_st *a1, int a2, int a3) +/* put graph a1 over fullscreen sized (640*480) pixel image a0 + * and make a1 centered on (xpos, ypos) of graph a0 */ +void fullscreen_overlay(uint16_t *a0, struct graph_st *a1, int xpos, int ypos) { - graph_overlay(640, 480, a0, a1, a2, a3, 0); + graph_overlay(640, 480, a0, a1, xpos, ypos, 0); } void fcn_417191(int a0) @@ -305,13 +307,13 @@ void player_say(int p, int t, const char *s) IDirectDrawSurface_Lock(pddrawsf2, NULL, &sfdesc1, 1, 0); st_46caec.f8 = sfdesc1.lpSurface; struct graph_st * edi = crop_graph(&st_46caec, NULL, 0, 40, 440, 220); - fcn_456418(sfdesc1.lpSurface, dw_48bad8+0x54, 220, 130); + fullscreen_overlay(sfdesc1.lpSurface, dw_48bad8+0x54, 220, 130); ecx = dword [p * 0x34 + 0x498eb0]; edx = t + 1; eax = edx * 12; ecx += 12; eax += ecx; - fcn_456418(sfdesc1.lpSurface, eax, 170, 130); + fullscreen_overlay(sfdesc1.lpSurface, eax, 170, 130); if (s != NULL) { if (s[0] == '#') { @@ -324,7 +326,7 @@ void player_say(int p, int t, const char *s) eax = (s2[1] - '0') * 10 + (s2[2] - '0'); edx = (eax - 1) * 12; eax = dw_48bad4 + 12 + edx; - fcn_456418(sfdesc1.lpSurface, eax, 240, 130); + fullscreen_overlay(sfdesc1.lpSurface, eax, 240, 130); if (esi == 5) { eax = (s[1] - '0') * 1000 + (s[2] - '0') * 100 + (s[3] - '0') * 10 + (s[4] - '0'); fcn.0045441a(eax); diff --git a/csrc/main.c b/csrc/main.c index 3ccacf9..0e3db43 100644 --- a/csrc/main.c +++ b/csrc/main.c @@ -123,7 +123,7 @@ LRESULT CALLBACK entryCallback(HWND hWnd, UINT message, WPARAM wParam, LPARAM lP break; dw_48a184 = i; IDirectDrawSurface_Lock(pddrawsf2, NULL, &sfdesc1, 1, 0); - fcn_456418(sfdesc1.lpSurface, data1 + 12 + edi, mpos[i].x, mpos[i].y); + fullscreen_overlay(sfdesc1.lpSurface, data1 + 12 + edi, mpos[i].x, mpos[i].y); IDirectDrawSurface_Unlock(pddrawsf2, NULL); InvalidateRect(hWnd, &r0, FALSE); fcn_4542ce(0x48231a, 0); -- cgit v1.2.3