Decompile weaponGetNameId

This commit is contained in:
Ryan Dwyer
2020-03-12 22:34:12 +10:00
parent bff65e8a06
commit 08854728d6
3 changed files with 13 additions and 18 deletions
+10 -15
View File
@@ -12738,21 +12738,16 @@ glabel func0f0a215c
/* f0a21a0: 00000000 */ sll $zero,$zero,0x0
);
GLOBAL_ASM(
glabel func0f0a21a4
/* f0a21a4: 00047080 */ sll $t6,$a0,0x2
/* f0a21a8: 3c038007 */ lui $v1,%hi(g_Weapons)
/* f0a21ac: 006e1821 */ addu $v1,$v1,$t6
/* f0a21b0: 8c63ff18 */ lw $v1,%lo(g_Weapons)($v1)
/* f0a21b4: 00001025 */ or $v0,$zero,$zero
/* f0a21b8: 10600003 */ beqz $v1,.L0f0a21c8
/* f0a21bc: 00000000 */ sll $zero,$zero,0x0
/* f0a21c0: 03e00008 */ jr $ra
/* f0a21c4: 94620046 */ lhu $v0,0x46($v1)
.L0f0a21c8:
/* f0a21c8: 03e00008 */ jr $ra
/* f0a21cc: 00000000 */ sll $zero,$zero,0x0
);
u16 weaponGetNameId(s32 weaponnum)
{
struct weapon *weapon = g_Weapons[weaponnum];
if (weapon) {
return weapon->name;
}
return 0;
}
char *weaponGetShortName(s32 weaponnum)
{
+2 -2
View File
@@ -1383,12 +1383,12 @@ u16 currentPlayerGetInvNameIdByIndex(s32 index)
if (g_Vars.currentplayer->equipallguns) {
if (index < WEAPON_PSYCHOSISGUN - currentStageForbidsSlayer()) {
index++;
return func0f0a21a4(func0f111b88(index));
return weaponGetNameId(func0f111b88(index));
}
}
}
return func0f0a21a4(weaponnum);
return weaponGetNameId(weaponnum);
}
char *currentPlayerGetInvNameByIndex(s32 index)
+1 -1
View File
@@ -101,7 +101,7 @@ void currentPlayerEquipWeapon(u32 arg0, u32 arg1);
u32 func0f0a20fc(void);
u32 func0f0a212c(void);
u32 func0f0a215c(void);
u16 func0f0a21a4(s32 arg0);
u16 weaponGetNameId(s32 weaponnum);
char *weaponGetShortName(s32 arg0);
u32 func0f0a2218(void);
u32 func0f0a2290(void);