mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-11-29 10:55:42 -05:00
Implement/match LegoPathController::Destroy (#912)
This commit is contained in:
parent
dcaa07cc49
commit
32a3373360
1 changed files with 52 additions and 2 deletions
|
@ -131,10 +131,60 @@ MxResult LegoPathController::Create(MxU8* p_data, const Vector3& p_location, con
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x10045b20
|
// FUNCTION: LEGO1 0x10045b20
|
||||||
|
// FUNCTION: BETA10 0x100b6b8a
|
||||||
void LegoPathController::Destroy()
|
void LegoPathController::Destroy()
|
||||||
{
|
{
|
||||||
// TODO
|
TickleManager()->UnregisterClient(this);
|
||||||
|
|
||||||
|
if (m_boundaries != NULL) {
|
||||||
|
delete[] m_boundaries;
|
||||||
|
}
|
||||||
|
m_boundaries = NULL;
|
||||||
|
m_numL = 0;
|
||||||
|
|
||||||
|
if (m_unk0x10 != NULL) {
|
||||||
|
delete[] m_unk0x10;
|
||||||
|
}
|
||||||
|
m_unk0x10 = NULL;
|
||||||
|
m_numN = 0;
|
||||||
|
|
||||||
|
if (m_structs != NULL) {
|
||||||
|
delete[] m_structs;
|
||||||
|
}
|
||||||
|
m_structs = NULL;
|
||||||
|
m_numT = 0;
|
||||||
|
|
||||||
|
if (m_edges != NULL) {
|
||||||
|
delete[] m_edges;
|
||||||
|
}
|
||||||
|
m_edges = NULL;
|
||||||
|
m_numE = 0;
|
||||||
|
|
||||||
|
MxS32 j;
|
||||||
|
for (j = 0; j < _countof(g_unk0x100f42f0); j++) {
|
||||||
|
if (g_ctrlBoundariesA[j].m_controller == this) {
|
||||||
|
g_ctrlBoundariesA[j].m_controller = NULL;
|
||||||
|
g_ctrlBoundariesA[j].m_boundary = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (g_ctrlEdgesA[j].m_controller == this) {
|
||||||
|
g_ctrlEdgesA[j].m_controller = NULL;
|
||||||
|
g_ctrlEdgesA[j].m_edge = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (j = 0; j < _countof(g_unk0x100f4330); j++) {
|
||||||
|
if (g_ctrlBoundariesB[j].m_controller == this) {
|
||||||
|
g_ctrlBoundariesB[j].m_controller = NULL;
|
||||||
|
g_ctrlBoundariesB[j].m_boundary = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (g_ctrlEdgesB[j].m_controller == this) {
|
||||||
|
g_ctrlEdgesB[j].m_controller = NULL;
|
||||||
|
g_ctrlEdgesB[j].m_edge = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x10045c10
|
// STUB: LEGO1 0x10045c10
|
||||||
|
|
Loading…
Reference in a new issue