Decompile modelGetAnimSpeed
This commit is contained in:
parent
e10ced1277
commit
a1cfb0da27
|
|
@ -10427,8 +10427,8 @@ bool chrIsStopped(struct chrdata *chr)
|
|||
|
||||
if (chr->actiontype == ACT_ANIM) {
|
||||
if (chr->act_anim.unk034
|
||||
|| (func0001d260(chr->model) >= 0 && modelGetCurAnimFrame(chr->model) >= func0001d1a0(chr->model))
|
||||
|| (func0001d260(chr->model) < 0 && modelGetCurAnimFrame(chr->model) <= 0)) {
|
||||
|| (modelGetAnimSpeed(chr->model) >= 0 && modelGetCurAnimFrame(chr->model) >= func0001d1a0(chr->model))
|
||||
|| (modelGetAnimSpeed(chr->model) < 0 && modelGetCurAnimFrame(chr->model) <= 0)) {
|
||||
return true;
|
||||
}
|
||||
} else if (chr->actiontype == ACT_PATROL) {
|
||||
|
|
|
|||
|
|
@ -15049,7 +15049,7 @@ glabel var7f1ad744
|
|||
/* f0c3248: 8fa80048 */ lw $t0,0x48($sp)
|
||||
/* f0c324c: afa80048 */ sw $t0,0x48($sp)
|
||||
.L0f0c3250:
|
||||
/* f0c3250: 0c007498 */ jal func0001d260
|
||||
/* f0c3250: 0c007498 */ jal modelGetAnimSpeed
|
||||
/* f0c3254: e7b20044 */ swc1 $f18,0x44($sp)
|
||||
/* f0c3258: c7b20044 */ lwc1 $f18,0x44($sp)
|
||||
/* f0c325c: 8fa80048 */ lw $t0,0x48($sp)
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ bool modelIsFlipped(struct model *model);
|
|||
f32 modelGetCurAnimFrame(struct model *model);
|
||||
f32 func0001d1a0(struct model *model);
|
||||
s32 func0001d218(struct model *model);
|
||||
f32 func0001d260(struct model *model);
|
||||
f32 modelGetAnimSpeed(struct model *model);
|
||||
f32 func0001d288(struct model *model);
|
||||
u32 func0001d320(void);
|
||||
u32 func0001d4fc(void);
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ struct anim {
|
|||
/*0x14*/ s16 framea;
|
||||
/*0x16*/ s16 frameb;
|
||||
/*0x18*/ u32 endrame;
|
||||
/*0x1c*/ u32 speed;
|
||||
/*0x1c*/ f32 speed;
|
||||
/*0x20*/ u32 newspeed;
|
||||
/*0x24*/ u32 oldspeed;
|
||||
/*0x28*/ u32 timespeed;
|
||||
|
|
|
|||
|
|
@ -3499,20 +3499,14 @@ glabel func0001d218
|
|||
/* 1d25c: 00000000 */ nop
|
||||
);
|
||||
|
||||
GLOBAL_ASM(
|
||||
glabel func0001d260
|
||||
/* 1d260: 8c820020 */ lw $v0,0x20($a0)
|
||||
/* 1d264: 3c013f80 */ lui $at,0x3f80
|
||||
/* 1d268: 50400004 */ beqzl $v0,.L0001d27c
|
||||
/* 1d26c: 44810000 */ mtc1 $at,$f0
|
||||
/* 1d270: 03e00008 */ jr $ra
|
||||
/* 1d274: c440001c */ lwc1 $f0,0x1c($v0)
|
||||
/* 1d278: 44810000 */ mtc1 $at,$f0
|
||||
.L0001d27c:
|
||||
/* 1d27c: 00000000 */ nop
|
||||
/* 1d280: 03e00008 */ jr $ra
|
||||
/* 1d284: 00000000 */ nop
|
||||
);
|
||||
f32 modelGetAnimSpeed(struct model *model)
|
||||
{
|
||||
if (model->anim) {
|
||||
return model->anim->speed;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
GLOBAL_ASM(
|
||||
glabel func0001d288
|
||||
|
|
@ -3542,7 +3536,7 @@ glabel func0001d288
|
|||
/* 1d2dc: 3c013f80 */ lui $at,0x3f80
|
||||
/* 1d2e0: 51c0000a */ beqzl $t6,.L0001d30c
|
||||
/* 1d2e4: 44810000 */ mtc1 $at,$f0
|
||||
/* 1d2e8: 0c007498 */ jal func0001d260
|
||||
/* 1d2e8: 0c007498 */ jal modelGetAnimSpeed
|
||||
/* 1d2ec: afa40018 */ sw $a0,0x18($sp)
|
||||
/* 1d2f0: 8fa40018 */ lw $a0,0x18($sp)
|
||||
/* 1d2f4: 8c8f0020 */ lw $t7,0x20($a0)
|
||||
|
|
|
|||
Loading…
Reference in New Issue