mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-11-26 17:36:12 -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
|
||||
LPDIRECT3DRMMATERIAL g_unk0x101013d4 = NULL;
|
||||
|
||||
// GLOBAL: LEGO1 0x101013dc
|
||||
const char* g_unk0x101013dc = "inh";
|
||||
|
||||
inline IDirect3DRM2* GetD3DRM(Tgl::Renderer* pRenderer);
|
||||
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;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x100aa450
|
||||
// FUNCTION: LEGO1 0x100aa450
|
||||
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
|
||||
|
@ -297,10 +311,15 @@ LegoResult LegoLOD::Read(Tgl::Renderer* p_renderer, LegoTextureContainer* p_text
|
|||
return FAILURE;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x100aae20
|
||||
LegoBool LegoLOD::FUN_100aae20(const LegoChar*)
|
||||
// FUNCTION: LEGO1 0x100aae20
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ class LegoLOD : public ViewLOD {
|
|||
|
||||
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
|
||||
// LegoLOD::`scalar deleting destructor'
|
||||
|
|
Loading…
Reference in a new issue