summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIru Cai <mytbk920423@gmail.com>2018-10-01 09:32:06 +0800
committerIru Cai <mytbk920423@gmail.com>2018-10-01 09:32:06 +0800
commit9e41f154fcda14dbbf2c3e5307073db2a6a3f3a1 (patch)
treebb00a00da08809caa1ebe0c053318257e42e5ff2
parent78971bbec44303681719e91c69316bea95458e5e (diff)
downloadrich4-9e41f154fcda14dbbf2c3e5307073db2a6a3f3a1.tar.xz
topbar button and ui functions
-rw-r--r--csrc/fcn_417d65.c16
-rw-r--r--csrc/main.c6
-rw-r--r--csrc/media_init.c24
3 files changed, 23 insertions, 23 deletions
diff --git a/csrc/fcn_417d65.c b/csrc/fcn_417d65.c
index e9ad643..6f634b2 100644
--- a/csrc/fcn_417d65.c
+++ b/csrc/fcn_417d65.c
@@ -9,7 +9,7 @@ void fcn_00419703()
fcn_00417191(0);
}
-void fcn_00417d65(int v)
+void topbar_btn(int v)
{
int res;
@@ -20,25 +20,25 @@ void fcn_00417d65(int v)
switch (v) {
case 0:
- fcn_0044eb39(20, 60);
+ help_ui(20, 60);
break;
case 1:
- fcn_00411b53(1);
+ options_ui(1);
break;
case 2:
hosted_ai_ui();
break;
case 3:
- res = process_checkpoint(1);
+ res = load_ui(1);
break;
case 4:
- fcn_00404165();
+ save_ui();
break;
case 5:
- fcn_0040a9bd();
+ map_ui();
break;
case 6:
- fcn_00424492();
+ query_user_ui();
break;
case 7:
tools_ui();
@@ -47,7 +47,7 @@ void fcn_00417d65(int v)
cards_ui();
break;
case 9:
- player_info_stock_ui();
+ sales_ui();
break;
case 10:
stock_ui(0);
diff --git a/csrc/main.c b/csrc/main.c
index 7132ed1..3cee0c7 100644
--- a/csrc/main.c
+++ b/csrc/main.c
@@ -155,7 +155,7 @@ LRESULT CALLBACK entryCallback(HWND hWnd, UINT message, WPARAM wParam, LPARAM lP
switch (dw_48a184) {
case 1:
fcn.00402460(0);
- eax = process_checkpoint(0);
+ eax = load_ui(0);
if (eax != -1) {
Post_0402_Message(dw_48a184);
break;
@@ -169,7 +169,7 @@ LRESULT CALLBACK entryCallback(HWND hWnd, UINT message, WPARAM wParam, LPARAM lP
case 2:
fcn.00402460(0);
sub.WINMM.dll_mciSendStringA_acb();
- fcn.00411b53(0);
+ options_ui(0);
sub.WINMM.dll_mciSendStringA_9cf(0);
IDirectDrawSurface_Lock(pddrawsf2, NULL, &sfdesc1, 1, 0);
fcn.004563f5(sfdesc1.lpSurface, dw_48a180 + 12, 0, 0);
@@ -347,7 +347,7 @@ start_msg_loop:
fcn_004075c1();
goto case_401de8_0;
case 3:
- if (process_checkpoint(0) == -1)
+ if (load_ui(0) == -1)
goto case_401de8_0;
goto switch_401cb8_case_1;
default:
diff --git a/csrc/media_init.c b/csrc/media_init.c
index 52479f0..627dbc0 100644
--- a/csrc/media_init.c
+++ b/csrc/media_init.c
@@ -270,33 +270,33 @@ L401306:
/* hotkey 497180 */
k = R4_KEY(global_rich4_cfg.hotkeys[12]); /* stock */
if (modded_key == k) {
- fcn_00417d65(10);
+ topbar_btn(10);
goto L401523;
}
/* hotkey 497182 */
- k = R4_KEY(global_rich4_cfg.hotkeys[13]); /* trade */
+ k = R4_KEY(global_rich4_cfg.hotkeys[13]); /* sales */
if (modded_key == k) {
- fcn_00417d65(9);
+ topbar_btn(9);
goto L401523;
}
k = R4_KEY(global_rich4_cfg.hotkeys[14]); /* card */
if (modded_key == k) {
- fcn_00417d65(8);
+ topbar_btn(8);
goto L401523;
}
k = R4_KEY(global_rich4_cfg.hotkeys[15]); /* tool */
if (modded_key == k) {
- fcn_00417d65(7);
+ topbar_btn(7);
goto L401523;
}
k = R4_KEY(global_rich4_cfg.hotkeys[16]); /* query */
if (modded_key == k) {
- fcn_00417d65(6);
+ topbar_btn(6);
goto L401523;
}
k = R4_KEY(global_rich4_cfg.hotkeys[17]); /* map */
if (modded_key == k) {
- fcn_00417d65(5);
+ topbar_btn(5);
goto L401523;
}
/* hotkey 40718c */
@@ -322,28 +322,28 @@ L401306:
/* hotkey 407190 */
k = R4_KEY(global_rich4_cfg.hotkeys[20]); /* hosted AI */
if (modded_key == k) {
- fcn_00417d65(2);
+ topbar_btn(2);
goto L401523;
}
k = R4_KEY(global_rich4_cfg.hotkeys[21]); /* system */
if (modded_key == k) {
- fcn_00417d65(1);
+ topbar_btn(1);
goto L401523;
}
k = R4_KEY(global_rich4_cfg.hotkeys[22]); /* save */
if (modded_key == k) {
- fcn_00417d65(4);
+ topbar_btn(4);
goto L401523;
}
k = R4_KEY(global_rich4_cfg.hotkeys[23]); /* load */
if (modded_key == k) {
- fcn_00417d65(3);
+ topbar_btn(3);
goto L401523;
}
/* hotkey 497198 */
k = R4_KEY(global_rich4_cfg.hotkeys[24]);
if (modded_key == k) {
- fcn_00417d65(0);
+ topbar_btn(0);
goto L401523;
}
k = R4_KEY(global_rich4_cfg.hotkeys[27]);