mirror of
https://github.com/perfect-dark-pc-port/perfect_dark.git
synced 2026-10-24 00:02:43 +02:00
Decompile handGetSingleShootSound
This commit is contained in:
1 parent
a56cc3a9da
commit
8813716231
6 files changed
+62
-49
No files matched your search
@@ -13467,7 +13467,7 @@ glabel func0f03e29c
|
||||
/* f03e2d4: 0fc2c78a */ jal func0f0b1e28
|
||||
/* f03e2d8: afae005c */ sw $t6,0x5c($sp)
|
||||
/* f03e2dc: 8fa4004c */ lw $a0,0x4c($sp)
|
||||
/* f03e2e0: 0fc2c79a */ jal func0f0b1e68
|
||||
/* f03e2e0: 0fc2c79a */ jal handGetSingleShootSound
|
||||
/* f03e2e4: a3a20057 */ sb $v0,0x57($sp)
|
||||
/* f03e2e8: 8faa0068 */ lw $t2,0x68($sp)
|
||||
/* f03e2ec: 8faf006c */ lw $t7,0x6c($sp)
|
||||
|
||||
+44
-22
@@ -126,7 +126,8 @@ struct weaponfunc_shootsingle invfunc_00011160 = {
|
||||
0x40000000,
|
||||
0x00000000,
|
||||
0x40800000,
|
||||
0x04008039,
|
||||
0x0400,
|
||||
0x8039,
|
||||
0x01000000,
|
||||
};
|
||||
|
||||
@@ -448,7 +449,8 @@ struct weaponfunc_shootsingle invfunc_falcon2_singleshot = {
|
||||
0x41700000,
|
||||
0x426fffff,
|
||||
0x00000000,
|
||||
0x0000804d,
|
||||
0x0000,
|
||||
0x804d,
|
||||
0x01000000,
|
||||
};
|
||||
|
||||
@@ -469,7 +471,8 @@ struct weaponfunc_shootsingle invfunc_falcon2silenced_singleshot = {
|
||||
0x41700000,
|
||||
0x426fffff,
|
||||
0x00000000,
|
||||
0x00008054,
|
||||
0x0000,
|
||||
0x8054,
|
||||
0x01000000,
|
||||
};
|
||||
|
||||
@@ -675,7 +678,8 @@ struct weaponfunc_shootsingle invfunc_magsec_singleshot = {
|
||||
0x41200000,
|
||||
0x426fffff,
|
||||
0x41200000,
|
||||
0x0000804c,
|
||||
0x0000,
|
||||
0x804c,
|
||||
0x01000000,
|
||||
};
|
||||
|
||||
@@ -696,7 +700,8 @@ struct weaponfunc_shootsingle invfunc_magsec_burst = {
|
||||
0x41400000,
|
||||
0x426fffff,
|
||||
0x41200000,
|
||||
0x0000804c,
|
||||
0x0000,
|
||||
0x804c,
|
||||
0x01000000,
|
||||
};
|
||||
|
||||
@@ -840,7 +845,8 @@ struct weaponfunc_shootsingle invfunc_dy357_singleshot = {
|
||||
0x420c0000,
|
||||
0x00000000,
|
||||
0x40c00000,
|
||||
0x00008066,
|
||||
0x0000,
|
||||
0x8066,
|
||||
0x05000000,
|
||||
};
|
||||
|
||||
@@ -861,7 +867,8 @@ struct weaponfunc_shootsingle invfunc_dy357lx_singleshot = {
|
||||
0x420c0000,
|
||||
0x00000000,
|
||||
0x40c00000,
|
||||
0x00008066,
|
||||
0x0000,
|
||||
0x8066,
|
||||
0x05000000,
|
||||
};
|
||||
|
||||
@@ -1007,7 +1014,8 @@ struct weaponfunc_shootsingle invfunc_phoenix_singleshot = {
|
||||
0x41700000,
|
||||
0x426fffff,
|
||||
0x00000000,
|
||||
0x00008071,
|
||||
0x0000,
|
||||
0x8071,
|
||||
0x01000000,
|
||||
};
|
||||
|
||||
@@ -1028,7 +1036,8 @@ struct weaponfunc_shootsingle invfunc_phoenix_explosiveshells = {
|
||||
0x41c80000,
|
||||
0x426fffff,
|
||||
0x00000000,
|
||||
0x00008072,
|
||||
0x0000,
|
||||
0x8072,
|
||||
0x01000000,
|
||||
};
|
||||
|
||||
@@ -1145,7 +1154,8 @@ struct weaponfunc_shootsingle invfunc_mauler_singleshot = {
|
||||
0x00000000,
|
||||
0x426fffff,
|
||||
0x40800000,
|
||||
0x0000805b,
|
||||
0x0000,
|
||||
0x805b,
|
||||
0x01000000,
|
||||
};
|
||||
|
||||
@@ -1166,7 +1176,8 @@ struct weaponfunc_shootsingle invfunc_mauler_chargeshot = {
|
||||
0x00000000,
|
||||
0x426fffff,
|
||||
0x40800000,
|
||||
0x0000805b,
|
||||
0x0000,
|
||||
0x805b,
|
||||
0x01000000,
|
||||
};
|
||||
|
||||
@@ -2397,7 +2408,8 @@ struct weaponfunc_shootsingle invfunc_shotgun_single = {
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x40800000,
|
||||
0x00008055,
|
||||
0x0000,
|
||||
0x8055,
|
||||
0x01000000,
|
||||
};
|
||||
|
||||
@@ -2418,7 +2430,8 @@ struct weaponfunc_shootsingle invfunc_shotgun_double = {
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x40800000,
|
||||
0x00008055,
|
||||
0x0000,
|
||||
0x8055,
|
||||
0x01000000,
|
||||
};
|
||||
|
||||
@@ -3437,7 +3450,8 @@ struct weaponfunc_shootsingle invfunc_farsight_shoot = {
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x0400813e,
|
||||
0x0400,
|
||||
0x813e,
|
||||
0x05000000,
|
||||
};
|
||||
|
||||
@@ -3458,7 +3472,8 @@ struct weaponfunc_shootsingle invfunc_farsight_targetlocator = {
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x0400813e,
|
||||
0x0400,
|
||||
0x813e,
|
||||
0x05000000,
|
||||
};
|
||||
|
||||
@@ -3698,7 +3713,8 @@ struct weaponfunc_shootsingle invfunc_tranquilizer_shoot = {
|
||||
0x00000000,
|
||||
0x426fffff,
|
||||
0x00000000,
|
||||
0x00008057,
|
||||
0x0000,
|
||||
0x8057,
|
||||
0x01000000,
|
||||
};
|
||||
|
||||
@@ -3791,7 +3807,8 @@ struct weaponfunc_shootsingle invfunc_psychosisgun_shoot = {
|
||||
0x00000000,
|
||||
0x426fffff,
|
||||
0x00000000,
|
||||
0x00008057,
|
||||
0x0000,
|
||||
0x8057,
|
||||
0x01000000,
|
||||
};
|
||||
|
||||
@@ -3872,7 +3889,8 @@ struct weaponfunc_shootsingle invfunc_sniperrifle_singleshot = {
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x04008058,
|
||||
0x0400,
|
||||
0x8058,
|
||||
0x01000000,
|
||||
};
|
||||
|
||||
@@ -3954,7 +3972,8 @@ struct weaponfunc_shootsingle invfunc_laser_pulse = {
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x03008043,
|
||||
0x0300,
|
||||
0x8043,
|
||||
0x01000000,
|
||||
};
|
||||
|
||||
@@ -4042,7 +4061,8 @@ struct weaponfunc_shootsingle invfunc_pp9i_shoot = {
|
||||
0x41200000,
|
||||
0x41efffff,
|
||||
0x00000000,
|
||||
0x00008069,
|
||||
0x0000,
|
||||
0x8069,
|
||||
0x01000000,
|
||||
};
|
||||
|
||||
@@ -4102,7 +4122,8 @@ struct weaponfunc_shootsingle invfunc_cc13_shoot = {
|
||||
0x41200000,
|
||||
0x426fffff,
|
||||
0x00000000,
|
||||
0x0000806a,
|
||||
0x0000,
|
||||
0x806a,
|
||||
0x01000000,
|
||||
};
|
||||
|
||||
@@ -5915,7 +5936,8 @@ struct weaponfunc_shootsingle invfunc_tester_primary = {
|
||||
0x00000000,
|
||||
0x426fffff,
|
||||
0x00000000,
|
||||
0x0000804d,
|
||||
0x0000,
|
||||
0x804d,
|
||||
0x01000000,
|
||||
};
|
||||
|
||||
|
||||
@@ -3753,7 +3753,7 @@ glabel var7f1ac320
|
||||
/* f09aa28: 0c00cec9 */ jal audioStop
|
||||
/* f09aa2c: 8e0401d0 */ lw $a0,0x1d0($s0)
|
||||
.L0f09aa30:
|
||||
/* f09aa30: 0fc2c79a */ jal func0f0b1e68
|
||||
/* f09aa30: 0fc2c79a */ jal handGetSingleShootSound
|
||||
/* f09aa34: 02002025 */ or $a0,$s0,$zero
|
||||
/* f09aa38: 50400053 */ beqzl $v0,.L0f09ab88
|
||||
/* f09aa3c: 00002025 */ or $a0,$zero,$zero
|
||||
@@ -3761,7 +3761,7 @@ glabel var7f1ac320
|
||||
/* f09aa44: 00002025 */ or $a0,$zero,$zero
|
||||
/* f09aa48: 55400017 */ bnezl $t2,.L0f09aaa8
|
||||
/* f09aa4c: 8e0e01d0 */ lw $t6,0x1d0($s0)
|
||||
/* f09aa50: 0fc2c79a */ jal func0f0b1e68
|
||||
/* f09aa50: 0fc2c79a */ jal handGetSingleShootSound
|
||||
/* f09aa54: 02002025 */ or $a0,$s0,$zero
|
||||
/* f09aa58: 3c01bf80 */ lui $at,0xbf80
|
||||
/* f09aa5c: 44814000 */ mtc1 $at,$f8
|
||||
@@ -3786,7 +3786,7 @@ glabel var7f1ac320
|
||||
.L0f09aaa8:
|
||||
/* f09aaa8: 55c00016 */ bnezl $t6,.L0f09ab04
|
||||
/* f09aaac: 920b0000 */ lbu $t3,0x0($s0)
|
||||
/* f09aab0: 0fc2c79a */ jal func0f0b1e68
|
||||
/* f09aab0: 0fc2c79a */ jal handGetSingleShootSound
|
||||
/* f09aab4: 02002025 */ or $a0,$s0,$zero
|
||||
/* f09aab8: 3c01bf80 */ lui $at,0xbf80
|
||||
/* f09aabc: 44815000 */ mtc1 $at,$f10
|
||||
|
||||
+11
-21
@@ -1497,27 +1497,17 @@ glabel func0f0b1e28
|
||||
/* f0b1e64: 27bd0018 */ addiu $sp,$sp,0x18
|
||||
);
|
||||
|
||||
GLOBAL_ASM(
|
||||
glabel func0f0b1e68
|
||||
/* f0b1e68: 27bdffe8 */ addiu $sp,$sp,-24
|
||||
/* f0b1e6c: afbf0014 */ sw $ra,0x14($sp)
|
||||
/* f0b1e70: 0fc2c41f */ jal handGetWeaponFunction
|
||||
/* f0b1e74: 00000000 */ nop
|
||||
/* f0b1e78: 10400008 */ beqz $v0,.L0f0b1e9c
|
||||
/* f0b1e7c: 8fbf0014 */ lw $ra,0x14($sp)
|
||||
/* f0b1e80: 8c4e0000 */ lw $t6,0x0($v0)
|
||||
/* f0b1e84: 24010001 */ addiu $at,$zero,0x1
|
||||
/* f0b1e88: 31cf00ff */ andi $t7,$t6,0xff
|
||||
/* f0b1e8c: 55e10004 */ bnel $t7,$at,.L0f0b1ea0
|
||||
/* f0b1e90: 00001025 */ or $v0,$zero,$zero
|
||||
/* f0b1e94: 10000002 */ b .L0f0b1ea0
|
||||
/* f0b1e98: 9442003a */ lhu $v0,0x3a($v0)
|
||||
.L0f0b1e9c:
|
||||
/* f0b1e9c: 00001025 */ or $v0,$zero,$zero
|
||||
.L0f0b1ea0:
|
||||
/* f0b1ea0: 03e00008 */ jr $ra
|
||||
/* f0b1ea4: 27bd0018 */ addiu $sp,$sp,0x18
|
||||
);
|
||||
u16 handGetSingleShootSound(struct hand *hand)
|
||||
{
|
||||
struct weaponfunc *func = handGetWeaponFunction(hand);
|
||||
|
||||
if (func && (func->type & 0xff) == INVENTORYFUNCTYPE_SHOOT_SINGLE) {
|
||||
struct weaponfunc_shootsingle *funcshoot = (struct weaponfunc_shootsingle *)func;
|
||||
return funcshoot->shootsound;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool handHasFunctionFlags(struct hand *hand, u32 flags)
|
||||
{
|
||||
|
||||
@@ -43,7 +43,7 @@ u32 func0f0b1c78(void);
|
||||
u32 func0f0b1ce8(void);
|
||||
f32 func0f0b1d28(u8 *weaponnum);
|
||||
u32 func0f0b1e28(void);
|
||||
u32 func0f0b1e68(void);
|
||||
u16 handGetSingleShootSound(struct hand *hand);
|
||||
bool handHasFunctionFlags(struct hand *hand, u32 flags);
|
||||
s8 weaponGetMaxFireRatePerTick(u32 weaponnum, u32 funcindex);
|
||||
u32 currentPlayerGetSight(void);
|
||||
|
||||
+2
-1
@@ -2898,7 +2898,8 @@ struct weaponfunc_shootsingle {
|
||||
/*0x2c*/ u32 unk2c;
|
||||
/*0x30*/ u32 unk30;
|
||||
/*0x34*/ u32 unk34;
|
||||
/*0x38*/ u32 unk38;
|
||||
/*0x38*/ u16 unk38;
|
||||
/*0x3a*/ u16 shootsound;
|
||||
/*0x3c*/ u32 unk3c;
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user