diff --git a/LEGO1/lego/sources/roi/legolod.cpp b/LEGO1/lego/sources/roi/legolod.cpp index c325c670..45f0f864 100644 --- a/LEGO1/lego/sources/roi/legolod.cpp +++ b/LEGO1/lego/sources/roi/legolod.cpp @@ -388,6 +388,13 @@ LegoBool LegoLOD::FUN_100aae20(const LegoChar* p_name) return FALSE; } +// FUNCTION: LEGO1 0x100aae60 +// FUNCTION: BETA10 0x1018e50f +void LegoLOD::FUN_100aae60() +{ + m_unk0x1c = 0; +} + inline BOOL GetMeshData(IDirect3DRMMesh*& mesh, D3DRMGROUPINDEX& index, Tgl::Mesh* pMesh) { mesh = ((TglImpl::MeshImpl*) pMesh)->ImplementationData()->groupMesh; diff --git a/LEGO1/lego/sources/roi/legolod.h b/LEGO1/lego/sources/roi/legolod.h index a47a3d24..0d50e675 100644 --- a/LEGO1/lego/sources/roi/legolod.h +++ b/LEGO1/lego/sources/roi/legolod.h @@ -32,6 +32,7 @@ class LegoLOD : public ViewLOD { LegoResult FUN_100aacb0(LegoFloat p_red, LegoFloat p_green, LegoFloat p_blue, LegoFloat p_alpha); LegoResult FUN_100aad00(LegoTextureInfo* p_textureInfo); LegoResult FUN_100aad70(LegoTextureInfo* p_textureInfo); + void FUN_100aae60(); LegoResult GetTexture(LegoTextureInfo*& p_textureInfo); static LegoBool FUN_100aae20(const LegoChar* p_name); diff --git a/LEGO1/lego/sources/roi/legoroi.cpp b/LEGO1/lego/sources/roi/legoroi.cpp index 87b8a3a0..c9e0d21a 100644 --- a/LEGO1/lego/sources/roi/legoroi.cpp +++ b/LEGO1/lego/sources/roi/legoroi.cpp @@ -53,6 +53,9 @@ const char* g_unk0x10101390[] = {"rcuser", "jsuser", "dunebugy", "chtrblad", "ch // GLOBAL: LEGO1 0x101013ac ROIHandler g_unk0x101013ac = NULL; +// GLOBAL: LEGO1 0x101013b0 +TextureHandler g_unk0x101013b0 = NULL; + // FUNCTION: LEGO1 0x100a81b0 void LegoROI::FUN_100a81b0(const LegoChar* p_error, const LegoChar* p_name) { @@ -757,7 +760,7 @@ LegoBool LegoROI::FUN_100a9bf0(const LegoChar* p_param, float& p_red, float& p_g if (g_unk0x101013ac) { char buf[32]; - if (g_unk0x101013ac(p_param, buf, 32)) { + if (g_unk0x101013ac(p_param, buf, sizeof(buf))) { p_param = buf; } } @@ -782,10 +785,18 @@ LegoBool LegoROI::ColorAliasLookup(const LegoChar* p_param, float& p_red, float& return FALSE; } -// STUB: LEGO1 0x100a9cf0 +// FUNCTION: LEGO1 0x100a9cf0 LegoBool LegoROI::FUN_100a9cf0(const LegoChar* p_param, unsigned char* paletteEntries, LegoU32 p_numEntries) { - // TODO + if (p_param == NULL) { + return FALSE; + } + + if (g_unk0x101013b0 != NULL) { + return g_unk0x101013b0(p_param, paletteEntries, p_numEntries); + } + + paletteEntries[0] = '\0'; return FALSE; } @@ -812,11 +823,15 @@ void LegoROI::SetName(const LegoChar* p_name) } } -// STUB: LEGO1 0x100a9dd0 -// STUB: BETA10 0x1018bfdb +// FUNCTION: LEGO1 0x100a9dd0 +// FUNCTION: BETA10 0x1018bfdb void LegoROI::FUN_100a9dd0() { - // TODO + int lodCount = GetLODCount(); + for (LegoS32 i = 0; i < lodCount; i++) { + LegoLOD* lod = (LegoLOD*) GetLOD(i); + lod->FUN_100aae60(); + } } // FUNCTION: LEGO1 0x100a9e10 diff --git a/LEGO1/lego/sources/roi/legoroi.h b/LEGO1/lego/sources/roi/legoroi.h index 541cfac5..82fe10af 100644 --- a/LEGO1/lego/sources/roi/legoroi.h +++ b/LEGO1/lego/sources/roi/legoroi.h @@ -5,6 +5,7 @@ #include "viewmanager/viewroi.h" typedef unsigned char (*ROIHandler)(const char*, char*, unsigned int); +typedef unsigned char (*TextureHandler)(const char*, unsigned char*, unsigned int); class LegoEntity; class LegoTextureContainer;