diff --git a/src/game/mplayer/setup.c b/src/game/mplayer/setup.c index 99838965f..9e9b2f819 100644 --- a/src/game/mplayer/setup.c +++ b/src/game/mplayer/setup.c @@ -1822,42 +1822,11 @@ glabel var7f1b80ec /* f17af18: 00000000 */ nop ); -GLOBAL_ASM( -glabel mpMenuTextPainReceived -/* f17af1c: 3c0e8007 */ lui $t6,%hi(g_MpPlayerNum) -/* f17af20: 8dce1448 */ lw $t6,%lo(g_MpPlayerNum)($t6) -/* f17af24: 3c18800b */ lui $t8,%hi(g_MpPlayers+0x78) -/* f17af28: 27bdffe8 */ addiu $sp,$sp,-24 -/* f17af2c: 000e7880 */ sll $t7,$t6,0x2 -/* f17af30: 01ee7821 */ addu $t7,$t7,$t6 -/* f17af34: 000f7940 */ sll $t7,$t7,0x5 -/* f17af38: 030fc021 */ addu $t8,$t8,$t7 -/* f17af3c: 8f18c830 */ lw $t8,%lo(g_MpPlayers+0x78)($t8) -/* f17af40: afa40018 */ sw $a0,0x18($sp) -/* f17af44: 3c048007 */ lui $a0,%hi(g_StringPointer) -/* f17af48: 44982000 */ mtc1 $t8,$f4 -/* f17af4c: afbf0014 */ sw $ra,0x14($sp) -/* f17af50: 8c841440 */ lw $a0,%lo(g_StringPointer)($a0) -/* f17af54: 07010005 */ bgez $t8,.L0f17af6c -/* f17af58: 468021a0 */ cvt.s.w $f6,$f4 -/* f17af5c: 3c014f80 */ lui $at,0x4f80 -/* f17af60: 44814000 */ mtc1 $at,$f8 -/* f17af64: 00000000 */ nop -/* f17af68: 46083180 */ add.s $f6,$f6,$f8 -.L0f17af6c: -/* f17af6c: 3c014120 */ lui $at,0x4120 -/* f17af70: 44815000 */ mtc1 $at,$f10 -/* f17af74: 00000000 */ nop -/* f17af78: 460a3403 */ div.s $f16,$f6,$f10 -/* f17af7c: 44058000 */ mfc1 $a1,$f16 -/* f17af80: 0fc5eb60 */ jal func0f17ad80 -/* f17af84: 00000000 */ nop -/* f17af88: 8fbf0014 */ lw $ra,0x14($sp) -/* f17af8c: 3c028007 */ lui $v0,%hi(g_StringPointer) -/* f17af90: 8c421440 */ lw $v0,%lo(g_StringPointer)($v0) -/* f17af94: 03e00008 */ jr $ra -/* f17af98: 27bd0018 */ addiu $sp,$sp,0x18 -); +char *mpMenuTextPainReceived(struct menuitem *item) +{ + func0f17ad80(g_StringPointer, g_MpPlayers[g_MpPlayerNum].painreceived / 10.0f); + return g_StringPointer; +} GLOBAL_ASM( glabel mpMenuTextDamageDealt diff --git a/src/include/game/mplayer/setup.h b/src/include/game/mplayer/setup.h index 600fb2482..b8efc4b34 100644 --- a/src/include/game/mplayer/setup.h +++ b/src/include/game/mplayer/setup.h @@ -25,8 +25,8 @@ char *mpMenuTextAmmoUsed(struct menuitem *item); char *mpMenuTextDistance(struct menuitem *item); u32 mpMenuTextTime(void); char *mpMenuTextAccuracy(struct menuitem *item); -u32 func0f17ad80(void); -u32 mpMenuTextPainReceived(void); +void func0f17ad80(char *dst, f32 arg0); +char *mpMenuTextPainReceived(struct menuitem *item); u32 mpMenuTextDamageDealt(void); s32 menuhandlerMpMedal(u32 operation, struct menuitem *item, union handlerdata *data); u32 func0f17b360(void); diff --git a/src/include/types.h b/src/include/types.h index 094a5f71d..054e15d5a 100644 --- a/src/include/types.h +++ b/src/include/types.h @@ -4387,7 +4387,7 @@ struct mpplayer { /*0x6c*/ u32 distance; // 1 unit = 100 metres /*0x70*/ u32 accuracy; /*0x74*/ u32 damagedealt; - /*0x78*/ f32 painreceived; + /*0x78*/ u32 painreceived; /*0x7c*/ u32 headshots; /*0x80*/ u32 ammoused; /*0x84*/ u32 accuracymedals;