From ac4d3b2490db84b9aa210a19cc80b86f3e0581fc Mon Sep 17 00:00:00 2001 From: Fabian Neundorf Date: Fri, 6 Jun 2025 20:47:45 +0200 Subject: [PATCH] Name for bounding box in ROI (#1541) * Name for bounding box in ROI * Use snake_case for member --- LEGO1/lego/legoomni/src/common/legocharactermanager.cpp | 6 +++--- LEGO1/lego/sources/roi/legoroi.cpp | 8 ++++---- LEGO1/lego/sources/roi/legoroi.h | 2 +- LEGO1/realtime/orientableroi.h | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/LEGO1/lego/legoomni/src/common/legocharactermanager.cpp b/LEGO1/lego/legoomni/src/common/legocharactermanager.cpp index beb96c0c..ff5241bb 100644 --- a/LEGO1/lego/legoomni/src/common/legocharactermanager.cpp +++ b/LEGO1/lego/legoomni/src/common/legocharactermanager.cpp @@ -500,7 +500,7 @@ LegoROI* LegoCharacterManager::CreateActorROI(const char* p_key) boundingBox.Max()[0] = g_actorLODs[c_topLOD].m_boundingBox[3]; boundingBox.Max()[1] = g_actorLODs[c_topLOD].m_boundingBox[4]; boundingBox.Max()[2] = g_actorLODs[c_topLOD].m_boundingBox[5]; - roi->SetUnknown0x80(boundingBox); + roi->SetBoundingBox(boundingBox); comp = new CompoundObject(); roi->SetComp(comp); @@ -551,7 +551,7 @@ LegoROI* LegoCharacterManager::CreateActorROI(const char* p_key) childBoundingBox.Max()[0] = g_actorLODs[i + 1].m_boundingBox[3]; childBoundingBox.Max()[1] = g_actorLODs[i + 1].m_boundingBox[4]; childBoundingBox.Max()[2] = g_actorLODs[i + 1].m_boundingBox[5]; - childROI->SetUnknown0x80(childBoundingBox); + childROI->SetBoundingBox(childBoundingBox); CalcLocalTransform( Mx3DPointFloat(g_actorLODs[i + 1].m_position), @@ -1073,7 +1073,7 @@ MxResult LegoCharacterManager::UpdateBoundingSphereAndBox(LegoROI* p_roi) SET3(boundingBox.Min(), min); SET3(boundingBox.Max(), max); - p_roi->SetUnknown0x80(boundingBox); + p_roi->SetBoundingBox(boundingBox); p_roi->WrappedUpdateWorldData(); diff --git a/LEGO1/lego/sources/roi/legoroi.cpp b/LEGO1/lego/sources/roi/legoroi.cpp index 2dda8762..fd5d3e88 100644 --- a/LEGO1/lego/sources/roi/legoroi.cpp +++ b/LEGO1/lego/sources/roi/legoroi.cpp @@ -150,8 +150,8 @@ LegoResult LegoROI::Read( goto done; } - SET3(m_unk0x80.Min(), box.GetMin()); - SET3(m_unk0x80.Max(), box.GetMax()); + SET3(m_bounding_box.Min(), box.GetMin()); + SET3(m_bounding_box.Max(), box.GetMax()); if (p_storage->Read(&length, sizeof(LegoU32)) != SUCCESS) { goto done; @@ -617,8 +617,8 @@ LegoU32 LegoROI::FUN_100a9410( Mx3DPointFloat local4c(p_v1); - local58 = m_unk0x80.Min(); - locala8 = m_unk0x80.Max(); + local58 = m_bounding_box.Min(); + locala8 = m_bounding_box.Max(); localc0[3] = local9c[3] = local168[3] = 1.0f; diff --git a/LEGO1/lego/sources/roi/legoroi.h b/LEGO1/lego/sources/roi/legoroi.h index 3ba5a472..f3a76899 100644 --- a/LEGO1/lego/sources/roi/legoroi.h +++ b/LEGO1/lego/sources/roi/legoroi.h @@ -78,7 +78,7 @@ public: void SetComp(CompoundObject* p_comp) { comp = p_comp; } void SetBoundingSphere(const BoundingSphere& p_sphere) { m_sphere = m_world_bounding_sphere = p_sphere; } - void SetUnknown0x80(const BoundingBox& p_unk0x80) { m_unk0x80 = p_unk0x80; } + void SetBoundingBox(const BoundingBox& p_box) { m_bounding_box = p_box; } // SYNTHETIC: LEGO1 0x100a82b0 // LegoROI::`scalar deleting destructor' diff --git a/LEGO1/realtime/orientableroi.h b/LEGO1/realtime/orientableroi.h index f3bcc7a9..031c5af7 100644 --- a/LEGO1/realtime/orientableroi.h +++ b/LEGO1/realtime/orientableroi.h @@ -70,7 +70,7 @@ public: protected: MxMatrix m_local2world; // 0x10 BoundingBox m_world_bounding_box; // 0x58 - BoundingBox m_unk0x80; // 0x80 + BoundingBox m_bounding_box; // 0x80 BoundingSphere m_world_bounding_sphere; // 0xa8 Mx3DPointFloat m_world_velocity; // 0xc0 OrientableROI* m_parentROI; // 0xd4