From 60b9d386cff83657dfc6d8247f9bb95a27ef669b Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Wed, 18 Mar 2020 22:51:42 +1000 Subject: [PATCH] Decompile mpMenuTextAward1 --- src/game/data/data_020df0.c | 2 +- src/game/game_177e00.c | 26 ++++---------------------- src/include/game/game_177e00.h | 2 +- src/include/types.h | 2 +- 4 files changed, 7 insertions(+), 25 deletions(-) diff --git a/src/game/data/data_020df0.c b/src/game/data/data_020df0.c index 12ae4f97d..78319da96 100644 --- a/src/game/data/data_020df0.c +++ b/src/game/data/data_020df0.c @@ -10232,7 +10232,7 @@ struct menu_item menuitems_2a950[] = { { MENUITEMTYPE_LABEL, 0, 0x00000120, (u32)&mpMenuTextWeaponOfChoiceName, 0x00000000, NULL }, { MENUITEMTYPE_SEPARATOR, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, { MENUITEMTYPE_LABEL, 0, 0x00200210, L_MPMENU(263), 0x00000000, menuhandler001786d8 }, // "Awards:" - { MENUITEMTYPE_LABEL, 0, 0x00000120, (u32)&func0f1784a4, 0x00000000, NULL }, + { MENUITEMTYPE_LABEL, 0, 0x00000120, (u32)&mpMenuTextAward1, 0x00000000, NULL }, { MENUITEMTYPE_LABEL, 0, 0x00000120, (u32)&func0f1784f0, 0x00000000, NULL }, { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; diff --git a/src/game/game_177e00.c b/src/game/game_177e00.c index 5c51722d1..2a108caec 100644 --- a/src/game/game_177e00.c +++ b/src/game/game_177e00.c @@ -326,28 +326,10 @@ char *mpMenuTextWeaponOfChoiceName(struct menu_item *item) return mpPlayerGetWeaponOfChoiceName(g_MenuStack[g_MpPlayerNum].playernum, 0); } -GLOBAL_ASM( -glabel func0f1784a4 -/* f1784a4: 3c0e8007 */ lui $t6,%hi(g_MpPlayerNum) -/* f1784a8: 8dce1448 */ lw $t6,%lo(g_MpPlayerNum)($t6) -/* f1784ac: 3c18800a */ lui $t8,%hi(g_MenuStack+0x83b) -/* f1784b0: 3c08800a */ lui $t0,%hi(g_Vars+0x64) -/* f1784b4: 000e78c0 */ sll $t7,$t6,0x3 -/* f1784b8: 01ee7823 */ subu $t7,$t7,$t6 -/* f1784bc: 000f7880 */ sll $t7,$t7,0x2 -/* f1784c0: 01ee7821 */ addu $t7,$t7,$t6 -/* f1784c4: 000f78c0 */ sll $t7,$t7,0x3 -/* f1784c8: 01ee7823 */ subu $t7,$t7,$t6 -/* f1784cc: 000f7900 */ sll $t7,$t7,0x4 -/* f1784d0: 030fc021 */ addu $t8,$t8,$t7 -/* f1784d4: 9318e83b */ lbu $t8,%lo(g_MenuStack+0x83b)($t8) -/* f1784d8: afa40000 */ sw $a0,0x0($sp) -/* f1784dc: 0018c880 */ sll $t9,$t8,0x2 -/* f1784e0: 01194021 */ addu $t0,$t0,$t9 -/* f1784e4: 8d08a024 */ lw $t0,%lo(g_Vars+0x64)($t0) -/* f1784e8: 03e00008 */ jr $ra -/* f1784ec: 8d021974 */ lw $v0,0x1974($t0) -); +char *mpMenuTextAward1(struct menu_item *item) +{ + return g_Vars.players[g_MenuStack[g_MpPlayerNum].playernum]->award1; +} GLOBAL_ASM( glabel func0f1784f0 diff --git a/src/include/game/game_177e00.h b/src/include/game/game_177e00.h index db9e6fd84..de6fdf7b7 100644 --- a/src/include/game/game_177e00.h +++ b/src/include/game/game_177e00.h @@ -10,7 +10,7 @@ char *menutextMatchTime(s32 arg0); char *mpMenuTextWeaponDescription(struct menu_item *item); u32 func0f1783a0(void); char *mpMenuTextWeaponOfChoiceName(struct menu_item *item); -u32 func0f1784a4(void); +char *mpMenuTextAward1(struct menu_item *item); u32 func0f1784f0(void); u32 func0f17853c(void); s32 menuhandler001785c4(u32, u32, u32 *); diff --git a/src/include/types.h b/src/include/types.h index 0070abe19..5926171be 100644 --- a/src/include/types.h +++ b/src/include/types.h @@ -2668,7 +2668,7 @@ struct player { /*0x1968*/ f32 guncloseroffset; /*0x196c*/ u32 shootrotx; /*0x1970*/ u32 shootroty; - /*0x1974*/ u32 unk1974; + /*0x1974*/ char *award1; /*0x1978*/ u32 unk1978; /*0x197c*/ u32 unk197c; /*0x1980*/ u32 unk1980;