LegoMesh and LegoColor matches

This commit is contained in:
jonschz 2026-01-03 13:55:15 +01:00
parent 2471d0ca2c
commit df07b59c70
6 changed files with 24 additions and 1 deletions

View File

@ -366,7 +366,7 @@ LegoResult LegoLOD::SetTextureInfo(LegoTextureInfo* p_textureInfo)
if (m_melems[i].m_textured) {
#ifdef BETA10
// This function likely had a different signature in BETA10
Tgl::Result tglResult = m_melems[i].m_tglMesh->SetTexture((const Tgl::Texture *)p_textureInfo);
Tgl::Result tglResult = m_melems[i].m_tglMesh->SetTexture((const Tgl::Texture*) p_textureInfo);
// clang-format off
assert(Succeeded( tglResult ));
// clang-format on
@ -382,11 +382,22 @@ LegoResult LegoLOD::SetTextureInfo(LegoTextureInfo* p_textureInfo)
}
// FUNCTION: LEGO1 0x100aad70
// FUNCTION: BETA10 0x1018e32c
LegoResult LegoLOD::UpdateTextureInfo(LegoTextureInfo* p_textureInfo)
{
using Tgl::Succeeded;
for (LegoU32 i = m_meshOffset; i < m_numMeshes; i++) {
if (m_melems[i].m_textured) {
#ifdef BETA10
// This function likely had a different signature in BETA10
Tgl::Result tglResult = m_melems[i].m_tglMesh->SetTexture((const Tgl::Texture*) p_textureInfo);
// clang-format off
assert(Succeeded( tglResult ));
// clang-format on
#else
LegoTextureInfo::SetGroupTexture(m_melems[i].m_tglMesh, p_textureInfo);
#endif
}
}

View File

@ -6,6 +6,7 @@
DECOMP_SIZE_ASSERT(LegoColor, 0x03)
// FUNCTION: LEGO1 0x100d3a20
// FUNCTION: BETA10 0x10190730
LegoResult LegoColor::Read(LegoStorage* p_storage)
{
LegoResult result;

View File

@ -6,6 +6,7 @@ DECOMP_SIZE_ASSERT(LegoMeshUnkComponent, 0x1c)
DECOMP_SIZE_ASSERT(LegoMesh, 0x24)
// FUNCTION: LEGO1 0x100d3810
// FUNCTION: BETA10 0x1018fd60
LegoMesh::LegoMesh()
{
m_alpha = 0.0F;
@ -20,6 +21,7 @@ LegoMesh::LegoMesh()
}
// FUNCTION: LEGO1 0x100d3860
// FUNCTION: BETA10 0x1018fddb
LegoMesh::~LegoMesh()
{
if (m_textureName != NULL) {
@ -36,6 +38,7 @@ LegoMesh::~LegoMesh()
}
// FUNCTION: LEGO1 0x100d38f0
// FUNCTION: BETA10 0x1018ff5d
LegoResult LegoMesh::Read(LegoStorage* p_storage)
{
LegoResult result;

View File

@ -9,6 +9,7 @@ class LegoStorage;
// SIZE 0x1c
struct LegoMeshUnkComponent {
// FUNCTION: BETA10 0x101905b0
~LegoMeshUnkComponent()
{
if (m_unk0x08) {
@ -36,7 +37,11 @@ struct LegoMeshUnkComponent {
undefined* m_unk0x18; // 0x18
};
// SYNTHETIC: BETA10 0x10190530
// LegoMeshUnkComponent::`scalar deleting destructor'
// VTABLE: LEGO1 0x100dd228
// VTABLE: BETA10 0x101c39c4
// SIZE 0x24
class LegoMesh {
public:
@ -60,6 +65,7 @@ class LegoMesh {
LegoResult Read(LegoStorage* p_storage);
// SYNTHETIC: LEGO1 0x100d3840
// SYNTHETIC: BETA10 0x101904f0
// LegoMesh::`scalar deleting destructor'
protected:

View File

@ -137,6 +137,7 @@
// ?__ArrayUnwind@@YGXPAXIHP6EX0@Z@Z
// LIBRARY: LEGO1 0x1008c410
// LIBRARY: BETA10 0x100fa340
// _strlwr
// LIBRARY: LEGO1 0x1008c570

View File

@ -28,6 +28,7 @@ targets:
- LegoAct2
- LegoCarBuild
- LegoCarBuildAnimPresenter
- LegoLOD
- LegoRace
- LegoWorld
ignore-functions: