mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-25 01:14:19 +00:00
Tweak MxOmni::Destroy and add more beta annotations (#887)
* Fix long function name * Omni getter beta annotations * MxMisc asserts and beta annotations * Helper function for MxNotificationManager list
This commit is contained in:
@@ -5,26 +5,34 @@
|
||||
#include <assert.h>
|
||||
|
||||
// FUNCTION: LEGO1 0x100acea0
|
||||
// FUNCTION: BETA10 0x10124d30
|
||||
MxObjectFactory* ObjectFactory()
|
||||
{
|
||||
assert(MxOmni::GetInstance());
|
||||
return MxOmni::GetInstance()->GetObjectFactory();
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100aceb0
|
||||
// FUNCTION: BETA10 0x10124d77
|
||||
MxNotificationManager* NotificationManager()
|
||||
{
|
||||
assert(MxOmni::GetInstance());
|
||||
return MxOmni::GetInstance()->GetNotificationManager();
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100acec0
|
||||
// FUNCTION: BETA10 0x10124dbe
|
||||
MxTickleManager* TickleManager()
|
||||
{
|
||||
assert(MxOmni::GetInstance());
|
||||
return MxOmni::GetInstance()->GetTickleManager();
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100aced0
|
||||
// FUNCTION: BETA10 0x10124e05
|
||||
MxTimer* Timer()
|
||||
{
|
||||
assert(MxOmni::GetInstance());
|
||||
return MxOmni::GetInstance()->GetTimer();
|
||||
}
|
||||
|
||||
@@ -37,49 +45,65 @@ MxAtomSet* AtomSet()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100acef0
|
||||
// FUNCTION: BETA10 0x10124e93
|
||||
MxStreamer* Streamer()
|
||||
{
|
||||
assert(MxOmni::GetInstance());
|
||||
return MxOmni::GetInstance()->GetStreamer();
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100acf00
|
||||
// FUNCTION: BETA10 0x10124eda
|
||||
MxSoundManager* MSoundManager()
|
||||
{
|
||||
assert(MxOmni::GetInstance());
|
||||
return MxOmni::GetInstance()->GetSoundManager();
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100acf10
|
||||
// FUNCTION: BETA10 0x10124f21
|
||||
MxVideoManager* MVideoManager()
|
||||
{
|
||||
assert(MxOmni::GetInstance());
|
||||
return MxOmni::GetInstance()->GetVideoManager();
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100acf20
|
||||
// FUNCTION: BETA10 0x10124f68
|
||||
MxVariableTable* VariableTable()
|
||||
{
|
||||
assert(MxOmni::GetInstance());
|
||||
return MxOmni::GetInstance()->GetVariableTable();
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100acf30
|
||||
// FUNCTION: BETA10 0x10124faf
|
||||
MxMusicManager* MusicManager()
|
||||
{
|
||||
assert(MxOmni::GetInstance());
|
||||
return MxOmni::GetInstance()->GetMusicManager();
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100acf40
|
||||
// FUNCTION: BETA10 0x10124ff6
|
||||
MxEventManager* EventManager()
|
||||
{
|
||||
assert(MxOmni::GetInstance());
|
||||
return MxOmni::GetInstance()->GetEventManager();
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100acf50
|
||||
// FUNCTION: BETA10 0x1012503d
|
||||
MxResult Start(MxDSAction* p_dsAction)
|
||||
{
|
||||
assert(MxOmni::GetInstance());
|
||||
return MxOmni::GetInstance()->Start(p_dsAction);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100acf70
|
||||
// FUNCTION: BETA10 0x10125098
|
||||
void DeleteObject(MxDSAction& p_dsAction)
|
||||
{
|
||||
assert(MxOmni::GetInstance());
|
||||
MxOmni::GetInstance()->DeleteObject(p_dsAction);
|
||||
}
|
||||
|
||||
@@ -188,12 +188,8 @@ void MxOmni::Destroy()
|
||||
DeleteObject(action);
|
||||
}
|
||||
|
||||
// TODO: private members
|
||||
if (m_notificationManager) {
|
||||
while (m_notificationManager->GetQueue()) {
|
||||
if (m_notificationManager->GetQueue()->size() == 0) {
|
||||
break;
|
||||
}
|
||||
while (!m_notificationManager->IsEmpty()) {
|
||||
m_notificationManager->Tickle();
|
||||
}
|
||||
|
||||
@@ -211,7 +207,6 @@ void MxOmni::Destroy()
|
||||
delete m_notificationManager;
|
||||
delete m_tickleManager;
|
||||
|
||||
// There could be a tree/iterator function that does this inline
|
||||
if (m_atomSet) {
|
||||
while (m_atomSet->size() != 0) {
|
||||
// Pop each node and delete its value
|
||||
@@ -220,8 +215,10 @@ void MxOmni::Destroy()
|
||||
m_atomSet->erase(begin);
|
||||
delete value;
|
||||
}
|
||||
|
||||
delete m_atomSet;
|
||||
}
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ MxNotification::~MxNotification()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100ac250
|
||||
// FUNCTION: BETA10 0x10125805
|
||||
MxNotificationManager::MxNotificationManager() : MxCore(), m_lock(), m_listenerIds()
|
||||
{
|
||||
m_unk0x2c = 0;
|
||||
|
||||
Reference in New Issue
Block a user