diff options
| author | TakaRikka <38417346+TakaRikka@users.noreply.github.com> | 2026-03-17 03:44:11 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-17 03:44:11 -0700 |
| commit | 9f340b604b5ac3d19d330b7bd6a2d7355c58bc27 (patch) | |
| tree | 1db19763775c1b495235e05bd6ae1471a8bb53fb /src/d/d_bg_s_movebg_actor.cpp | |
| parent | ae0f8909a6ad9d1df2cf247a2538ff658d6e49c0 (diff) | |
various d_bg debug cleanup / d_menu_window_HIO debug (#3132)
* various d_bg debug cleanup
* matching forward decl for compiler compatibility
* fix build
Diffstat (limited to 'src/d/d_bg_s_movebg_actor.cpp')
| -rw-r--r-- | src/d/d_bg_s_movebg_actor.cpp | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/src/d/d_bg_s_movebg_actor.cpp b/src/d/d_bg_s_movebg_actor.cpp index 3e0735cf91..f65b042288 100644 --- a/src/d/d_bg_s_movebg_actor.cpp +++ b/src/d/d_bg_s_movebg_actor.cpp @@ -14,8 +14,9 @@ dBgS_MoveBgActor::dBgS_MoveBgActor() { mpBgW = NULL; } -static int CheckCreateHeap(fopAc_ac_c* p_actor) { - return static_cast<dBgS_MoveBgActor*>(p_actor)->MoveBGCreateHeap(); +static int CheckCreateHeap(fopAc_ac_c* actor) { + dBgS_MoveBgActor* i_this = (dBgS_MoveBgActor*)actor; + return i_this->MoveBGCreateHeap(); } int dBgS_MoveBgActor::CreateHeap() { @@ -68,8 +69,7 @@ int dBgS_MoveBgActor::MoveBGCreateHeap() { mpBgW = new dBgW(); if (mpBgW != NULL) { - cBgD_t* res = (cBgD_t*)dComIfG_getObjectRes(m_name, m_dzb_id); - if (!mpBgW->Set(res, cBgW::MOVE_BG_e, &mBgMtx)) { + if (!mpBgW->Set((cBgD_t*)dComIfG_getObjectRes(m_name, m_dzb_id), cBgW::MOVE_BG_e, &mBgMtx)) { if (m_set_func != NULL) { mpBgW->SetCrrFunc(m_set_func); } @@ -87,6 +87,8 @@ int dBgS_MoveBgActor::MoveBGCreateHeap() { int dBgS_MoveBgActor::MoveBGCreate(char const* i_arcName, int i_dzb_id, MoveBGActor_SetFunc i_setFunc, u32 i_heapSize, Mtx* i_bgMtx) { + bool var_r28 = true; + if (i_bgMtx == NULL) { mDoMtx_stack_c::transS(current.pos.x, current.pos.y, current.pos.z); mDoMtx_stack_c::YrotM(shape_angle.y); @@ -104,6 +106,15 @@ int dBgS_MoveBgActor::MoveBGCreate(char const* i_arcName, int i_dzb_id, return cPhs_ERROR_e; } + #if DEBUG + if (mpBgW != NULL && mpBgW->ChkUsed()) { + BOOL isDebugPad = mDoCPd_c::isConnect(PAD_3); + if (isDebugPad) { + JUT_WARN(185, "%s", "dBgS_MoveBgActor::MoveBGCreate() Don't Regist CreateHeap\n"); + } + } + #endif + if (mpBgW != NULL && dComIfG_Bgsp().Regist(mpBgW, this)) { return cPhs_ERROR_e; } @@ -116,7 +127,10 @@ int dBgS_MoveBgActor::MoveBGDelete() { int ret = Delete(); if (mpBgW != NULL && mpBgW->ChkUsed()) { - dComIfG_Bgsp().Release(mpBgW); + bool rt = dComIfG_Bgsp().Release(mpBgW); + if (rt != 0) { + OS_REPORT("Release Error\n"); + } } return ret; } |
