From e7432c71fa8ec4ecb7ae5f123363cd02a2ad2481 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Mon, 21 Oct 2019 17:36:45 +1000 Subject: [PATCH] Decompile aiHovercopterFireRocket --- src/game/chr/chraicommands.c | 30 ++++++++-------------------- src/include/game/chr/chraicommands.h | 2 +- src/setup/setup_000000.c | 2 +- 3 files changed, 10 insertions(+), 24 deletions(-) diff --git a/src/game/chr/chraicommands.c b/src/game/chr/chraicommands.c index 8c210391b..9fb1995f4 100644 --- a/src/game/chr/chraicommands.c +++ b/src/game/chr/chraicommands.c @@ -14471,28 +14471,14 @@ glabel aiIfAction /** * @cmd 0167 */ -GLOBAL_ASM( -glabel ai0167 -/* f05c3e8: 3c03800a */ lui $v1,0x800a -/* f05c3ec: 24639fc0 */ addiu $v1,$v1,-24640 -/* f05c3f0: 8c6e0434 */ lw $t6,0x434($v1) -/* f05c3f4: 8c6f0438 */ lw $t7,0x438($v1) -/* f05c3f8: 27bdffe8 */ addiu $sp,$sp,-24 -/* f05c3fc: afbf0014 */ sw $ra,0x14($sp) -/* f05c400: 01cf1021 */ addu $v0,$t6,$t7 -/* f05c404: 90450002 */ lbu $a1,0x2($v0) -/* f05c408: 0fc1eca4 */ jal func0f07b290 -/* f05c40c: 8c640430 */ lw $a0,0x430($v1) -/* f05c410: 3c03800a */ lui $v1,0x800a -/* f05c414: 24639fc0 */ addiu $v1,$v1,-24640 -/* f05c418: 8c780438 */ lw $t8,0x438($v1) -/* f05c41c: 8fbf0014 */ lw $ra,0x14($sp) -/* f05c420: 27bd0018 */ addiu $sp,$sp,0x18 -/* f05c424: 27190003 */ addiu $t9,$t8,0x3 -/* f05c428: ac790438 */ sw $t9,0x438($v1) -/* f05c42c: 03e00008 */ jr $ra -/* f05c430: 00001025 */ or $v0,$zero,$zero -); +bool aiHovercopterFireRocket(void) +{ + u8 *cmd = g_Vars.ailist + g_Vars.aioffset; + func0f07b290(g_Vars.aiddata, cmd[2]); + g_Vars.aioffset += 3; + + return false; +} /** * @cmd 0169 diff --git a/src/include/game/chr/chraicommands.h b/src/include/game/chr/chraicommands.h index 15ac8a18d..abf16cc59 100644 --- a/src/include/game/chr/chraicommands.h +++ b/src/include/game/chr/chraicommands.h @@ -336,7 +336,7 @@ /*0x015c*/ bool aiAudioRestartMusic(void); /*0x0165*/ bool aiIfChrInjured(void); /*0x0166*/ bool aiIfAction(void); -/*0x0167*/ bool ai0167(void); +/*0x0167*/ bool aiHovercopterFireRocket(void); /*0x0168*/ bool ai0168(void); /*0x0169*/ bool ai0169(void); /*0x016a*/ bool ai016a(void); diff --git a/src/setup/setup_000000.c b/src/setup/setup_000000.c index 979273bc9..846d335df 100644 --- a/src/setup/setup_000000.c +++ b/src/setup/setup_000000.c @@ -14312,7 +14312,7 @@ bool (*command_pointers[])(void) = { /*0x0164*/ NULL, /*0x0165*/ aiIfChrInjured, /*0x0166*/ aiIfAction, - /*0x0167*/ ai0167, + /*0x0167*/ aiHovercopterFireRocket, /*0x0168*/ ai0168, /*0x0169*/ ai0169, /*0x016a*/ ai016a,