Beta match LegoLOD and related classes (#1704)

* beta match LegoLOD, part 1

* Fix name collision for Ghidra

* More LegoLOD matches

* LegoMesh and LegoColor matches

* Various matches

* 73 % beta match on LegoLOD::Read

* Fix LEGO1 regressions, improve match

* 70.93 % on LEGO1

* 72.85 %, stack too small now

* Cleanup

* Cleanup

---------

Co-authored-by: jonschz <jonschz@users.noreply.github.com>
This commit is contained in:
jonschz
2026-01-05 23:45:36 +01:00
committed by GitHub
parent e9eb2493bb
commit af2418e61f
14 changed files with 280 additions and 54 deletions

View File

@@ -56,6 +56,7 @@ const char* g_alwaysLoadNames[] = {"rcuser", "jsuser", "dunebugy", "chtrblad", "
ColorOverride g_colorOverride = NULL;
// GLOBAL: LEGO1 0x101013b0
// GLOBAL: BETA10 0x10206f24
TextureHandler g_textureHandler = NULL;
// FUNCTION: LEGO1 0x100a81b0
@@ -816,6 +817,7 @@ LegoBool LegoROI::ColorAliasLookup(const LegoChar* p_param, float& p_red, float&
}
// FUNCTION: LEGO1 0x100a9cf0
// FUNCTION: BETA10 0x1018bead
LegoBool LegoROI::GetPaletteEntries(const LegoChar* p_name, unsigned char* paletteEntries, LegoU32 p_numEntries)
{
if (p_name == NULL) {
@@ -826,8 +828,10 @@ LegoBool LegoROI::GetPaletteEntries(const LegoChar* p_name, unsigned char* palet
if (g_textureHandler != NULL) {
return g_textureHandler(p_name, paletteEntries, p_numEntries);
}
else {
paletteEntries[0] = '\0';
}
paletteEntries[0] = '\0';
return FALSE;
}