mirror of
https://gitlab.com/ryandwyer/perfect-dark
synced 2026-08-03 08:33:20 -04:00
Decompile animHasFrames
This commit is contained in:
+1
-1
@@ -119,7 +119,7 @@ void bheadUpdate(f32 arg0, f32 arg1)
|
||||
struct coord upvel = {0, 1, 0};
|
||||
f32 animspeed = 0;
|
||||
|
||||
if (func00023794(g_Vars.currentplayer->model.anim->animnum)) {
|
||||
if (animHasFrames(g_Vars.currentplayer->model.anim->animnum)) {
|
||||
animspeed = modelGetAbsAnimSpeed(&g_Vars.currentplayer->model);
|
||||
|
||||
if (g_Vars.currentplayer->headanim == 0) {
|
||||
|
||||
+6
-6
@@ -7158,7 +7158,7 @@ glabel var7f1a99ecpf
|
||||
/* f023454: 3c048006 */ lui $a0,0x8006
|
||||
/* f023458: 11800022 */ beqz $t4,.PF0f0234e4
|
||||
/* f02345c: 00000000 */ nop
|
||||
/* f023460: 0c008c25 */ jal func00023794
|
||||
/* f023460: 0c008c25 */ jal animHasFrames
|
||||
/* f023464: 84842652 */ lh $a0,0x2652($a0)
|
||||
/* f023468: 10400025 */ beqz $v0,.PF0f023500
|
||||
/* f02346c: 00000000 */ nop
|
||||
@@ -7172,7 +7172,7 @@ glabel var7f1a99ecpf
|
||||
/* f02348c: 8fa40208 */ lw $a0,0x208($sp)
|
||||
/* f023490: 00022400 */ sll $a0,$v0,0x10
|
||||
/* f023494: 00046c03 */ sra $t5,$a0,0x10
|
||||
/* f023498: 0c008c25 */ jal func00023794
|
||||
/* f023498: 0c008c25 */ jal animHasFrames
|
||||
/* f02349c: 01a02025 */ move $a0,$t5
|
||||
/* f0234a0: 14400017 */ bnez $v0,.PF0f023500
|
||||
/* f0234a4: 3c038006 */ lui $v1,0x8006
|
||||
@@ -8596,7 +8596,7 @@ glabel var7f1a87d8
|
||||
/* f023330: 3c048006 */ lui $a0,%hi(g_SelectedAnimNum+0x2)
|
||||
/* f023334: 13000022 */ beqz $t8,.L0f0233c0
|
||||
/* f023338: 00000000 */ nop
|
||||
/* f02333c: 0c008de5 */ jal func00023794
|
||||
/* f02333c: 0c008de5 */ jal animHasFrames
|
||||
/* f023340: 84842972 */ lh $a0,%lo(g_SelectedAnimNum+0x2)($a0)
|
||||
/* f023344: 10400025 */ beqz $v0,.L0f0233dc
|
||||
/* f023348: 00000000 */ nop
|
||||
@@ -8610,7 +8610,7 @@ glabel var7f1a87d8
|
||||
/* f023368: 8fa40208 */ lw $a0,0x208($sp)
|
||||
/* f02336c: 00022400 */ sll $a0,$v0,0x10
|
||||
/* f023370: 00047c03 */ sra $t7,$a0,0x10
|
||||
/* f023374: 0c008de5 */ jal func00023794
|
||||
/* f023374: 0c008de5 */ jal animHasFrames
|
||||
/* f023378: 01e02025 */ or $a0,$t7,$zero
|
||||
/* f02337c: 14400017 */ bnez $v0,.L0f0233dc
|
||||
/* f023380: 3c038006 */ lui $v1,%hi(g_SelectedAnimNum)
|
||||
@@ -10024,7 +10024,7 @@ glabel var7f1a87d8
|
||||
/* f022df8: 3c048006 */ lui $a0,0x8006
|
||||
/* f022dfc: 11600022 */ beqz $t3,.NB0f022e88
|
||||
/* f022e00: 00000000 */ sll $zero,$zero,0x0
|
||||
/* f022e04: 0c0092dd */ jal func00023794
|
||||
/* f022e04: 0c0092dd */ jal animHasFrames
|
||||
/* f022e08: 84844e82 */ lh $a0,0x4e82($a0)
|
||||
/* f022e0c: 10400025 */ beqz $v0,.NB0f022ea4
|
||||
/* f022e10: 00000000 */ sll $zero,$zero,0x0
|
||||
@@ -10038,7 +10038,7 @@ glabel var7f1a87d8
|
||||
/* f022e30: 8fa40208 */ lw $a0,0x208($sp)
|
||||
/* f022e34: 00022400 */ sll $a0,$v0,0x10
|
||||
/* f022e38: 00046c03 */ sra $t5,$a0,0x10
|
||||
/* f022e3c: 0c0092dd */ jal func00023794
|
||||
/* f022e3c: 0c0092dd */ jal animHasFrames
|
||||
/* f022e40: 01a02025 */ or $a0,$t5,$zero
|
||||
/* f022e44: 14400017 */ bnez $v0,.NB0f022ea4
|
||||
/* f022e48: 3c038006 */ lui $v1,0x8006
|
||||
|
||||
@@ -8,7 +8,7 @@ void func000233c0(void);
|
||||
u32 func00023640(void);
|
||||
void func0002373c(void);
|
||||
s32 animGetNumFrames(s16 anim_id);
|
||||
bool func00023794(s16 animnum);
|
||||
bool animHasFrames(s16 animnum);
|
||||
s32 getNumAnimations(void);
|
||||
u32 func000237e8(void);
|
||||
s32 func0002384c(s32 animnum, s32 frame);
|
||||
|
||||
+5
-23
@@ -28,7 +28,7 @@ struct animheader *var8009a898;
|
||||
|
||||
u32 var8005f000 = 0x00000000;
|
||||
u32 var8005f004 = 0x00000000;
|
||||
s16 g_NumAnimations = 0x00000000;
|
||||
s16 g_NumAnimations = 0;
|
||||
struct animheader *g_Anims = NULL;
|
||||
u32 var8005f010 = 0x00000000;
|
||||
u32 var8005f014 = 0x00000000;
|
||||
@@ -297,28 +297,10 @@ s32 animGetNumFrames(s16 animnum)
|
||||
return g_Anims[animnum].numframes;
|
||||
}
|
||||
|
||||
GLOBAL_ASM(
|
||||
glabel func00023794
|
||||
/* 23794: 3c188006 */ lui $t8,%hi(g_NumAnimations)
|
||||
/* 23798: 8718f008 */ lh $t8,%lo(g_NumAnimations)($t8)
|
||||
/* 2379c: 00047400 */ sll $t6,$a0,0x10
|
||||
/* 237a0: 000e7c03 */ sra $t7,$t6,0x10
|
||||
/* 237a4: 01f8102a */ slt $v0,$t7,$t8
|
||||
/* 237a8: 1040000a */ beqz $v0,.L000237d4
|
||||
/* 237ac: afa40000 */ sw $a0,0x0($sp)
|
||||
/* 237b0: 3c198006 */ lui $t9,%hi(g_Anims)
|
||||
/* 237b4: 8f39f00c */ lw $t9,%lo(g_Anims)($t9)
|
||||
/* 237b8: 000f4080 */ sll $t0,$t7,0x2
|
||||
/* 237bc: 010f4023 */ subu $t0,$t0,$t7
|
||||
/* 237c0: 00084080 */ sll $t0,$t0,0x2
|
||||
/* 237c4: 03284821 */ addu $t1,$t9,$t0
|
||||
/* 237c8: 95220000 */ lhu $v0,0x0($t1)
|
||||
/* 237cc: 0002502a */ slt $t2,$zero,$v0
|
||||
/* 237d0: 01401025 */ or $v0,$t2,$zero
|
||||
.L000237d4:
|
||||
/* 237d4: 03e00008 */ jr $ra
|
||||
/* 237d8: 00000000 */ nop
|
||||
);
|
||||
bool animHasFrames(s16 animnum)
|
||||
{
|
||||
return animnum < g_NumAnimations && g_Anims[animnum].numframes > 0;
|
||||
}
|
||||
|
||||
s32 getNumAnimations(void)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user