From 0edd1b51317682d0efc6fcd82c9982abfe7182ac Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Thu, 10 Oct 2019 22:28:09 +1000 Subject: [PATCH] Decompile aiShowCountdownTimer --- src/game/chr/chraicommands.c | 30 ++++++++++------------------ src/game/game_0601b0.c | 2 +- src/include/game/chr/chraicommands.h | 2 +- src/setup/setup_000000.c | 2 +- 4 files changed, 13 insertions(+), 23 deletions(-) diff --git a/src/game/chr/chraicommands.c b/src/game/chr/chraicommands.c index 0f7c6f4be..f8139de39 100644 --- a/src/game/chr/chraicommands.c +++ b/src/game/chr/chraicommands.c @@ -7993,23 +7993,13 @@ glabel ai00bd /** * @cmd 00be */ -GLOBAL_ASM( -glabel ai00be -/* f055344: 27bdffe8 */ addiu $sp,$sp,-24 -/* f055348: afbf0014 */ sw $ra,0x14($sp) -/* f05534c: 24040001 */ addiu $a0,$zero,0x1 -/* f055350: 0fc24202 */ jal func0f090808 -/* f055354: 24050001 */ addiu $a1,$zero,0x1 -/* f055358: 3c03800a */ lui $v1,0x800a -/* f05535c: 24639fc0 */ addiu $v1,$v1,-24640 -/* f055360: 8c6e0438 */ lw $t6,0x438($v1) -/* f055364: 8fbf0014 */ lw $ra,0x14($sp) -/* f055368: 27bd0018 */ addiu $sp,$sp,0x18 -/* f05536c: 25cf0002 */ addiu $t7,$t6,0x2 -/* f055370: ac6f0438 */ sw $t7,0x438($v1) -/* f055374: 03e00008 */ jr $ra -/* f055378: 00001025 */ or $v0,$zero,$zero -); +bool aiShowCountdownTimer(void) +{ + countdownTimerSetVisible(true, true); + g_Vars.aioffset += 2; + + return false; +} /** * @cmd 00bf @@ -8019,7 +8009,7 @@ glabel ai00bf /* f05537c: 27bdffe8 */ addiu $sp,$sp,-24 /* f055380: afbf0014 */ sw $ra,0x14($sp) /* f055384: 24040001 */ addiu $a0,$zero,0x1 -/* f055388: 0fc24202 */ jal func0f090808 +/* f055388: 0fc24202 */ jal countdownTimerSetVisible /* f05538c: 00002825 */ or $a1,$zero,$zero /* f055390: 3c03800a */ lui $v1,0x800a /* f055394: 24639fc0 */ addiu $v1,$v1,-24640 @@ -10597,7 +10587,7 @@ glabel ai00e0 .L0f0575a8: /* f0575a8: 15600003 */ bnez $t3,.L0f0575b8 /* f0575ac: 24040010 */ addiu $a0,$zero,0x10 -/* f0575b0: 0fc24202 */ jal func0f090808 +/* f0575b0: 0fc24202 */ jal countdownTimerSetVisible /* f0575b4: 00002825 */ or $a1,$zero,$zero .L0f0575b8: /* f0575b8: 8e0c028c */ lw $t4,0x28c($s0) @@ -10658,7 +10648,7 @@ glabel ai00e1 /* f057674: 0fc37e87 */ jal func0f0dfa1c /* f057678: 24040002 */ addiu $a0,$zero,0x2 /* f05767c: 24040010 */ addiu $a0,$zero,0x10 -/* f057680: 0fc24202 */ jal func0f090808 +/* f057680: 0fc24202 */ jal countdownTimerSetVisible /* f057684: 24050001 */ addiu $a1,$zero,0x1 /* f057688: 8e09028c */ lw $t1,0x28c($s0) /* f05768c: 3c018007 */ lui $at,0x8007 diff --git a/src/game/game_0601b0.c b/src/game/game_0601b0.c index a77136e48..344cb3800 100644 --- a/src/game/game_0601b0.c +++ b/src/game/game_0601b0.c @@ -54845,7 +54845,7 @@ glabel func0f09054c ); GLOBAL_ASM( -glabel func0f090808 +glabel countdownTimerSetVisible /* f090808: 10a00008 */ beqz $a1,.L0f09082c /* f09080c: 3c028007 */ lui $v0,0x8007 /* f090810: 3c028007 */ lui $v0,0x8007 diff --git a/src/include/game/chr/chraicommands.h b/src/include/game/chr/chraicommands.h index deb98e25a..cb81586fa 100644 --- a/src/include/game/chr/chraicommands.h +++ b/src/include/game/chr/chraicommands.h @@ -192,7 +192,7 @@ /*0x00bb*/ bool aiIfTimerGreaterThanRandom(void); /*0x00bc*/ bool ai00bc(void); /*0x00bd*/ bool ai00bd(void); -/*0x00be*/ bool ai00be(void); +/*0x00be*/ bool aiShowCountdownTimer(void); /*0x00bf*/ bool ai00bf(void); /*0x00c0*/ bool ai00c0(void); /*0x00c1*/ bool ai00c1(void); diff --git a/src/setup/setup_000000.c b/src/setup/setup_000000.c index 1980c3777..73cafb032 100644 --- a/src/setup/setup_000000.c +++ b/src/setup/setup_000000.c @@ -14139,7 +14139,7 @@ bool (*command_pointers[])(void) = { /*0x00bb*/ aiIfTimerGreaterThanRandom, /*0x00bc*/ ai00bc, /*0x00bd*/ ai00bd, - /*0x00be*/ ai00be, + /*0x00be*/ aiShowCountdownTimer, /*0x00bf*/ ai00bf, /*0x00c0*/ ai00c0, /*0x00c1*/ ai00c1,