From 0b46acab542feb889130e87e6d8af75d668772d0 Mon Sep 17 00:00:00 2001 From: Fabian Neundorf Date: Tue, 17 Jun 2025 18:42:59 +0200 Subject: [PATCH] Name `m_unk0x21` as `GetUseAlias` in `LegoMesh` (#1567) --- LEGO1/lego/sources/roi/legolod.cpp | 4 ++-- LEGO1/lego/sources/shape/legomesh.cpp | 4 ++-- LEGO1/lego/sources/shape/legomesh.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/LEGO1/lego/sources/roi/legolod.cpp b/LEGO1/lego/sources/roi/legolod.cpp index f4845dec..2291a3e7 100644 --- a/LEGO1/lego/sources/roi/legolod.cpp +++ b/LEGO1/lego/sources/roi/legolod.cpp @@ -211,7 +211,7 @@ LegoResult LegoLOD::Read(Tgl::Renderer* p_renderer, LegoTextureContainer* p_text m_melems[meshIndex].m_tglMesh->SetShadingModel(shadingModel); if (textureName != NULL) { - if (mesh->GetUnknown0x21()) { + if (mesh->GetUseAlias()) { LegoROI::GetPaletteEntries(textureName, paletteEntries, sizeOfArray(paletteEntries)); } @@ -231,7 +231,7 @@ LegoResult LegoLOD::Read(Tgl::Renderer* p_renderer, LegoTextureContainer* p_text LegoFloat blue = 1.0F; LegoFloat alpha = 0.0F; - if (mesh->GetUnknown0x21()) { + if (mesh->GetUseAlias()) { LegoROI::GetRGBAColor(materialName, red, green, blue, alpha); } else { diff --git a/LEGO1/lego/sources/shape/legomesh.cpp b/LEGO1/lego/sources/shape/legomesh.cpp index 537bbbe8..69dee797 100644 --- a/LEGO1/lego/sources/shape/legomesh.cpp +++ b/LEGO1/lego/sources/shape/legomesh.cpp @@ -15,7 +15,7 @@ LegoMesh::LegoMesh() m_unk0x0d = 0; m_unk0x10 = NULL; m_unk0x20 = 0; - m_unk0x21 = FALSE; + m_useAlias = FALSE; m_materialName = NULL; } @@ -55,7 +55,7 @@ LegoResult LegoMesh::Read(LegoStorage* p_storage) if ((result = p_storage->Read(&m_unk0x20, sizeof(undefined))) != SUCCESS) { return result; } - if ((result = p_storage->Read(&m_unk0x21, sizeof(LegoU8))) != SUCCESS) { + if ((result = p_storage->Read(&m_useAlias, sizeof(LegoU8))) != SUCCESS) { return result; } diff --git a/LEGO1/lego/sources/shape/legomesh.h b/LEGO1/lego/sources/shape/legomesh.h index da1b1a27..3092d7e4 100644 --- a/LEGO1/lego/sources/shape/legomesh.h +++ b/LEGO1/lego/sources/shape/legomesh.h @@ -56,7 +56,7 @@ public: LegoU8 GetUnknown0x0d() { return m_unk0x0d; } const LegoChar* GetTextureName() { return m_textureName; } const LegoChar* GetMaterialName() { return m_materialName; } - LegoBool GetUnknown0x21() { return m_unk0x21; } + LegoBool GetUseAlias() { return m_useAlias; } LegoResult Read(LegoStorage* p_storage); // SYNTHETIC: LEGO1 0x100d3840 @@ -72,7 +72,7 @@ protected: LegoChar* m_textureName; // 0x18 LegoChar* m_materialName; // 0x1c undefined m_unk0x20; // 0x20 - unused - LegoBool m_unk0x21; // 0x21 + LegoBool m_useAlias; // 0x21 }; #endif // __LEGOMESH_H