From 0e3d78e421170e6c46c3ce86aa75b7e616a58f50 Mon Sep 17 00:00:00 2001 From: SuperDude88 <82904174+SuperDude88@users.noreply.github.com> Date: Sun, 25 Feb 2024 00:39:33 -0500 Subject: [PATCH] Minor Cleanup Clarify comments, add missing inline --- include/d/d_com_inf_game.h | 10 +++++++--- src/d/actor/d_a_npc_ji1.cpp | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/include/d/d_com_inf_game.h b/include/d/d_com_inf_game.h index 350291090..002295c5f 100644 --- a/include/d/d_com_inf_game.h +++ b/include/d/d_com_inf_game.h @@ -462,6 +462,12 @@ public: u8 getMiniGameType() { return mMiniGameType; } + void endMiniGame(u16 param_1) { + mMiniGameType = 0; + field_0x4A38 ^= 1 << (param_1 - 1); // toggle Nth bit + field_0x4A3E = 0; + } + void show2dOn() { m2dShow = true; } void show2dOff() { m2dShow = false; } bool show2dCheck() { return m2dShow; } @@ -2252,9 +2258,7 @@ inline u8 dComIfGp_getMiniGameType() { } inline void dComIfGp_endMiniGame(u16 param_1) { - g_dComIfG_gameInfo.play.mMiniGameType = 0; - g_dComIfG_gameInfo.play.field_0x4A38 ^= 1 << param_1 - 1; // what - g_dComIfG_gameInfo.play.field_0x4A3E = 0; + g_dComIfG_gameInfo.play.endMiniGame(param_1); } inline u8 dComIfGp_getAStatus() { diff --git a/src/d/actor/d_a_npc_ji1.cpp b/src/d/actor/d_a_npc_ji1.cpp index 4d2879804..e7e7d2b51 100644 --- a/src/d/actor/d_a_npc_ji1.cpp +++ b/src/d/actor/d_a_npc_ji1.cpp @@ -330,7 +330,7 @@ BOOL daNpc_Ji1_c::isClearRecord(s16 param_1) { } u8 level = dComIfGs_getEventReg(0xD003); - return param_1 >= l_HIO.field_0x60[level] ? TRUE : FALSE; // has a clrlwi without the ternary + int literal defines + return param_1 >= l_HIO.field_0x60[level] ? TRUE : FALSE; // has a clrlwi without the ternary + TRUE/FALSE macros } /* 00000630-000006F8 .text setClearRecord__11daNpc_Ji1_cFs */