summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIru Cai <mytbk920423@gmail.com>2018-10-02 11:24:02 +0800
committerIru Cai <mytbk920423@gmail.com>2018-10-02 11:24:38 +0800
commitda8289ed3ee43f5d239e285439bb7791c11d3b91 (patch)
tree8d47b43c03d9f3d705c52fca2fa5331ea2dfe227
parentb251daf8111445cb37abe5e238019fd12e6d36f9 (diff)
downloadrich4-da8289ed3ee43f5d239e285439bb7791c11d3b91.tar.xz
fullscreen_overlay @ 0x456418
-rw-r--r--csrc/drawing.c12
-rw-r--r--csrc/main.c2
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);