From 37b42dd07168b0d4b532e1bb21b3c8ffc6078260 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Wed, 18 Mar 2020 22:52:34 +1000 Subject: [PATCH] Decompile mpMenuTextAward2 --- 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 78319da96..1c5c73c21 100644 --- a/src/game/data/data_020df0.c +++ b/src/game/data/data_020df0.c @@ -10233,7 +10233,7 @@ struct menu_item menuitems_2a950[] = { { MENUITEMTYPE_SEPARATOR, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, { MENUITEMTYPE_LABEL, 0, 0x00200210, L_MPMENU(263), 0x00000000, menuhandler001786d8 }, // "Awards:" { MENUITEMTYPE_LABEL, 0, 0x00000120, (u32)&mpMenuTextAward1, 0x00000000, NULL }, - { MENUITEMTYPE_LABEL, 0, 0x00000120, (u32)&func0f1784f0, 0x00000000, NULL }, + { MENUITEMTYPE_LABEL, 0, 0x00000120, (u32)&mpMenuTextAward2, 0x00000000, NULL }, { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; diff --git a/src/game/game_177e00.c b/src/game/game_177e00.c index 2a108caec..11ccfe23f 100644 --- a/src/game/game_177e00.c +++ b/src/game/game_177e00.c @@ -331,28 +331,10 @@ char *mpMenuTextAward1(struct menu_item *item) return g_Vars.players[g_MenuStack[g_MpPlayerNum].playernum]->award1; } -GLOBAL_ASM( -glabel func0f1784f0 -/* f1784f0: 3c0e8007 */ lui $t6,%hi(g_MpPlayerNum) -/* f1784f4: 8dce1448 */ lw $t6,%lo(g_MpPlayerNum)($t6) -/* f1784f8: 3c18800a */ lui $t8,%hi(g_MenuStack+0x83b) -/* f1784fc: 3c08800a */ lui $t0,%hi(g_Vars+0x64) -/* f178500: 000e78c0 */ sll $t7,$t6,0x3 -/* f178504: 01ee7823 */ subu $t7,$t7,$t6 -/* f178508: 000f7880 */ sll $t7,$t7,0x2 -/* f17850c: 01ee7821 */ addu $t7,$t7,$t6 -/* f178510: 000f78c0 */ sll $t7,$t7,0x3 -/* f178514: 01ee7823 */ subu $t7,$t7,$t6 -/* f178518: 000f7900 */ sll $t7,$t7,0x4 -/* f17851c: 030fc021 */ addu $t8,$t8,$t7 -/* f178520: 9318e83b */ lbu $t8,%lo(g_MenuStack+0x83b)($t8) -/* f178524: afa40000 */ sw $a0,0x0($sp) -/* f178528: 0018c880 */ sll $t9,$t8,0x2 -/* f17852c: 01194021 */ addu $t0,$t0,$t9 -/* f178530: 8d08a024 */ lw $t0,%lo(g_Vars+0x64)($t0) -/* f178534: 03e00008 */ jr $ra -/* f178538: 8d021978 */ lw $v0,0x1978($t0) -); +char *mpMenuTextAward2(struct menu_item *item) +{ + return g_Vars.players[g_MenuStack[g_MpPlayerNum].playernum]->award2; +} GLOBAL_ASM( glabel func0f17853c diff --git a/src/include/game/game_177e00.h b/src/include/game/game_177e00.h index de6fdf7b7..1b0f439ae 100644 --- a/src/include/game/game_177e00.h +++ b/src/include/game/game_177e00.h @@ -11,7 +11,7 @@ char *mpMenuTextWeaponDescription(struct menu_item *item); u32 func0f1783a0(void); char *mpMenuTextWeaponOfChoiceName(struct menu_item *item); char *mpMenuTextAward1(struct menu_item *item); -u32 func0f1784f0(void); +char *mpMenuTextAward2(struct menu_item *item); u32 func0f17853c(void); s32 menuhandler001785c4(u32, u32, u32 *); s32 menuhandler001786d8(u32, u32, u32 *); diff --git a/src/include/types.h b/src/include/types.h index 5926171be..62dc9d473 100644 --- a/src/include/types.h +++ b/src/include/types.h @@ -2669,7 +2669,7 @@ struct player { /*0x196c*/ u32 shootrotx; /*0x1970*/ u32 shootroty; /*0x1974*/ char *award1; - /*0x1978*/ u32 unk1978; + /*0x1978*/ char *award2; /*0x197c*/ u32 unk197c; /*0x1980*/ u32 unk1980; /*0x1984*/ u32 unk1984;