mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 16:34:06 +00:00
Name LegoLOD::FUN_100aae20
(#1562)
This commit is contained in:
@@ -16,7 +16,7 @@ DECOMP_SIZE_ASSERT(LegoLOD::Mesh, 0x08)
|
|||||||
LPDIRECT3DRMMATERIAL g_unk0x101013d4 = NULL;
|
LPDIRECT3DRMMATERIAL g_unk0x101013d4 = NULL;
|
||||||
|
|
||||||
// GLOBAL: LEGO1 0x101013dc
|
// GLOBAL: LEGO1 0x101013dc
|
||||||
const char* g_unk0x101013dc = "inh";
|
const char* g_InhPrefix = "inh";
|
||||||
|
|
||||||
inline IDirect3DRM2* GetD3DRM(Tgl::Renderer* pRenderer);
|
inline IDirect3DRM2* GetD3DRM(Tgl::Renderer* pRenderer);
|
||||||
inline BOOL GetMeshData(IDirect3DRMMesh*& mesh, D3DRMGROUPINDEX& index, Tgl::Mesh* pMesh);
|
inline BOOL GetMeshData(IDirect3DRMMesh*& mesh, D3DRMGROUPINDEX& index, Tgl::Mesh* pMesh);
|
||||||
@@ -66,7 +66,7 @@ LegoResult LegoLOD::Read(Tgl::Renderer* p_renderer, LegoTextureContainer* p_text
|
|||||||
LegoU32(*textureIndices)[3] = NULL;
|
LegoU32(*textureIndices)[3] = NULL;
|
||||||
LegoTextureInfo* textureInfo = NULL;
|
LegoTextureInfo* textureInfo = NULL;
|
||||||
|
|
||||||
LegoU32 i, meshUnd1, meshUnd2, tempNumVertsAndNormals;
|
LegoU32 i, indexBackwards, indexForwards, tempNumVertsAndNormals;
|
||||||
unsigned char paletteEntries[256];
|
unsigned char paletteEntries[256];
|
||||||
|
|
||||||
if (p_storage->Read(&m_unk0x08, sizeof(undefined4)) != SUCCESS) {
|
if (p_storage->Read(&m_unk0x08, sizeof(undefined4)) != SUCCESS) {
|
||||||
@@ -93,8 +93,8 @@ LegoResult LegoLOD::Read(Tgl::Renderer* p_renderer, LegoTextureContainer* p_text
|
|||||||
m_melems = new Mesh[m_numMeshes];
|
m_melems = new Mesh[m_numMeshes];
|
||||||
memset(m_melems, 0, sizeof(*m_melems) * m_numMeshes);
|
memset(m_melems, 0, sizeof(*m_melems) * m_numMeshes);
|
||||||
|
|
||||||
meshUnd1 = m_numMeshes - 1;
|
indexBackwards = m_numMeshes - 1;
|
||||||
meshUnd2 = 0;
|
indexForwards = 0;
|
||||||
|
|
||||||
if (p_storage->Read(&tempNumVertsAndNormals, sizeof(LegoU32)) != SUCCESS) {
|
if (p_storage->Read(&tempNumVertsAndNormals, sizeof(LegoU32)) != SUCCESS) {
|
||||||
goto done;
|
goto done;
|
||||||
@@ -184,13 +184,13 @@ LegoResult LegoLOD::Read(Tgl::Renderer* p_renderer, LegoTextureContainer* p_text
|
|||||||
textureName = mesh->GetTextureName();
|
textureName = mesh->GetTextureName();
|
||||||
materialName = mesh->GetMaterialName();
|
materialName = mesh->GetMaterialName();
|
||||||
|
|
||||||
if (FUN_100aae20(textureName) || FUN_100aae20(materialName)) {
|
if (HasInhPrefix(textureName) || HasInhPrefix(materialName)) {
|
||||||
meshIndex = meshUnd1;
|
meshIndex = indexBackwards;
|
||||||
meshUnd1--;
|
indexBackwards--;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
meshIndex = meshUnd2;
|
meshIndex = indexForwards;
|
||||||
meshUnd2++;
|
indexForwards++;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_melems[meshIndex].m_tglMesh = m_meshBuilder->CreateMesh(
|
m_melems[meshIndex].m_tglMesh = m_meshBuilder->CreateMesh(
|
||||||
@@ -265,7 +265,7 @@ LegoResult LegoLOD::Read(Tgl::Renderer* p_renderer, LegoTextureContainer* p_text
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_meshOffset = meshUnd2;
|
m_meshOffset = indexForwards;
|
||||||
|
|
||||||
if (textureVertices != NULL) {
|
if (textureVertices != NULL) {
|
||||||
delete[] textureVertices;
|
delete[] textureVertices;
|
||||||
@@ -377,10 +377,10 @@ LegoResult LegoLOD::GetTextureInfo(LegoTextureInfo*& p_textureInfo)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100aae20
|
// FUNCTION: LEGO1 0x100aae20
|
||||||
LegoBool LegoLOD::FUN_100aae20(const LegoChar* p_name)
|
LegoBool LegoLOD::HasInhPrefix(const LegoChar* p_name)
|
||||||
{
|
{
|
||||||
if (p_name != NULL) {
|
if (p_name != NULL) {
|
||||||
if (!strnicmp(p_name, g_unk0x101013dc, strlen(g_unk0x101013dc))) {
|
if (!strnicmp(p_name, g_InhPrefix, strlen(g_InhPrefix))) {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -35,7 +35,7 @@ public:
|
|||||||
void ClearMeshOffset();
|
void ClearMeshOffset();
|
||||||
LegoResult GetTextureInfo(LegoTextureInfo*& p_textureInfo);
|
LegoResult GetTextureInfo(LegoTextureInfo*& p_textureInfo);
|
||||||
|
|
||||||
static LegoBool FUN_100aae20(const LegoChar* p_name);
|
static LegoBool HasInhPrefix(const LegoChar* p_name);
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100aa430
|
// SYNTHETIC: LEGO1 0x100aa430
|
||||||
// LegoLOD::`scalar deleting destructor'
|
// LegoLOD::`scalar deleting destructor'
|
||||||
|
Reference in New Issue
Block a user