From 337044901a975a45513034c5f6be23d7a5cd9207 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Fri, 27 Dec 2019 17:04:30 +1000 Subject: [PATCH] Decompile ciIsTourDone --- src/game/game_066310.c | 2 +- src/game/game_102240.c | 2 +- src/game/game_19c990.c | 15 ++++----------- src/include/game/game_19c990.h | 2 +- 4 files changed, 7 insertions(+), 14 deletions(-) diff --git a/src/game/game_066310.c b/src/game/game_066310.c index 1356f7f1e..66cbab2bf 100644 --- a/src/game/game_066310.c +++ b/src/game/game_066310.c @@ -38109,7 +38109,7 @@ glabel func0f086f40 /* f086f58: afae0034 */ sw $t6,0x34($sp) /* f086f5c: 1040008c */ beqz $v0,.L0f087190 /* f086f60: afa2002c */ sw $v0,0x2c($sp) -/* f086f64: 0fc67264 */ jal func0f19c990 +/* f086f64: 0fc67264 */ jal ciIsTourDone /* f086f68: a3a0002b */ sb $zero,0x2b($sp) /* f086f6c: 5040003f */ beqzl $v0,.L0f08706c /* f086f70: 93ac002b */ lbu $t4,0x2b($sp) diff --git a/src/game/game_102240.c b/src/game/game_102240.c index 69f77a56c..00b2b98d4 100644 --- a/src/game/game_102240.c +++ b/src/game/game_102240.c @@ -5536,7 +5536,7 @@ glabel func0f106b20 /* f106b70: 3c048007 */ lui $a0,%hi(menudialog_196b0) /* f106b74: 15010067 */ bne $t0,$at,.L0f106d14 /* f106b78: 24843690 */ addiu $a0,$a0,%lo(menudialog_196b0) -/* f106b7c: 0fc67264 */ jal func0f19c990 +/* f106b7c: 0fc67264 */ jal ciIsTourDone /* f106b80: afa0001c */ sw $zero,0x1c($sp) /* f106b84: 1040005c */ beqz $v0,.L0f106cf8 /* f106b88: 8fa5001c */ lw $a1,0x1c($sp) diff --git a/src/game/game_19c990.c b/src/game/game_19c990.c index 15a2be63e..f8db1f916 100644 --- a/src/game/game_19c990.c +++ b/src/game/game_19c990.c @@ -398,17 +398,10 @@ const u32 var7f1b97c4[] = {0x7f1a2d14}; const u32 var7f1b97c8[] = {0x7f1a2d38}; const u32 var7f1b97cc[] = {0x4019999a}; -GLOBAL_ASM( -glabel func0f19c990 -/* f19c990: 27bdffe8 */ addiu $sp,$sp,-24 -/* f19c994: afbf0014 */ sw $ra,0x14($sp) -/* f19c998: 0fc43c63 */ jal eepromGet -/* f19c99c: 24040024 */ addiu $a0,$zero,0x24 -/* f19c9a0: 8fbf0014 */ lw $ra,0x14($sp) -/* f19c9a4: 27bd0018 */ addiu $sp,$sp,0x18 -/* f19c9a8: 03e00008 */ jr $ra -/* f19c9ac: 00000000 */ sll $zero,$zero,0x0 -); +bool ciIsTourDone(void) +{ + return eepromGet(EEPROMFLAG_CI_TOUR_DONE); +} u8 ciGetFiringRangeScore(s32 weapon_id) { diff --git a/src/include/game/game_19c990.h b/src/include/game/game_19c990.h index 46ea05e32..2595573d9 100644 --- a/src/include/game/game_19c990.h +++ b/src/include/game/game_19c990.h @@ -3,7 +3,7 @@ #include #include "types.h" -u32 func0f19c990(void); +bool ciIsTourDone(void); u8 ciGetFiringRangeScore(s32 weapon_id); u32 func0f19c9e4(void); u32 func0f19cad4(void);