Decompile modelSetAnimLooping

This commit is contained in:
Ryan Dwyer
2020-06-29 22:55:19 +10:00
parent a1cfb0da27
commit 76882bc831
7 changed files with 19 additions and 27 deletions
+5 -5
View File
@@ -532,10 +532,10 @@ void chrStandChooseAnimation(struct chrdata *chr, f32 arg1)
|| weaponIsOneHanded(gun1)
|| weaponIsOneHanded(gun2)) {
modelSetAnimation(chr->model, 0x6a, random() % 2, 0, 0.25, arg1);
func0001ddec(chr->model, 0, 16);
modelSetAnimLooping(chr->model, 0, 16);
} else if (gun2 || gun1) {
modelSetAnimation(chr->model, 0x01, gun1 != NULL, 0, 0.25, arg1);
func0001ddec(chr->model, 0, 16);
modelSetAnimLooping(chr->model, 0, 16);
func0001de1c(chr->model, 120);
}
} else if (race == RACE_SKEDAR) {
@@ -864,7 +864,7 @@ void chrSurrenderChooseAnimation(struct chrdata *chr)
if (gun0 || gun1) {
modelSetAnimation(chr->model, ANIM_SURRENDER_002F, random() & 1, 0, 0.5, 16);
func0001ddec(chr->model, 40, 16);
modelSetAnimLooping(chr->model, 40, 16);
if (gun1) {
propobjSetDropped(gun1, 2);
@@ -877,7 +877,7 @@ void chrSurrenderChooseAnimation(struct chrdata *chr)
chr->hidden |= CHRHFLAG_00000001;
} else {
modelSetAnimation(chr->model, ANIM_SURRENDER_002E, random() & 1, 0, 0.5, 16);
func0001ddec(chr->model, 30, 16);
modelSetAnimLooping(chr->model, 30, 16);
}
chrDropItems(chr);
@@ -12942,7 +12942,7 @@ void chrTickSurrender(struct chrdata *chr)
if (!propchrHasClearLineInVector(chr->prop, &coord, 20)) {
modelSetAnimation(chr->model, ANIM_SURRENDER_002E, random() & 1, 30, 0.5, 16);
func0001ddec(chr->model, 30, 16);
modelSetAnimLooping(chr->model, 30, 16);
}
}
}
+1 -1
View File
@@ -327,7 +327,7 @@ glabel func0f012684
/* f012a2c: 01b30019 */ multu $t5,$s3
/* f012a30: 00007012 */ mflo $t6
/* f012a34: 024ec021 */ addu $t8,$s2,$t6
/* f012a38: 0c00777b */ jal func0001ddec
/* f012a38: 0c00777b */ jal modelSetAnimLooping
/* f012a3c: 8f050004 */ lw $a1,0x4($t8)
/* f012a40: 8e300284 */ lw $s0,0x284($s1)
/* f012a44: 8e1903ac */ lw $t9,0x3ac($s0)
+1 -1
View File
@@ -15030,7 +15030,7 @@ glabel var7f1ad744
/* f0c3200: c7a4002c */ lwc1 $f4,0x2c($sp)
/* f0c3204: 8de40020 */ lw $a0,0x20($t7)
/* f0c3208: 44051000 */ mfc1 $a1,$f2
/* f0c320c: 0c00777b */ jal func0001ddec
/* f0c320c: 0c00777b */ jal modelSetAnimLooping
/* f0c3210: afa80048 */ sw $t0,0x48($sp)
/* f0c3214: 8fa80048 */ lw $t0,0x48($sp)
/* f0c3218: c7a4002c */ lwc1 $f4,0x2c($sp)
+1 -1
View File
@@ -667,7 +667,7 @@ glabel func0f113f10
/* f113ffc: 8c84a244 */ lw $a0,%lo(g_Vars+0x284)($a0)
/* f114000: 8e050004 */ lw $a1,0x4($s0)
/* f114004: 24060000 */ addiu $a2,$zero,0x0
/* f114008: 0c00777b */ jal func0001ddec
/* f114008: 0c00777b */ jal modelSetAnimLooping
/* f11400c: 2484045c */ addiu $a0,$a0,1116
/* f114010: 3c04800a */ lui $a0,%hi(g_Vars+0x284)
/* f114014: 8c84a244 */ lw $a0,%lo(g_Vars+0x284)($a0)
+1 -1
View File
@@ -64,7 +64,7 @@ u32 func0001db94(struct model *model);
void func0001dbfc(struct model *model, s32 arg1, u32 arg2, f32 arg3, f32 arg4, f32 arg5);
void modelSetAnimation(struct model *model, s16 animnum, s32 flip, f32 fstartframe, f32 arg4, f32 arg5);
u32 func0001dd90(void);
void func0001ddec(struct model *model, f32 arg1, f32 arg2);
void modelSetAnimLooping(struct model *model, f32 loopframe, f32 loopmerge);
void func0001de1c(struct model *model, f32 speed);
u32 func0001de98(void);
void func0001deb0(struct model *model, f32 speed, f32 startframe);
+2 -2
View File
@@ -136,8 +136,8 @@ struct anim {
/*0x54*/ u32 fracmerge;
/*0x58*/ u32 timemerge;
/*0x5c*/ u32 elapsemerge;
/*0x60*/ u32 loopframe;
/*0x64*/ u32 loopmerge;
/*0x60*/ f32 loopframe;
/*0x64*/ f32 loopmerge;
/*0x68*/ u32 unk68;
/*0x6c*/ u32 unk6c;
/*0x70*/ void *unk70; // pointer to function
+8 -16
View File
@@ -4316,22 +4316,14 @@ glabel func0001dd90
/* 1dde8: 00000000 */ nop
);
GLOBAL_ASM(
glabel func0001ddec
/* 1ddec: 8c820020 */ lw $v0,0x20($a0)
/* 1ddf0: 44856000 */ mtc1 $a1,$f12
/* 1ddf4: 44867000 */ mtc1 $a2,$f14
/* 1ddf8: 10400006 */ beqz $v0,.L0001de14
/* 1ddfc: 240e0001 */ addiu $t6,$zero,0x1
/* 1de00: a04e000a */ sb $t6,0xa($v0)
/* 1de04: 8c8f0020 */ lw $t7,0x20($a0)
/* 1de08: e5ec0060 */ swc1 $f12,0x60($t7)
/* 1de0c: 8c980020 */ lw $t8,0x20($a0)
/* 1de10: e70e0064 */ swc1 $f14,0x64($t8)
.L0001de14:
/* 1de14: 03e00008 */ jr $ra
/* 1de18: 00000000 */ nop
);
void modelSetAnimLooping(struct model *model, f32 loopframe, f32 loopmerge)
{
if (model->anim) {
model->anim->looping = true;
model->anim->loopframe = loopframe;
model->anim->loopmerge = loopmerge;
}
}
GLOBAL_ASM(
glabel func0001de1c