From 2ea47ed57d8e65b82ee1e1812ced1cb31c0bc1a8 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Sat, 28 Oct 2023 16:34:33 -0700 Subject: [PATCH] minor c_bg_s work --- include/SSystem/SComponent/c_bg_s.h | 3 --- src/SSystem/SComponent/c_bg_s.cpp | 13 +++++++------ 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/include/SSystem/SComponent/c_bg_s.h b/include/SSystem/SComponent/c_bg_s.h index aec34c61b..10bb3dc00 100644 --- a/include/SSystem/SComponent/c_bg_s.h +++ b/include/SSystem/SComponent/c_bg_s.h @@ -42,9 +42,6 @@ public: cBgS() {} cM3dGPla* GetTriPla(cBgS_PolyInfo&) const; - cM3dGPla* i_GetTriPla(cBgS_PolyInfo& polyInfo) const { - return GetTriPla(polyInfo.GetBgIndex(), polyInfo.GetPolyIndex()); - } bool Regist(cBgW*, unsigned int, void*); int Release(cBgW*); bool LineCross(cBgS_LinChk*); diff --git a/src/SSystem/SComponent/c_bg_s.cpp b/src/SSystem/SComponent/c_bg_s.cpp index 7c68320e9..9b8381aae 100644 --- a/src/SSystem/SComponent/c_bg_s.cpp +++ b/src/SSystem/SComponent/c_bg_s.cpp @@ -74,15 +74,16 @@ int cBgS::Release(cBgW* bgw) { if (bgw == NULL) return true; - if (bgw->ChkUsed()) { - if (bgw->ChkUsed() && m_chk_element[bgw->GetId()].ChkUsed()) { - m_chk_element[bgw->GetId()].Release(); - bgw->SetId(256); - return false; - } + if (bgw->ChkUsed() && bgw->GetId() >= 0 && bgw->GetId() < 0x100 && m_chk_element[bgw->GetId()].ChkUsed()) { + m_chk_element[bgw->GetId()].Release(); + bgw->SetId(256); + goto done; } return true; + +done: + return false; } /* 8024669C-802466F0 .text Ct__4cBgSFv */