Decompile handGetSingleUnk34

This commit is contained in:
Ryan Dwyer 2021-01-02 09:59:34 +10:00
parent 7d8d666e31
commit 926985a11e
5 changed files with 41 additions and 50 deletions

View File

@ -3054,7 +3054,7 @@ glabel var7f1a8d44
/* f031ef8: 144e0035 */ bne $v0,$t6,.L0f031fd0
/* f031efc: 3c188006 */ lui $t8,%hi(var800652b8)
.L0f031f00:
/* f031f00: 0fc2c73a */ jal func0f0b1ce8
/* f031f00: 0fc2c73a */ jal handGetSingleUnk34
/* f031f04: 8fa40120 */ lw $a0,0x120($sp)
/* f031f08: 3c013f00 */ lui $at,0x3f00
/* f031f0c: 44818000 */ mtc1 $at,$f16
@ -3550,7 +3550,7 @@ glabel var7f1a8d44
/* f03263c: 8fa8006c */ lw $t0,0x6c($sp)
/* f032640: 8fa40120 */ lw $a0,0x120($sp)
.L0f032644:
/* f032644: 0fc2c73a */ jal func0f0b1ce8
/* f032644: 0fc2c73a */ jal handGetSingleUnk34
/* f032648: afa8006c */ sw $t0,0x6c($sp)
/* f03264c: 44804000 */ mtc1 $zero,$f8
/* f032650: 8fa8006c */ lw $t0,0x6c($sp)
@ -3738,7 +3738,7 @@ glabel var7f1a8d44
/* f032904: 8fa80060 */ lw $t0,0x60($sp)
/* f032908: 8fa40120 */ lw $a0,0x120($sp)
.L0f03290c:
/* f03290c: 0fc2c73a */ jal func0f0b1ce8
/* f03290c: 0fc2c73a */ jal handGetSingleUnk34
/* f032910: afa80060 */ sw $t0,0x60($sp)
/* f032914: 44804000 */ mtc1 $zero,$f8
/* f032918: 8fa80060 */ lw $t0,0x60($sp)
@ -4248,7 +4248,7 @@ glabel func0f032fe4
/* f033040: 14610024 */ bne $v1,$at,.L0f0330d4
/* f033044: 8fa40050 */ lw $a0,0x50($sp)
/* f033048: afa3003c */ sw $v1,0x3c($sp)
/* f03304c: 0fc2c73a */ jal func0f0b1ce8
/* f03304c: 0fc2c73a */ jal handGetSingleUnk34
/* f033050: afa50034 */ sw $a1,0x34($sp)
/* f033054: 02002025 */ or $a0,$s0,$zero
/* f033058: 0fc0f011 */ jal chrToEyespy
@ -4324,7 +4324,7 @@ glabel func0f032fe4
/* f03315c: 8fab0038 */ lw $t3,0x38($sp)
.L0f033160:
/* f033160: 8fa40050 */ lw $a0,0x50($sp)
/* f033164: 0fc2c73a */ jal func0f0b1ce8
/* f033164: 0fc2c73a */ jal handGetSingleUnk34
/* f033168: afa3003c */ sw $v1,0x3c($sp)
/* f03316c: 8fa3003c */ lw $v1,0x3c($sp)
/* f033170: 24020002 */ addiu $v0,$zero,0x2

View File

@ -125,7 +125,7 @@ struct weaponfunc_shootsingle invfunc_00011160 = {
0x40a00000,
0x40000000,
0x00000000,
0x40800000,
4,
4,
0x8039,
0x01000000,
@ -448,7 +448,7 @@ struct weaponfunc_shootsingle invfunc_falcon2_singleshot = {
0x41200000,
0x41700000,
0x426fffff,
0x00000000,
0,
0,
0x804d,
0x01000000,
@ -470,7 +470,7 @@ struct weaponfunc_shootsingle invfunc_falcon2silenced_singleshot = {
0x41200000,
0x41700000,
0x426fffff,
0x00000000,
0,
0,
0x8054,
0x01000000,
@ -677,7 +677,7 @@ struct weaponfunc_shootsingle invfunc_magsec_singleshot = {
0x40a00000,
0x41200000,
0x426fffff,
0x41200000,
10,
0,
0x804c,
0x01000000,
@ -699,7 +699,7 @@ struct weaponfunc_shootsingle invfunc_magsec_burst = {
0x41000000,
0x41400000,
0x426fffff,
0x41200000,
10,
0,
0x804c,
0x01000000,
@ -844,7 +844,7 @@ struct weaponfunc_shootsingle invfunc_dy357_singleshot = {
0x41400000,
0x420c0000,
0x00000000,
0x40c00000,
6,
0,
0x8066,
0x05000000,
@ -866,7 +866,7 @@ struct weaponfunc_shootsingle invfunc_dy357lx_singleshot = {
0x41400000,
0x420c0000,
0x00000000,
0x40c00000,
6,
0,
0x8066,
0x05000000,
@ -1013,7 +1013,7 @@ struct weaponfunc_shootsingle invfunc_phoenix_singleshot = {
0x41200000,
0x41700000,
0x426fffff,
0x00000000,
0,
0,
0x8071,
0x01000000,
@ -1035,7 +1035,7 @@ struct weaponfunc_shootsingle invfunc_phoenix_explosiveshells = {
0x41700000,
0x41c80000,
0x426fffff,
0x00000000,
0,
0,
0x8072,
0x01000000,
@ -1153,7 +1153,7 @@ struct weaponfunc_shootsingle invfunc_mauler_singleshot = {
0x00000000,
0x00000000,
0x426fffff,
0x40800000,
4,
0,
0x805b,
0x01000000,
@ -1175,7 +1175,7 @@ struct weaponfunc_shootsingle invfunc_mauler_chargeshot = {
0x00000000,
0x00000000,
0x426fffff,
0x40800000,
4,
0,
0x805b,
0x01000000,
@ -2407,7 +2407,7 @@ struct weaponfunc_shootsingle invfunc_shotgun_single = {
0x00000000,
0x00000000,
0x00000000,
0x40800000,
4,
0,
0x8055,
0x01000000,
@ -2429,7 +2429,7 @@ struct weaponfunc_shootsingle invfunc_shotgun_double = {
0x00000000,
0x00000000,
0x00000000,
0x40800000,
4,
0,
0x8055,
0x01000000,
@ -3449,7 +3449,7 @@ struct weaponfunc_shootsingle invfunc_farsight_shoot = {
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0,
4,
0x813e,
0x05000000,
@ -3471,7 +3471,7 @@ struct weaponfunc_shootsingle invfunc_farsight_targetlocator = {
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0,
4,
0x813e,
0x05000000,
@ -3712,7 +3712,7 @@ struct weaponfunc_shootsingle invfunc_tranquilizer_shoot = {
0x3f800000,
0x00000000,
0x426fffff,
0x00000000,
0,
0,
0x8057,
0x01000000,
@ -3806,7 +3806,7 @@ struct weaponfunc_shootsingle invfunc_psychosisgun_shoot = {
0x3f800000,
0x00000000,
0x426fffff,
0x00000000,
0,
0,
0x8057,
0x01000000,
@ -3888,7 +3888,7 @@ struct weaponfunc_shootsingle invfunc_sniperrifle_singleshot = {
0x41000000,
0x00000000,
0x00000000,
0x00000000,
0,
4,
0x8058,
0x01000000,
@ -3971,7 +3971,7 @@ struct weaponfunc_shootsingle invfunc_laser_pulse = {
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0,
3,
0x8043,
0x01000000,
@ -4060,7 +4060,7 @@ struct weaponfunc_shootsingle invfunc_pp9i_shoot = {
0x40400000,
0x41200000,
0x41efffff,
0x00000000,
0,
0,
0x8069,
0x01000000,
@ -4121,7 +4121,7 @@ struct weaponfunc_shootsingle invfunc_cc13_shoot = {
0x40a00000,
0x41200000,
0x426fffff,
0x00000000,
0,
0,
0x806a,
0x01000000,
@ -5935,7 +5935,7 @@ struct weaponfunc_shootsingle invfunc_tester_primary = {
0x00000000,
0x00000000,
0x426fffff,
0x00000000,
0,
0,
0x804d,
0x01000000,

View File

@ -1377,27 +1377,18 @@ glabel func0f0b1c78
/* f0b1ce4: 00000000 */ nop
);
GLOBAL_ASM(
glabel func0f0b1ce8
/* f0b1ce8: 27bdffe8 */ addiu $sp,$sp,-24
/* f0b1cec: afbf0014 */ sw $ra,0x14($sp)
/* f0b1cf0: 0fc2c41f */ jal handGetWeaponFunction
/* f0b1cf4: 00000000 */ nop
/* f0b1cf8: 44801000 */ mtc1 $zero,$f2
/* f0b1cfc: 10400007 */ beqz $v0,.L0f0b1d1c
/* f0b1d00: 8fbf0014 */ lw $ra,0x14($sp)
/* f0b1d04: 8c4e0000 */ lw $t6,0x0($v0)
/* f0b1d08: 24010001 */ addiu $at,$zero,0x1
/* f0b1d0c: 31cf00ff */ andi $t7,$t6,0xff
/* f0b1d10: 55e10003 */ bnel $t7,$at,.L0f0b1d20
/* f0b1d14: 46001006 */ mov.s $f0,$f2
/* f0b1d18: c4420034 */ lwc1 $f2,0x34($v0)
.L0f0b1d1c:
/* f0b1d1c: 46001006 */ mov.s $f0,$f2
.L0f0b1d20:
/* f0b1d20: 03e00008 */ jr $ra
/* f0b1d24: 27bd0018 */ addiu $sp,$sp,0x18
);
f32 handGetSingleUnk34(struct hand *hand)
{
struct weaponfunc *func = handGetWeaponFunction(hand);
f32 result = 0;
if (func && (func->type & 0xff) == INVENTORYFUNCTYPE_SHOOT_SINGLE) {
struct weaponfunc_shootsingle *funcshoot = (struct weaponfunc_shootsingle *)func;
result = funcshoot->unk34;
}
return result;
}
GLOBAL_ASM(
glabel func0f0b1d28

View File

@ -40,7 +40,7 @@ u32 func0f0b1ad0(void);
u32 func0f0b1af0(void);
u32 func0f0b1c24(void);
u32 func0f0b1c78(void);
u32 func0f0b1ce8(void);
f32 handGetSingleUnk34(struct hand *hand);
f32 func0f0b1d28(u8 *weaponnum);
u8 handGetSingleUnk38(struct hand *hand);
u16 handGetSingleShootSound(struct hand *hand);

View File

@ -2897,7 +2897,7 @@ struct weaponfunc_shootsingle {
/*0x28*/ u32 unk28;
/*0x2c*/ u32 unk2c;
/*0x30*/ u32 unk30;
/*0x34*/ u32 unk34;
/*0x34*/ f32 unk34;
/*0x38*/ u8 unk38;
/*0x3a*/ u16 shootsound;
/*0x3c*/ u32 unk3c;