From b6ce02064acb3b397d3589f38c654928dc0b4052 Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Fri, 22 Mar 2024 11:51:51 -0400 Subject: [PATCH] Match --- .../legoomni/include/legocharactermanager.h | 6 ++++ LEGO1/lego/legoomni/include/legocharacters.h | 10 +++---- .../src/common/legocharactermanager.cpp | 6 ++-- .../legoomni/src/common/legocharacters.cpp | 30 ++++++++++--------- 4 files changed, 30 insertions(+), 22 deletions(-) diff --git a/LEGO1/lego/legoomni/include/legocharactermanager.h b/LEGO1/lego/legoomni/include/legocharactermanager.h index 62aacb07..b03a94c0 100644 --- a/LEGO1/lego/legoomni/include/legocharactermanager.h +++ b/LEGO1/lego/legoomni/include/legocharactermanager.h @@ -69,6 +69,12 @@ class LegoCharacterManager { }; // clang-format off +// TEMPLATE: LEGO1 0x1001a690 +// list >::_Buynode + +// TEMPLATE: LEGO1 0x10035790 +// _Construct + // TEMPLATE: LEGO1 0x10082b90 // _Tree,map >::_Kfn,LegoCharacterComparator,allocator >::~_Tree,map >::_Kfn,LegoCharacterComparator,allocator > diff --git a/LEGO1/lego/legoomni/include/legocharacters.h b/LEGO1/lego/legoomni/include/legocharacters.h index 101ced3f..aff7a23e 100644 --- a/LEGO1/lego/legoomni/include/legocharacters.h +++ b/LEGO1/lego/legoomni/include/legocharacters.h @@ -11,12 +11,12 @@ class LegoROI; struct LegoCharacterData { // SIZE 0x18 struct Part { - MxS8* m_unk0x00; // 0x00 + MxU8* m_unk0x00; // 0x00 const char** m_unk0x04; // 0x04 - undefined m_unk0x08; // 0x08 - MxS8* m_unk0x0c; // 0x0c + MxU8 m_unk0x08; // 0x08 + MxU8* m_unk0x0c; // 0x0c const char** m_unk0x10; // 0x10 - undefined m_unk0x14; // 0x14 + MxU8 m_unk0x14; // 0x14 }; char* m_name; // 0x00 @@ -37,7 +37,7 @@ struct LegoCharacterLOD { const char* m_name; // 0x00 const char* m_parentName; // 0x04 - MxU8 m_flags; // 0x08 + MxU32 m_flags; // 0x08 float m_boundingSphere[4]; // 0x0c float m_boundingBox[6]; // 0x1c float m_position[3]; // 0x34 diff --git a/LEGO1/lego/legoomni/src/common/legocharactermanager.cpp b/LEGO1/lego/legoomni/src/common/legocharactermanager.cpp index f7410848..0c3a0dc6 100644 --- a/LEGO1/lego/legoomni/src/common/legocharactermanager.cpp +++ b/LEGO1/lego/legoomni/src/common/legocharactermanager.cpp @@ -251,7 +251,7 @@ LegoROI* LegoCharacterManager::CreateROI(const char* p_key) for (j = 0; j < _countof(g_characterLODs) - 1; j++) { ViewLODList *lodList, *dupLodList; LegoROI* childROI; - MxU32 lodSize; + MxS32 lodSize; const char* parentName; char lodName[64]; @@ -309,7 +309,7 @@ LegoROI* LegoCharacterManager::CreateROI(const char* p_key) if (g_characterLODs[j + 1].m_flags & LegoCharacterLOD::c_flag1 && (j != 0 || part.m_unk0x00[part.m_unk0x08] != 0)) { - LegoTextureInfo* textureInfo = textureContainer->Get(part.m_unk0x10[part.m_unk0x14]); + LegoTextureInfo* textureInfo = textureContainer->Get(part.m_unk0x10[part.m_unk0x0c[part.m_unk0x14]]); if (textureInfo != NULL) { childROI->FUN_100a9210(textureInfo); @@ -318,7 +318,7 @@ LegoROI* LegoCharacterManager::CreateROI(const char* p_key) } else if (g_characterLODs[j + 1].m_flags & LegoCharacterLOD::c_flag2 || (j == 0 && part.m_unk0x00[part.m_unk0x08] == 0)) { LegoFloat red, green, blue, alpha; - childROI->FUN_100a9bf0(part.m_unk0x10[part.m_unk0x14], red, green, blue, alpha); + childROI->FUN_100a9bf0(part.m_unk0x10[part.m_unk0x0c[part.m_unk0x14]], red, green, blue, alpha); childROI->FUN_100a9170(red, green, blue, alpha); } diff --git a/LEGO1/lego/legoomni/src/common/legocharacters.cpp b/LEGO1/lego/legoomni/src/common/legocharacters.cpp index 1bcd20db..bd30b0d4 100644 --- a/LEGO1/lego/legoomni/src/common/legocharacters.cpp +++ b/LEGO1/lego/legoomni/src/common/legocharacters.cpp @@ -4,6 +4,8 @@ DECOMP_SIZE_ASSERT(LegoCharacterData, 0x108) DECOMP_SIZE_ASSERT(LegoCharacterData::Part, 0x18) DECOMP_SIZE_ASSERT(LegoCharacterLOD, 0x58) +// Unclear whether g_characterLODs[0] (top) is its own global, see: LegoCharacterManager::CreateROI + // GLOBAL: LEGO1 0x100da3b0 LegoCharacterLOD g_characterLODs[] = { {"top", "top", 0, 0.000267, 0.780808, -0.01906, 0.951612, -0.461166, -0.002794, -0.299442, 0.4617, @@ -91,44 +93,44 @@ LegoCharacterLOD g_characterLODs[] = { }; // GLOBAL: LEGO1 0x100da778 -MxS8 g_unk0x100da778[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, -1}; +MxU8 g_unk0x100da778[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 0xff}; // GLOBAL: LEGO1 0x100da790 -MxS8 g_unk0x100da790[] = {21, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, -1}; +MxU8 g_unk0x100da790[] = {21, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 0xff}; // GLOBAL: LEGO1 0x100da7a8 -MxS8 g_unk0x100da7a8[] = {22, -1}; +MxU8 g_unk0x100da7a8[] = {22, 0xff}; // GLOBAL: LEGO1 0x100da7ac -MxS8 g_unk0x100da7ac[] = {20, -1}; +MxU8 g_unk0x100da7ac[] = {20, 0xff}; // GLOBAL: LEGO1 0x100da7b0 -MxS8 g_unk0x100da7b0[] = {0, 1, 2, 3, 4, 5, 6, 7, -1}; +MxU8 g_unk0x100da7b0[] = {0, 1, 2, 3, 4, 5, 6, 7, 0xff}; // GLOBAL: LEGO1 0x100da7c0 -MxS8 g_unk0x100da7c0[] = {0, 1, 2, 3, 4, 5, 6, 7, -1}; +MxU8 g_unk0x100da7c0[] = {0, 1, 2, 3, 4, 5, 6, 7, 0xff}; // GLOBAL: LEGO1 0x100da7d0 -MxS8 g_unk0x100da7d0[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, -1}; +MxU8 g_unk0x100da7d0[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 0xff}; // GLOBAL: LEGO1 0x100da7e0 -MxS8 g_unk0x100da7e0[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, - 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 27, -1}; +MxU8 g_unk0x100da7e0[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 27, 0xff}; // GLOBAL: LEGO1 0x100da800 -MxS8 g_unk0x100da800[] = {0, 1, 2, 3, 4, 5, 6, 7, -1}; +MxU8 g_unk0x100da800[] = {0, 1, 2, 3, 4, 5, 6, 7, 0xff}; // GLOBAL: LEGO1 0x100da810 -MxS8 g_unk0x100da810[] = {0, 1, 2, 3, 4, 5, 6, 7, -1}; +MxU8 g_unk0x100da810[] = {0, 1, 2, 3, 4, 5, 6, 7, 0xff}; // GLOBAL: LEGO1 0x100da820 -MxS8 g_unk0x100da820[] = {0, 1, 2, 3, 4, 5, 6, 7, -1}; +MxU8 g_unk0x100da820[] = {0, 1, 2, 3, 4, 5, 6, 7, 0xff}; // GLOBAL: LEGO1 0x100da830 -MxS8 g_unk0x100da830[] = {0, 1, 2, 3, 4, 5, 6, 7, -1}; +MxU8 g_unk0x100da830[] = {0, 1, 2, 3, 4, 5, 6, 7, 0xff}; // GLOBAL: LEGO1 0x100da840 -MxS8 g_unk0x100da840[] = {0, 1, 2, 3, 4, 5, 6, 7, -1}; +MxU8 g_unk0x100da840[] = {0, 1, 2, 3, 4, 5, 6, 7, 0xff}; // GLOBAL: LEGO1 0x100f7f78 const char* g_unk0x100f7f78[] = {"baseball", "chef", "cap", "cophat", "helmet", "ponytail", "pageboy", "shrthair",