From b84d229c2f115dc5001b1c2942dc86f9b2417126 Mon Sep 17 00:00:00 2001 From: LagoLunatic Date: Wed, 18 Oct 2023 14:58:01 -0400 Subject: [PATCH] d_com_inf_game minor fixes --- include/d/d_com_inf_game.h | 4 ++-- include/m_Do/m_Do_ext.h | 2 +- src/d/d_com_inf_game.cpp | 48 ++++---------------------------------- 3 files changed, 8 insertions(+), 46 deletions(-) diff --git a/include/d/d_com_inf_game.h b/include/d/d_com_inf_game.h index acc926511..f115fc8ae 100644 --- a/include/d/d_com_inf_game.h +++ b/include/d/d_com_inf_game.h @@ -290,7 +290,7 @@ public: return mCameraInfo[idx].mCameraAttentionStatus & flag; } - ~dComIfG_play_c(); + ~dComIfG_play_c() {} dStage_roomControl_c* getRoomControl() { return &mRoomCtrl; } dStage_stageDt_c& getStage() { return mStageData; } @@ -984,7 +984,7 @@ inline void dComIfGs_onStageLife() { g_dComIfG_gameInfo.save.getMemory().getBit().onStageLife(); } -inline void dComIfGs_onStageLife(int i_stageNo); +void dComIfGs_onStageLife(int i_stageNo); inline BOOL dComIfGs_isStageLife() { return g_dComIfG_gameInfo.save.getMemory().getBit().isStageLife(); diff --git a/include/m_Do/m_Do_ext.h b/include/m_Do/m_Do_ext.h index f0cef8fa6..d0e7ba739 100644 --- a/include/m_Do/m_Do_ext.h +++ b/include/m_Do/m_Do_ext.h @@ -289,7 +289,7 @@ struct mDoExt_MtxCalcAnmBlendTblOld : public mDoExt_MtxCalcAnmBlendTbl { class mDoExt_McaMorfCallBack1_c { public: - virtual ~mDoExt_McaMorfCallBack1_c(); + virtual ~mDoExt_McaMorfCallBack1_c() {} virtual void execute(u16, J3DTransformInfo*) = 0; }; diff --git a/src/d/d_com_inf_game.cpp b/src/d/d_com_inf_game.cpp index 5a793e7c9..9f5c8ff22 100644 --- a/src/d/d_com_inf_game.cpp +++ b/src/d/d_com_inf_game.cpp @@ -77,7 +77,7 @@ void dComIfG_play_c::itemInit() { mItemMaxLifeCount = 0; mItemMagicCount = 0; field_0x48da = 0; - field_0x48dc = 0; + mItemMaxMagicCount = 0; field_0x48de = 0; mItemArrowNumCount = 0; field_0x48e2 = 0; @@ -146,7 +146,7 @@ void dComIfG_play_c::itemInit() { field_0x4955 = 0; field_0x4956 = 0; mPlacenameIndex = 0; - field_0x4958 = 0; + mPlacenameState = 0; field_0x4959 = 0; field_0x495a = 0; field_0x495b = 0; @@ -156,7 +156,7 @@ void dComIfG_play_c::itemInit() { field_0x495f = 0; field_0x4960 = 0; field_0x4961 = 0; - field_0x4962 = 0; + mHeapLockFlag = 0; field_0x4965 = 0; strcpy(field_0x4966, "\0"); @@ -811,27 +811,8 @@ u8 dComIfGs_checkGetItem(u8 i_itemNo) { } break; default: - u8 item = 0; for (int i = 0; i < 60; i++) { - if (i < 21) { - item = dComIfGs_getItem(i); - } else if (i < 24) { - item = NO_ITEM; - } else if (i < 32) { - item = dComIfGs_getBeast(i - 24); - } else if (i < 36) { - item = NO_ITEM; - } else if (i < 44) { - item = dComIfGs_getBait(i - 36); - } else if (i < 48) { - item = NO_ITEM; - } else if (i < 56) { - item = dComIfGs_getReserve(i - 48); - } else { - item = NO_ITEM; - } - - if (i_itemNo == item) { + if (i_itemNo == dComIfGs_getItem(i)) { get_item++; } } @@ -1020,27 +1001,8 @@ u8 dComIfGs_checkGetItemNum(u8 i_itemNo) { } break; default: - u8 item = 0; for (int i = 0; i < 60; i++) { - if (i < 21) { - item = dComIfGs_getItem(i); - } else if (i < 24) { - item = NO_ITEM; - } else if (i < 32) { - item = dComIfGs_getBeast(i - 24); - } else if (i < 36) { - item = NO_ITEM; - } else if (i < 44) { - item = dComIfGs_getBait(i - 36); - } else if (i < 48) { - item = NO_ITEM; - } else if (i < 56) { - item = dComIfGs_getReserve(i - 48); - } else { - item = NO_ITEM; - } - - if (i_itemNo == item) { + if (i_itemNo == dComIfGs_getItem(i)) { get_item = 1; } }