Decompile weaponGetAmmoTypeByFunction
This commit is contained in:
parent
ea255f5420
commit
cfc1370c1c
|
|
@ -4410,7 +4410,7 @@ void chrUpdateCloak(struct chrdata *chr)
|
|||
chr->aibot->unk024 = 0;
|
||||
}
|
||||
} else {
|
||||
ammotype = func0f1999b0(WEAPON_RCP120, 0);
|
||||
ammotype = weaponGetAmmoTypeByFunction(WEAPON_RCP120, 0);
|
||||
|
||||
if (chr->aibot->ammotypes->quantities[ammotype] > 0) {
|
||||
chr->aibot->ammotypes->quantities[ammotype] -= qty;
|
||||
|
|
|
|||
|
|
@ -788,7 +788,7 @@ glabel var7f1b8ea8
|
|||
/* f190dec: 8fa90080 */ lw $t1,0x80($sp)
|
||||
/* f190df0: 00408025 */ or $s0,$v0,$zero
|
||||
/* f190df4: 9124005c */ lbu $a0,0x5c($t1)
|
||||
/* f190df8: 0fc6666c */ jal func0f1999b0
|
||||
/* f190df8: 0fc6666c */ jal weaponGetAmmoTypeByFunction
|
||||
/* f190dfc: 9125005f */ lbu $a1,0x5f($t1)
|
||||
/* f190e00: 0fc2a63d */ jal ammotypeGetMaxCapacity
|
||||
/* f190e04: 00402025 */ or $a0,$v0,$zero
|
||||
|
|
@ -3807,7 +3807,7 @@ glabel var7f1b8f50
|
|||
/* f1939c4: 1662ffe0 */ bne $s3,$v0,.L0f193948
|
||||
/* f1939c8: 26d60004 */ addiu $s6,$s6,0x4
|
||||
.L0f1939cc:
|
||||
/* f1939cc: 0fc6666c */ jal func0f1999b0
|
||||
/* f1939cc: 0fc6666c */ jal weaponGetAmmoTypeByFunction
|
||||
/* f1939d0: 00002825 */ or $a1,$zero,$zero
|
||||
/* f1939d4: 18400019 */ blez $v0,.L0f193a3c
|
||||
/* f1939d8: 00408825 */ or $s1,$v0,$zero
|
||||
|
|
@ -4383,13 +4383,13 @@ glabel var7f1b8f50
|
|||
/* f1941ec: 15a1002f */ bne $t5,$at,.L0f1942ac
|
||||
/* f1941f0: 8fa9027c */ lw $t1,0x27c($sp)
|
||||
/* f1941f4: 8e640000 */ lw $a0,0x0($s3)
|
||||
/* f1941f8: 0fc6666c */ jal func0f1999b0
|
||||
/* f1941f8: 0fc6666c */ jal weaponGetAmmoTypeByFunction
|
||||
/* f1941fc: 00002825 */ or $a1,$zero,$zero
|
||||
/* f194200: 0fc2a63d */ jal ammotypeGetMaxCapacity
|
||||
/* f194204: 00402025 */ or $a0,$v0,$zero
|
||||
/* f194208: 0040b825 */ or $s7,$v0,$zero
|
||||
/* f19420c: 8e640000 */ lw $a0,0x0($s3)
|
||||
/* f194210: 0fc6666c */ jal func0f1999b0
|
||||
/* f194210: 0fc6666c */ jal weaponGetAmmoTypeByFunction
|
||||
/* f194214: 24050001 */ addiu $a1,$zero,0x1
|
||||
/* f194218: 0fc2a63d */ jal ammotypeGetMaxCapacity
|
||||
/* f19421c: 00402025 */ or $a0,$v0,$zero
|
||||
|
|
@ -4518,7 +4518,7 @@ glabel var7f1b8f50
|
|||
/* f1943d8: 02003025 */ or $a2,$s0,$zero
|
||||
/* f1943dc: 10400017 */ beqz $v0,.L0f19443c
|
||||
/* f1943e0: 02002825 */ or $a1,$s0,$zero
|
||||
/* f1943e4: 0fc6666c */ jal func0f1999b0
|
||||
/* f1943e4: 0fc6666c */ jal weaponGetAmmoTypeByFunction
|
||||
/* f1943e8: 8e640000 */ lw $a0,0x0($s3)
|
||||
/* f1943ec: 18400013 */ blez $v0,.L0f19443c
|
||||
/* f1943f0: 00409025 */ or $s2,$v0,$zero
|
||||
|
|
@ -4652,7 +4652,7 @@ glabel var7f1b8f50
|
|||
/* f1945ac: 02203025 */ or $a2,$s1,$zero
|
||||
/* f1945b0: 10400016 */ beqz $v0,.L0f19460c
|
||||
/* f1945b4: 02202825 */ or $a1,$s1,$zero
|
||||
/* f1945b8: 0fc6666c */ jal func0f1999b0
|
||||
/* f1945b8: 0fc6666c */ jal weaponGetAmmoTypeByFunction
|
||||
/* f1945bc: 8e640000 */ lw $a0,0x0($s3)
|
||||
/* f1945c0: 18400012 */ blez $v0,.L0f19460c
|
||||
/* f1945c4: 00408025 */ or $s0,$v0,$zero
|
||||
|
|
|
|||
|
|
@ -2125,7 +2125,7 @@ glabel var7f1b9094
|
|||
/* f1992e4: 0313082a */ slt $at,$t8,$s3
|
||||
/* f1992e8: 5420000f */ bnezl $at,.L0f199328
|
||||
/* f1992ec: 2610ffff */ addiu $s0,$s0,-1
|
||||
/* f1992f0: 0fc6666c */ jal func0f1999b0
|
||||
/* f1992f0: 0fc6666c */ jal weaponGetAmmoTypeByFunction
|
||||
/* f1992f4: 02002825 */ or $a1,$s0,$zero
|
||||
/* f1992f8: 10400007 */ beqz $v0,.L0f199318
|
||||
/* f1992fc: 8fa40090 */ lw $a0,0x90($sp)
|
||||
|
|
|
|||
|
|
@ -25,29 +25,18 @@
|
|||
#include "lib/lib_233c0.h"
|
||||
#include "types.h"
|
||||
|
||||
GLOBAL_ASM(
|
||||
glabel func0f1999b0
|
||||
/* f1999b0: 27bdffe8 */ addiu $sp,$sp,-24
|
||||
/* f1999b4: 28810002 */ slti $at,$a0,0x2
|
||||
/* f1999b8: 1420000a */ bnez $at,.L0f1999e4
|
||||
/* f1999bc: afbf0014 */ sw $ra,0x14($sp)
|
||||
/* f1999c0: 2881005e */ slti $at,$a0,0x5e
|
||||
/* f1999c4: 50200008 */ beqzl $at,.L0f1999e8
|
||||
/* f1999c8: 00001025 */ or $v0,$zero,$zero
|
||||
/* f1999cc: 0fc2c47b */ jal weaponGetAmmoByFunction
|
||||
/* f1999d0: 00000000 */ sll $zero,$zero,0x0
|
||||
/* f1999d4: 50400004 */ beqzl $v0,.L0f1999e8
|
||||
/* f1999d8: 00001025 */ or $v0,$zero,$zero
|
||||
/* f1999dc: 10000002 */ beqz $zero,.L0f1999e8
|
||||
/* f1999e0: 8c420000 */ lw $v0,0x0($v0)
|
||||
.L0f1999e4:
|
||||
/* f1999e4: 00001025 */ or $v0,$zero,$zero
|
||||
.L0f1999e8:
|
||||
/* f1999e8: 8fbf0014 */ lw $ra,0x14($sp)
|
||||
/* f1999ec: 27bd0018 */ addiu $sp,$sp,0x18
|
||||
/* f1999f0: 03e00008 */ jr $ra
|
||||
/* f1999f4: 00000000 */ sll $zero,$zero,0x0
|
||||
);
|
||||
s32 weaponGetAmmoTypeByFunction(s32 weaponnum, u32 funcnum)
|
||||
{
|
||||
if (weaponnum >= WEAPON_FALCON2 && weaponnum <= WEAPON_SUICIDEPILL) {
|
||||
struct inventory_ammo *ammo = weaponGetAmmoByFunction(weaponnum, funcnum);
|
||||
|
||||
if (ammo) {
|
||||
return ammo->type;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
GLOBAL_ASM(
|
||||
glabel func0f1999f8
|
||||
|
|
@ -202,14 +191,14 @@ glabel func0f199be4
|
|||
/* f199c14: 11e00008 */ beqz $t7,.L0f199c38
|
||||
/* f199c18: 00000000 */ sll $zero,$zero,0x0
|
||||
/* f199c1c: 00a02025 */ or $a0,$a1,$zero
|
||||
/* f199c20: 0fc6666c */ jal func0f1999b0
|
||||
/* f199c20: 0fc6666c */ jal weaponGetAmmoTypeByFunction
|
||||
/* f199c24: 00c02825 */ or $a1,$a2,$zero
|
||||
/* f199c28: 0fc2a63d */ jal ammotypeGetMaxCapacity
|
||||
/* f199c2c: 00402025 */ or $a0,$v0,$zero
|
||||
/* f199c30: 10000007 */ beqz $zero,.L0f199c50
|
||||
/* f199c34: 00401825 */ or $v1,$v0,$zero
|
||||
.L0f199c38:
|
||||
/* f199c38: 0fc6666c */ jal func0f1999b0
|
||||
/* f199c38: 0fc6666c */ jal weaponGetAmmoTypeByFunction
|
||||
/* f199c3c: 8fa50030 */ lw $a1,0x30($sp)
|
||||
/* f199c40: 8e18001c */ lw $t8,0x1c($s0)
|
||||
/* f199c44: 0002c880 */ sll $t9,$v0,0x2
|
||||
|
|
@ -221,13 +210,13 @@ glabel func0f199be4
|
|||
/* f199c58: 8fa50030 */ lw $a1,0x30($sp)
|
||||
/* f199c5c: 51200012 */ beqzl $t1,.L0f199ca8
|
||||
/* f199c60: 8fbf001c */ lw $ra,0x1c($sp)
|
||||
/* f199c64: 0fc6666c */ jal func0f1999b0
|
||||
/* f199c64: 0fc6666c */ jal weaponGetAmmoTypeByFunction
|
||||
/* f199c68: afa30024 */ sw $v1,0x24($sp)
|
||||
/* f199c6c: afa20020 */ sw $v0,0x20($sp)
|
||||
/* f199c70: 8e05004c */ lw $a1,0x4c($s0)
|
||||
/* f199c74: 8e040020 */ lw $a0,0x20($s0)
|
||||
/* f199c78: 00055080 */ sll $t2,$a1,0x2
|
||||
/* f199c7c: 0fc6666c */ jal func0f1999b0
|
||||
/* f199c7c: 0fc6666c */ jal weaponGetAmmoTypeByFunction
|
||||
/* f199c80: 000a2fc2 */ srl $a1,$t2,0x1f
|
||||
/* f199c84: 8fac0020 */ lw $t4,0x20($sp)
|
||||
/* f199c88: 8fa30024 */ lw $v1,0x24($sp)
|
||||
|
|
@ -280,7 +269,7 @@ glabel func0f199cb8
|
|||
/* f199d24: afa70020 */ sw $a3,0x20($sp)
|
||||
/* f199d28: 00055880 */ sll $t3,$a1,0x2
|
||||
/* f199d2c: 000b2fc2 */ srl $a1,$t3,0x1f
|
||||
/* f199d30: 0fc6666c */ jal func0f1999b0
|
||||
/* f199d30: 0fc6666c */ jal weaponGetAmmoTypeByFunction
|
||||
/* f199d34: afa3001c */ sw $v1,0x1c($sp)
|
||||
/* f199d38: 8fad0024 */ lw $t5,0x24($sp)
|
||||
/* f199d3c: 8fa3001c */ lw $v1,0x1c($sp)
|
||||
|
|
@ -308,7 +297,7 @@ glabel func0f199d70
|
|||
/* f199d7c: afa50024 */ sw $a1,0x24($sp)
|
||||
/* f199d80: 00a02025 */ or $a0,$a1,$zero
|
||||
/* f199d84: 00c02825 */ or $a1,$a2,$zero
|
||||
/* f199d88: 0fc6666c */ jal func0f1999b0
|
||||
/* f199d88: 0fc6666c */ jal weaponGetAmmoTypeByFunction
|
||||
/* f199d8c: afa7002c */ sw $a3,0x2c($sp)
|
||||
/* f199d90: 8fa40020 */ lw $a0,0x20($sp)
|
||||
/* f199d94: 00027080 */ sll $t6,$v0,0x2
|
||||
|
|
@ -369,7 +358,7 @@ glabel func0f199e3c
|
|||
/* f199e4c: 00a02025 */ or $a0,$a1,$zero
|
||||
/* f199e50: afa60028 */ sw $a2,0x28($sp)
|
||||
/* f199e54: afa7002c */ sw $a3,0x2c($sp)
|
||||
/* f199e58: 0fc6666c */ jal func0f1999b0
|
||||
/* f199e58: 0fc6666c */ jal weaponGetAmmoTypeByFunction
|
||||
/* f199e5c: 00c02825 */ or $a1,$a2,$zero
|
||||
/* f199e60: 8fa40020 */ lw $a0,0x20($sp)
|
||||
/* f199e64: 00027080 */ sll $t6,$v0,0x2
|
||||
|
|
@ -392,7 +381,7 @@ glabel func0f199e3c
|
|||
/* f199ea8: ac6b0000 */ sw $t3,0x0($v1)
|
||||
/* f199eac: 8fa50028 */ lw $a1,0x28($sp)
|
||||
/* f199eb0: 8fa40024 */ lw $a0,0x24($sp)
|
||||
/* f199eb4: 0fc6666c */ jal func0f1999b0
|
||||
/* f199eb4: 0fc6666c */ jal weaponGetAmmoTypeByFunction
|
||||
/* f199eb8: afa30018 */ sw $v1,0x18($sp)
|
||||
/* f199ebc: 0fc2a63d */ jal ammotypeGetMaxCapacity
|
||||
/* f199ec0: 00402025 */ or $a0,$v0,$zero
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
#include <ultra64.h>
|
||||
#include "types.h"
|
||||
|
||||
s32 func0f1999b0(u32 weaponnum, u32 arg1);
|
||||
s32 weaponGetAmmoTypeByFunction(s32 weaponnum, u32 funcnum);
|
||||
u32 func0f1999f8(void);
|
||||
u32 func0f199a40(void);
|
||||
s32 func0f199be4(struct aibot *aibot, u32 weaponnum, u32 arg2, u32 arg3);
|
||||
|
|
|
|||
Loading…
Reference in New Issue