Decompile heliTryStop

This commit is contained in:
Ryan Dwyer
2020-01-14 21:59:09 +10:00
parent 560548ced5
commit 5e27cf969d
3 changed files with 16 additions and 24 deletions
+14 -22
View File
@@ -24773,28 +24773,20 @@ glabel func0f07b038
/* f07b074: 00000000 */ sll $zero,$zero,0x0
);
GLOBAL_ASM(
glabel heliTryStop
/* f07b078: 27bdffe8 */ addiu $sp,$sp,-24
/* f07b07c: afbf0014 */ sw $ra,0x14($sp)
/* f07b080: 0fc1eb7d */ jal heliFromObj
/* f07b084: 00000000 */ sll $zero,$zero,0x0
/* f07b088: 10400007 */ beqz $v0,.L0f07b0a8
/* f07b08c: 240e0078 */ addiu $t6,$zero,0x78
/* f07b090: 44802000 */ mtc1 $zero,$f4
/* f07b094: a0400096 */ sb $zero,0x96($v0)
/* f07b098: ac4e00c4 */ sw $t6,0xc4($v0)
/* f07b09c: e44400a4 */ swc1 $f4,0xa4($v0)
/* f07b0a0: 10000002 */ beqz $zero,.L0f07b0ac
/* f07b0a4: 24020001 */ addiu $v0,$zero,0x1
.L0f07b0a8:
/* f07b0a8: 00001025 */ or $v0,$zero,$zero
.L0f07b0ac:
/* f07b0ac: 8fbf0014 */ lw $ra,0x14($sp)
/* f07b0b0: 27bd0018 */ addiu $sp,$sp,0x18
/* f07b0b4: 03e00008 */ jr $ra
/* f07b0b8: 00000000 */ sll $zero,$zero,0x0
);
bool heliTryStop(struct defaultobj *obj)
{
struct heliobj *heli = heliFromObj(obj);
if (heli) {
heli->attackmode = 0;
heli->patroltimer60 = 120;
heli->power = 0;
return true;
}
return false;
}
bool heliSetArmed(struct defaultobj *obj, bool armed)
{
+1 -1
View File
@@ -166,7 +166,7 @@ u32 func0f07ae18(struct heliobj *heli, u32 arg1);
u32 func0f07af34(struct heliobj *heli);
void heliSetTarget(struct heliobj *heli, s32 arg1);
u32 func0f07b038(struct heliobj *heli);
void heliTryStop(struct heliobj *heli);
bool heliTryStop(struct defaultobj *obj);
bool heliSetArmed(struct defaultobj *obj, bool armed);
void heliRestartTimer(struct defaultobj *obj);
f32 heliGetTimer(struct heliobj *heli);
+1 -1
View File
@@ -823,7 +823,7 @@ struct heliobj {
/*0x98*/ u32 vx;
/*0x9c*/ u32 vy;
/*0xa0*/ u32 vz;
/*0xa4*/ u32 power;
/*0xa4*/ f32 power;
/*0xa8*/ u32 otx;
/*0xac*/ u32 oty;
/*0xb0*/ u32 otz;