Decompile currentPlayerCanHaveWeapon

This commit is contained in:
Ryan Dwyer 2020-02-04 22:31:58 +10:00
parent 2db98d61f7
commit 407491f86c
5 changed files with 19 additions and 37 deletions

View File

@ -12188,7 +12188,7 @@ glabel func0f0a1ab0
/* f0a1ac8: 11c1001c */ beq $t6,$at,.L0f0a1b3c
/* f0a1acc: afb00018 */ sw $s0,0x18($sp)
/* f0a1ad0: 8c500284 */ lw $s0,0x284($v0)
/* f0a1ad4: 0fc44727 */ jal func0f111c9c
/* f0a1ad4: 0fc44727 */ jal currentPlayerCanHaveWeapon
/* f0a1ad8: 82041581 */ lb $a0,0x1581($s0)
/* f0a1adc: 10400015 */ beqz $v0,.L0f0a1b34
/* f0a1ae0: 00002025 */ or $a0,$zero,$zero
@ -12457,7 +12457,7 @@ glabel func0f0a1df4
/* f0a1e64: 2416ffff */ addiu $s6,$zero,-1
/* f0a1e68: 0000a025 */ or $s4,$zero,$zero
.L0f0a1e6c:
/* f0a1e6c: 0fc44727 */ jal func0f111c9c
/* f0a1e6c: 0fc44727 */ jal currentPlayerCanHaveWeapon
/* f0a1e70: 92640000 */ lbu $a0,0x0($s3)
/* f0a1e74: 10400031 */ beqz $v0,.L0f0a1f3c
/* f0a1e78: 00000000 */ sll $zero,$zero,0x0
@ -12544,7 +12544,7 @@ glabel func0f0a1df4
/* f0a1f98: 267301eb */ addiu $s3,$s3,0x1eb
/* f0a1f9c: 92110000 */ lbu $s1,0x0($s0)
.L0f0a1fa0:
/* f0a1fa0: 0fc44727 */ jal func0f111c9c
/* f0a1fa0: 0fc44727 */ jal currentPlayerCanHaveWeapon
/* f0a1fa4: 02202025 */ or $a0,$s1,$zero
/* f0a1fa8: 10400008 */ beqz $v0,.L0f0a1fcc
/* f0a1fac: 26100001 */ addiu $s0,$s0,0x1
@ -20302,7 +20302,7 @@ glabel func0f0a8d34
/* f0a8eac: 8fae0050 */ lw $t6,0x50($sp)
/* f0a8eb0: 160e000d */ bne $s0,$t6,.L0f0a8ee8
/* f0a8eb4: 00000000 */ sll $zero,$zero,0x0
/* f0a8eb8: 0fc44727 */ jal func0f111c9c
/* f0a8eb8: 0fc44727 */ jal currentPlayerCanHaveWeapon
/* f0a8ebc: 02002025 */ or $a0,$s0,$zero
/* f0a8ec0: 14400009 */ bnez $v0,.L0f0a8ee8
/* f0a8ec4: 00000000 */ sll $zero,$zero,0x0

View File

@ -2210,7 +2210,7 @@ glabel func0f0d0928
/* f0d1040: e7ae00e0 */ swc1 $f14,0xe0($sp)
/* f0d1044: 0fc195e9 */ jal func0f0657a4
/* f0d1048: 24840028 */ addiu $a0,$a0,0x28
/* f0d104c: 0fc44727 */ jal func0f111c9c
/* f0d104c: 0fc44727 */ jal currentPlayerCanHaveWeapon
/* f0d1050: 2404002e */ addiu $a0,$zero,0x2e
/* f0d1054: 3c09800a */ lui $t1,%hi(g_Vars)
/* f0d1058: 44808000 */ mtc1 $zero,$f16

View File

@ -531,34 +531,16 @@ glabel func0f111c30
/* f111c98: 00000000 */ sll $zero,$zero,0x0
);
GLOBAL_ASM(
glabel func0f111c9c
/* f111c9c: 3c0e800a */ lui $t6,0x800a
/* f111ca0: 8dcea244 */ lw $t6,-0x5dbc($t6)
/* f111ca4: 27bdffe8 */ addiu $sp,$sp,-24
/* f111ca8: afbf0014 */ sw $ra,0x14($sp)
/* f111cac: 8dcf1870 */ lw $t7,0x1870($t6)
/* f111cb0: 11e0000b */ beqz $t7,.L0f111ce0
/* f111cb4: 00000000 */ sll $zero,$zero,0x0
/* f111cb8: 10800009 */ beqz $a0,.L0f111ce0
/* f111cbc: 2881002d */ slti $at,$a0,0x2d
/* f111cc0: 10200007 */ beqz $at,.L0f111ce0
/* f111cc4: 00000000 */ sll $zero,$zero,0x0
/* f111cc8: 0fc4470c */ jal func0f111c30
/* f111ccc: afa40018 */ sw $a0,0x18($sp)
/* f111cd0: 10400003 */ beqz $v0,.L0f111ce0
/* f111cd4: 8fa40018 */ lw $a0,0x18($sp)
/* f111cd8: 10000003 */ beqz $zero,.L0f111ce8
/* f111cdc: 24020001 */ addiu $v0,$zero,0x1
.L0f111ce0:
/* f111ce0: 0fc4468a */ jal func0f111a28
/* f111ce4: 00000000 */ sll $zero,$zero,0x0
.L0f111ce8:
/* f111ce8: 8fbf0014 */ lw $ra,0x14($sp)
/* f111cec: 27bd0018 */ addiu $sp,$sp,0x18
/* f111cf0: 03e00008 */ jr $ra
/* f111cf4: 00000000 */ sll $zero,$zero,0x0
);
bool currentPlayerCanHaveWeapon(s32 weaponnum)
{
if (g_Vars.currentplayer->equipallguns &&
weaponnum && weaponnum <= WEAPON_PSYCHOSISGUN &&
func0f111c30(weaponnum)) {
return true;
}
return func0f111a28(weaponnum);
}
GLOBAL_ASM(
glabel func0f111cf8

View File

@ -3870,7 +3870,7 @@ glabel func0f19f994
/* f19f9f0: 00000000 */ sll $zero,$zero,0x0
/* f19f9f4: 0fc6749a */ jal func0f19d268
/* f19f9f8: 96a40456 */ lhu $a0,0x456($s5)
/* f19f9fc: 0fc44727 */ jal func0f111c9c
/* f19f9fc: 0fc44727 */ jal currentPlayerCanHaveWeapon
/* f19fa00: 00402025 */ or $a0,$v0,$zero
/* f19fa04: 10400005 */ beqz $v0,.L0f19fa1c
/* f19fa08: 00000000 */ sll $zero,$zero,0x0

View File

@ -10,14 +10,14 @@ u32 func0f1118cc(void);
u32 func0f111928(void);
void currentPlayerSetAllGuns(bool enable);
u32 func0f1119d0(void);
u32 func0f111a28(void);
bool func0f111a28(s32 weaponnum);
u32 func0f111a4c(void);
u32 func0f111ab0(void);
u32 func0f111ad4(void);
u32 func0f111b88(void);
u32 func0f111be8(void);
u32 func0f111c30(void);
u32 func0f111c9c(void);
bool func0f111c30(s32 weaponnum);
bool currentPlayerCanHaveWeapon(s32 weaponnum);
u32 func0f111cf8(void);
void currentPlayerGiveWeapon(s32 weapon);
void func0f111e28(s32 weapon, s32 weaponarg);