Decompile handGetWeaponFunction2

This commit is contained in:
Ryan Dwyer 2020-05-05 22:30:59 +10:00
parent 8d0f6c348c
commit 2edc77aa03
4 changed files with 18 additions and 29 deletions

View File

@ -8608,7 +8608,7 @@ glabel func0f09e4e0
.L0f09e818:
/* f09e818: 02802025 */ or $a0,$s4,$zero
/* f09e81c: 00008825 */ or $s1,$zero,$zero
/* f09e820: 0fc2c40f */ jal func0f0b103c
/* f09e820: 0fc2c40f */ jal handGetWeaponFunction2
/* f09e824: 2415ffff */ addiu $s5,$zero,-1
/* f09e828: 00408025 */ or $s0,$v0,$zero
/* f09e82c: 0fc2c3f4 */ jal weaponFindById
@ -13169,7 +13169,7 @@ glabel func0f0a27c8
/* f0a27d0: 27bdffe0 */ addiu $sp,$sp,-32
/* f0a27d4: afbf0014 */ sw $ra,0x14($sp)
/* f0a27d8: 24840638 */ addiu $a0,$a0,1592
/* f0a27dc: 0fc2c40f */ jal func0f0b103c
/* f0a27dc: 0fc2c40f */ jal handGetWeaponFunction2
/* f0a27e0: afa4001c */ sw $a0,0x1c($sp)
/* f0a27e4: 10400017 */ beqz $v0,.L0f0a2844
/* f0a27e8: 8fa4001c */ lw $a0,0x1c($sp)
@ -13202,7 +13202,7 @@ glabel func0f0a27c8
/* f0a2850: 24840ddc */ addiu $a0,$a0,3548
/* f0a2854: 5120001c */ beqzl $t1,.L0f0a28c8
/* f0a2858: 00001025 */ or $v0,$zero,$zero
/* f0a285c: 0fc2c40f */ jal func0f0b103c
/* f0a285c: 0fc2c40f */ jal handGetWeaponFunction2
/* f0a2860: afa4001c */ sw $a0,0x1c($sp)
/* f0a2864: 10400017 */ beqz $v0,.L0f0a28c4
/* f0a2868: 8fa4001c */ lw $a0,0x1c($sp)
@ -13240,7 +13240,7 @@ glabel func0f0a27c8
/* f0a28e0: 27bdffe0 */ addiu $sp,$sp,-32
/* f0a28e4: afbf0014 */ sw $ra,0x14($sp)
/* f0a28e8: 24840638 */ addiu $a0,$a0,1592
/* f0a28ec: 0fc2c40f */ jal func0f0b103c
/* f0a28ec: 0fc2c40f */ jal handGetWeaponFunction2
/* f0a28f0: afa4001c */ sw $a0,0x1c($sp)
/* f0a28f4: 10400013 */ beqz $v0,.L0f0a2944
/* f0a28f8: 8fa4001c */ lw $a0,0x1c($sp)
@ -13269,7 +13269,7 @@ glabel func0f0a27c8
/* f0a2950: 24840ddc */ addiu $a0,$a0,3548
/* f0a2954: 51200018 */ beqzl $t1,.L0f0a29b8
/* f0a2958: 00001025 */ or $v0,$zero,$zero
/* f0a295c: 0fc2c40f */ jal func0f0b103c
/* f0a295c: 0fc2c40f */ jal handGetWeaponFunction2
/* f0a2960: afa4001c */ sw $a0,0x1c($sp)
/* f0a2964: 10400013 */ beqz $v0,.L0f0a29b4
/* f0a2968: 8fa4001c */ lw $a0,0x1c($sp)
@ -16805,7 +16805,7 @@ glabel var7f1aca70
/* f0a5624: 00000000 */ sll $zero,$zero,0x0
/* f0a5628: afaf01b8 */ sw $t7,0x1b8($sp)
.L0f0a562c:
/* f0a562c: 0fc2c40f */ jal func0f0b103c
/* f0a562c: 0fc2c40f */ jal handGetWeaponFunction2
/* f0a5630: 02002025 */ or $a0,$s0,$zero
/* f0a5634: 10400007 */ beqz $v0,.L0f0a5654
/* f0a5638: afa201d0 */ sw $v0,0x1d0($sp)

View File

@ -2338,7 +2338,7 @@ glabel var7f1acd60
/* f0ade58: afa200c4 */ sw $v0,0xc4($sp)
/* f0ade5c: afaf00c0 */ sw $t7,0xc0($sp)
/* f0ade60: 24640638 */ addiu $a0,$v1,0x638
/* f0ade64: 0fc2c40f */ jal func0f0b103c
/* f0ade64: 0fc2c40f */ jal handGetWeaponFunction2
/* f0ade68: afa30030 */ sw $v1,0x30($sp)
/* f0ade6c: 8faa0134 */ lw $t2,0x134($sp)
/* f0ade70: 81441580 */ lb $a0,0x1580($t2)

View File

@ -870,27 +870,16 @@ glabel weaponGetFunctionById
/* f0b1038: 27bd0018 */ addiu $sp,$sp,0x18
);
GLOBAL_ASM(
glabel func0f0b103c
/* f0b103c: 27bdffe8 */ addiu $sp,$sp,-24
/* f0b1040: afbf0014 */ sw $ra,0x14($sp)
/* f0b1044: afa40018 */ sw $a0,0x18($sp)
/* f0b1048: 0fc2c3f4 */ jal weaponFindById
/* f0b104c: 90840000 */ lbu $a0,0x0($a0)
/* f0b1050: 10400007 */ beqz $v0,.L0f0b1070
/* f0b1054: 8fbf0014 */ lw $ra,0x14($sp)
/* f0b1058: 8faf0018 */ lw $t7,0x18($sp)
/* f0b105c: 91f80003 */ lbu $t8,0x3($t7)
/* f0b1060: 0018c880 */ sll $t9,$t8,0x2
/* f0b1064: 00594021 */ addu $t0,$v0,$t9
/* f0b1068: 10000002 */ beqz $zero,.L0f0b1074
/* f0b106c: 8d020014 */ lw $v0,0x14($t0)
.L0f0b1070:
/* f0b1070: 00001025 */ or $v0,$zero,$zero
.L0f0b1074:
/* f0b1074: 03e00008 */ jr $ra
/* f0b1078: 27bd0018 */ addiu $sp,$sp,0x18
);
struct weaponfunc *handGetWeaponFunction2(struct hand *hand)
{
struct weapon *weapon = weaponFindById(hand->weaponnum);
if (weapon) {
return weapon->functions[hand->weaponfunc];
}
return NULL;
}
struct weaponfunc *handGetWeaponFunction(struct hand *hand)
{

View File

@ -19,7 +19,7 @@ u32 func0f0b0818(void);
s32 func0f0b09f4(s32 arg0, s32 playernum);
struct weapon *weaponFindById(s32 itemid);
struct weaponfunc *weaponGetFunctionById(s32 weapon_id, s32 which);
u32 func0f0b103c(void);
struct weaponfunc *handGetWeaponFunction2(struct hand *hand);
struct weaponfunc *handGetWeaponFunction(struct hand *hand);
struct weaponfunc *weaponGetFunction(u8 *arg0, s32 which);
struct weaponfunc *currentPlayerGetWeaponFunction(u32 hand);