From 073df83073f3a4243aa531b8338a6d1c65e884c2 Mon Sep 17 00:00:00 2001 From: LagoLunatic Date: Mon, 2 Jun 2025 00:30:37 -0400 Subject: [PATCH] Fix obj_movebox parameter inlines fixes #781 --- include/d/actor/d_a_obj_movebox.h | 12 ++++++------ src/d/actor/d_a_obj_movebox.cpp | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/d/actor/d_a_obj_movebox.h b/include/d/actor/d_a_obj_movebox.h index ac8553558..f25d0eb11 100644 --- a/include/d/actor/d_a_obj_movebox.h +++ b/include/d/actor/d_a_obj_movebox.h @@ -144,11 +144,8 @@ namespace daObjMovebox { PRM_TYPE_W = 0x04, PRM_TYPE_S = 0x18, - PRM_SWSAVE_W = 0x01, - PRM_SWSAVE_S = 0x1E, - - PRM_SWSAVE1_W = 0x08, - PRM_SWSAVE1_S = 0x08, + PRM_SWSAVE_W = 0x08, + PRM_SWSAVE_S = 0x08, PRM_ITEMNO_W = 0x06, PRM_ITEMNO_S = 0x00, @@ -156,6 +153,9 @@ namespace daObjMovebox { PRM_ITEMSAVE_W = 0x07, PRM_ITEMSAVE_S = 0x10, + PRM_DMY_W = 0x01, + PRM_DMY_S = 0x1E, + PRM_BUOY_W = 0x01, PRM_BUOY_S = 0x1F, }; @@ -174,8 +174,8 @@ namespace daObjMovebox { s32 prmX_get_evId() const { return (mPrmX & 0x00FF) >> 0; } s32 prm_get_itemNo() const { return daObj::PrmAbstract(this, PRM_ITEMNO_W, PRM_ITEMNO_S); } s32 prm_get_itemSave() const { return daObj::PrmAbstract(this, PRM_ITEMSAVE_W, PRM_ITEMSAVE_S); } + s32 prm_get_dmy() const { return daObj::PrmAbstract(this, PRM_DMY_W, PRM_DMY_S); } s32 prm_get_buoy() const { return daObj::PrmAbstract(this, PRM_BUOY_W, PRM_BUOY_S); } - s32 prm_get_dmy() const; // Unused? BOOL is_switch1() const { return fopAcM_isSwitch(const_cast(this), prm_get_swSave1()); }; BOOL is_switch2() const { return fopAcM_isSwitch(const_cast(this), prmZ_get_swSave2()); }; diff --git a/src/d/actor/d_a_obj_movebox.cpp b/src/d/actor/d_a_obj_movebox.cpp index f1aa22034..79b2b7a0b 100644 --- a/src/d/actor/d_a_obj_movebox.cpp +++ b/src/d/actor/d_a_obj_movebox.cpp @@ -1016,7 +1016,7 @@ namespace daObjMovebox { /* 000012E0-00001308 .text prm_get_swSave1__Q212daObjMovebox5Act_cCFv */ s32 Act_c::prm_get_swSave1() const { - return daObj::PrmAbstract(this, PRM_SWSAVE1_W, PRM_SWSAVE1_S); + return prm_get_swSave(); } /* 00001308-00001380 .text prmZ_init__Q212daObjMovebox5Act_cFv */ @@ -1026,7 +1026,7 @@ namespace daObjMovebox { } mbPrmZInitialized = true; - s32 switchEnablesSpawn = prm_get_swSave(); + s32 switchEnablesSpawn = prm_get_dmy(); if (switchEnablesSpawn) { // The appearing/disappearing type of box does not take pathId or swSave2 params. mPrmZ = 0xFFFF; @@ -1484,7 +1484,7 @@ namespace daObjMovebox { } bool switchIsSet = is_switch1(); - bool switchEnablesSpawn = prm_get_swSave(); + bool switchEnablesSpawn = prm_get_dmy(); bool shouldAppear = false; if ((!switchIsSet && !switchEnablesSpawn) || (switchIsSet && switchEnablesSpawn)) { shouldAppear = true;