summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIru Cai <mytbk920423@gmail.com>2018-10-02 11:20:11 +0800
committerIru Cai <mytbk920423@gmail.com>2018-10-02 11:20:11 +0800
commitb251daf8111445cb37abe5e238019fd12e6d36f9 (patch)
treee0f5609cacb5ef57c647f803b8aebdcd6b3c4ba7
parent521394f94ab4789df32fc92b5af69249de36708d (diff)
downloadrich4-b251daf8111445cb37abe5e238019fd12e6d36f9.tar.xz
graph_st_overlay @ 0x4562a5
-rw-r--r--csrc/drawing.c19
-rw-r--r--csrc/main.c2
-rw-r--r--csrc/tools_ui.c2
3 files changed, 12 insertions, 11 deletions
diff --git a/csrc/drawing.c b/csrc/drawing.c
index a4be5a1..5389058 100644
--- a/csrc/drawing.c
+++ b/csrc/drawing.c
@@ -162,9 +162,10 @@ int graph_overlay(uint32_t width, uint32_t height, uint16_t *pix, struct graph_s
return 0;
}
-void fcn_4562a5(struct graph_st * a0, struct graph_st * a1, int a2, int a3)
+/* put graph a1 over a0 and make a1 centered on (xpos, ypos) of graph a0 */
+void graph_st_overlay(struct graph_st * a0, struct graph_st * a1, int xpos, int ypos)
{
- graph_overlay(a0->width, a0->height, a0->gdata, a1, a2, a3, 0);
+ 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)
@@ -209,16 +210,16 @@ void fcn_417191(int a0)
edx = dw_48bdd4 + ebx;
edx = edx * 12 + dw_48be04 + 12;
- fcn_4562a5(&st_46caec, edx, dw_475284, dw_475288);
+ graph_st_overlay(&st_46caec, edx, dw_475284, dw_475288);
eax = players[current_player].traffic_method & 3;
switch (eax) {
case 0:
eax = dw_475288 + 0x1a;
if (players[current_player].days_stopping == 0) {
- fcn_4562a5(&st_46caec, dw_48be04+0x60, dw_475284+7, eax);
+ graph_st_overlay(&st_46caec, dw_48be04+0x60, dw_475284+7, eax);
} else {
- fcn_4562a5(&st_46caec, dw_48be04+0x54, dw_475284+8, eax);
+ graph_st_overlay(&st_46caec, dw_48be04+0x54, dw_475284+8, eax);
}
break;
case 1:
@@ -228,11 +229,11 @@ void fcn_417191(int a0)
eax_1 = ebx * 19 + dw_475288 + 0x10;
edx = (ebx * 2 + 7) * 12;
eax_2 = dw_48be04 + 0xc + edx;
- fcn_4562a5(&st_46caec, eax_2, dw_475284 + 7, eax_1);
+ graph_st_overlay(&st_46caec, eax_2, dw_475284 + 7, eax_1);
} else {
eax_1 = ebx*19 + dw_475288 + 0x10;
eax_2 = (ebx * 2 + 6) * 12 + dw_48be04 + 0xc;
- fcn_4562a5(&st_46caec, eax_2, dw_475284 + 8, eax_1);
+ graph_st_overlay(&st_46caec, eax_2, dw_475284 + 8, eax_1);
}
}
break;
@@ -243,12 +244,12 @@ void fcn_417191(int a0)
a4 = ebx * 16 + dw_475288 + 9;
a3 = dw_475284 + 7;
a2 = (ebx * 2 + 7) * 12 + dw_48be04 + 0xc;
- fcn_4562a5(&st_46caec, a2, a3, a4);
+ graph_st_overlay(&st_46caec, a2, a3, a4);
} else {
a4 = ebx * 16 + dw_475288 + 9;
a3 = dw_475284 + 8;
a2 = (ebx * 2 + 6) * 12 + dw_48be04 + 0xc;
- fcn_4562a5(&st_46caec, a2, a3, a4);
+ graph_st_overlay(&st_46caec, a2, a3, a4);
}
}
break;
diff --git a/csrc/main.c b/csrc/main.c
index d11896a..3ccacf9 100644
--- a/csrc/main.c
+++ b/csrc/main.c
@@ -217,7 +217,7 @@ int fcn_004029fd()
data1 = (struct spr_smp*)read_mkf(mkf_data, 1, NULL, NULL);
for (int i = 0; i < 5; i++) {
- fcn_4562a5(&data1->chunk_tab[0], &data1->chunk_tab[i * 2 + 1],
+ graph_st_overlay(&data1->chunk_tab[0], &data1->chunk_tab[i * 2 + 1],
mpos[i].x, mpos[i].y);
}
diff --git a/csrc/tools_ui.c b/csrc/tools_ui.c
index 534f43c..f42778c 100644
--- a/csrc/tools_ui.c
+++ b/csrc/tools_ui.c
@@ -34,7 +34,7 @@ void fcn_447c6e(struct graph_st *a1, struct graph_st *a2, int player)
size_t idx = player * 15 + i;
if (tool_amount[idx] == 0)
continue;
- fcn_4562a5(a1, ((void*)(a2->data)) + (i+2)*12, t - 16, k);
+ graph_st_overlay(a1, ((void*)(a2->data)) + (i+2)*12, t - 16, k);
sprintf(str, str_cross_sym, (int)tool_amount[idx]);
draw_some_text(a1, str, t + 34, k - 10, 1);
tab_48c548[j] = i + 1;