minor c_bg_s work

This commit is contained in:
Jasper St. Pierre
2023-10-28 16:34:33 -07:00
parent cf05dea4f4
commit 2ea47ed57d
2 changed files with 7 additions and 9 deletions
-3
View File
@@ -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*);
+7 -6
View File
@@ -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 */