Decompile chopperGetTimer

This commit is contained in:
Ryan Dwyer 2020-06-28 19:00:44 +10:00
parent adce48a7ae
commit e0006d5772
2 changed files with 7 additions and 22 deletions

View File

@ -24327,27 +24327,12 @@ void chopperRestartTimer(struct chopperobj *obj)
}
}
GLOBAL_ASM(
glabel chopperGetTimer
.late_rodata
glabel var7f1aa5c8
.word 0x3c888889
.text
/* f07b120: 27bdffe8 */ addiu $sp,$sp,-24
/* f07b124: afbf0014 */ sw $ra,0x14($sp)
/* f07b128: 0fc1eb7d */ jal chopperFromHovercar
/* f07b12c: 00000000 */ nop
/* f07b130: 8c4e00c0 */ lw $t6,0xc0($v0)
/* f07b134: 3c017f1b */ lui $at,%hi(var7f1aa5c8)
/* f07b138: c428a5c8 */ lwc1 $f8,%lo(var7f1aa5c8)($at)
/* f07b13c: 448e2000 */ mtc1 $t6,$f4
/* f07b140: 8fbf0014 */ lw $ra,0x14($sp)
/* f07b144: 27bd0018 */ addiu $sp,$sp,0x18
/* f07b148: 468021a0 */ cvt.s.w $f6,$f4
/* f07b14c: 46083002 */ mul.s $f0,$f6,$f8
/* f07b150: 03e00008 */ jr $ra
/* f07b154: 00000000 */ nop
);
f32 chopperGetTimer(struct chopperobj *obj)
{
struct chopperobj *chopper = chopperFromHovercar(obj);
return chopper->timer60 * FRAMEDURATION;
}
void chopperSetMaxDamage(struct chopperobj *chopper, s16 health)
{

View File

@ -1274,7 +1274,7 @@ struct chopperobj {
/*0xb4*/ f32 bob;
/*0xb8*/ f32 bobstrength;
/*0xbc*/ u32 targetvisible;
/*0xc0*/ u32 timer60;
/*0xc0*/ s32 timer60;
/*0xc4*/ u32 patroltimer60;
/*0xc8*/ u32 gunturnyspeed60;
/*0xcc*/ u32 gunturnxspeed60;