mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-24 17:04:17 +00:00
Match LegoOmni::Destroy and related (#917)
* Match LegoOmni::Destroy and related * Write COMPAT_MODE macro differently * fix lint issue
This commit is contained in:
committed by
GitHub
parent
ccf33575db
commit
939c09139f
@@ -52,6 +52,26 @@ LegoCharacterManager::LegoCharacterManager()
|
||||
VariableTable()->SetVariable(m_customizeAnimFile);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10083180
|
||||
// FUNCTION: BETA10 0x10073dad
|
||||
LegoCharacterManager::~LegoCharacterManager()
|
||||
{
|
||||
LegoCharacter* character = NULL;
|
||||
LegoCharacterMap::iterator it;
|
||||
|
||||
for (it = m_characters->begin(); it != m_characters->end(); it++) {
|
||||
character = (*it).second;
|
||||
|
||||
RemoveROI(character->m_roi);
|
||||
|
||||
delete[] (*it).first;
|
||||
delete (*it).second;
|
||||
}
|
||||
|
||||
delete m_characters;
|
||||
delete[] g_customizeAnimFile;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10083270
|
||||
void LegoCharacterManager::Init()
|
||||
{
|
||||
|
||||
@@ -114,6 +114,7 @@ void LegoOmni::Destroy()
|
||||
}
|
||||
|
||||
if (m_textureContainer) {
|
||||
m_textureContainer->Clear();
|
||||
delete m_textureContainer;
|
||||
m_textureContainer = NULL;
|
||||
}
|
||||
@@ -128,16 +129,10 @@ void LegoOmni::Destroy()
|
||||
m_inputManager = NULL;
|
||||
}
|
||||
|
||||
if (m_inputManager) {
|
||||
delete m_inputManager;
|
||||
m_inputManager = NULL;
|
||||
}
|
||||
|
||||
// todo FUN_10046de0
|
||||
LegoPathController::Reset();
|
||||
|
||||
if (m_bkgAudioManager) {
|
||||
m_bkgAudioManager->Stop();
|
||||
|
||||
delete m_bkgAudioManager;
|
||||
m_bkgAudioManager = NULL;
|
||||
}
|
||||
@@ -150,7 +145,9 @@ void LegoOmni::Destroy()
|
||||
m_action.ClearAtom();
|
||||
DestroyScripts();
|
||||
|
||||
delete[] m_scripts;
|
||||
if (m_scripts) {
|
||||
delete[] m_scripts;
|
||||
}
|
||||
|
||||
MxOmni::Destroy();
|
||||
}
|
||||
|
||||
@@ -428,6 +428,25 @@ MxResult LegoPathController::Init()
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10046de0
|
||||
// FUNCTION: BETA10 0x100b779e
|
||||
MxResult LegoPathController::Reset()
|
||||
{
|
||||
if (g_ctrlBoundariesA == NULL || g_ctrlEdgesA == NULL) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
delete[] g_ctrlBoundariesA;
|
||||
delete[] g_ctrlEdgesA;
|
||||
delete[] g_ctrlBoundariesB;
|
||||
delete[] g_ctrlEdgesB;
|
||||
g_ctrlBoundariesA = NULL;
|
||||
g_ctrlEdgesA = NULL;
|
||||
g_ctrlBoundariesB = NULL;
|
||||
g_ctrlEdgesB = NULL;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10046e50
|
||||
// FUNCTION: BETA10 0x100b781f
|
||||
MxResult LegoPathController::Read(LegoStorage* p_storage)
|
||||
|
||||
Reference in New Issue
Block a user