mirror of
https://github.com/isledecomp/isle.git
synced 2024-11-22 23:57:54 -05:00
Implement/match remaining LegoLOD functions (#636)
* Implement/match remaining LegoLOD functions * Add param name
This commit is contained in:
parent
873926afe2
commit
45cba2c00e
2 changed files with 25 additions and 6 deletions
|
@ -15,6 +15,9 @@ DECOMP_SIZE_ASSERT(LegoLOD::Mesh, 0x08)
|
||||||
// GLOBAL: LEGO1 0x101013d4
|
// GLOBAL: LEGO1 0x101013d4
|
||||||
LPDIRECT3DRMMATERIAL g_unk0x101013d4 = NULL;
|
LPDIRECT3DRMMATERIAL g_unk0x101013d4 = NULL;
|
||||||
|
|
||||||
|
// GLOBAL: LEGO1 0x101013dc
|
||||||
|
const char* g_unk0x101013dc = "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);
|
||||||
|
|
||||||
|
@ -41,10 +44,21 @@ LegoLOD::LegoLOD(Tgl::Renderer* p_renderer) : ViewLOD(p_renderer)
|
||||||
m_unk0x1c = 0;
|
m_unk0x1c = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x100aa450
|
// FUNCTION: LEGO1 0x100aa450
|
||||||
LegoLOD::~LegoLOD()
|
LegoLOD::~LegoLOD()
|
||||||
{
|
{
|
||||||
// TODO
|
if (m_numMeshes && m_meshes != NULL) {
|
||||||
|
for (LegoU32 i = 0; i < m_numMeshes; i++) {
|
||||||
|
if (m_meshes[i].m_tglMesh != NULL) {
|
||||||
|
delete m_meshes[i].m_tglMesh;
|
||||||
|
m_meshes[i].m_tglMesh = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_meshes) {
|
||||||
|
delete[] m_meshes;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100aa510
|
// FUNCTION: LEGO1 0x100aa510
|
||||||
|
@ -297,10 +311,15 @@ LegoResult LegoLOD::Read(Tgl::Renderer* p_renderer, LegoTextureContainer* p_text
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x100aae20
|
// FUNCTION: LEGO1 0x100aae20
|
||||||
LegoBool LegoLOD::FUN_100aae20(const LegoChar*)
|
LegoBool LegoLOD::FUN_100aae20(const LegoChar* p_name)
|
||||||
{
|
{
|
||||||
// TODO
|
if (p_name != NULL) {
|
||||||
|
if (!strnicmp(p_name, g_unk0x101013dc, strlen(g_unk0x101013dc))) {
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ class LegoLOD : public ViewLOD {
|
||||||
|
|
||||||
LegoResult Read(Tgl::Renderer*, LegoTextureContainer* p_textureContainer, LegoStorage* p_storage);
|
LegoResult Read(Tgl::Renderer*, LegoTextureContainer* p_textureContainer, LegoStorage* p_storage);
|
||||||
|
|
||||||
static LegoBool FUN_100aae20(const LegoChar*);
|
static LegoBool FUN_100aae20(const LegoChar* p_name);
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100aa430
|
// SYNTHETIC: LEGO1 0x100aa430
|
||||||
// LegoLOD::`scalar deleting destructor'
|
// LegoLOD::`scalar deleting destructor'
|
||||||
|
|
Loading…
Reference in a new issue