mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-11-22 15:37:55 -05: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:
parent
bac891cb0c
commit
4b386fe738
6 changed files with 62 additions and 8 deletions
|
@ -118,9 +118,10 @@ class MxAtomId {
|
||||||
// _Tree<MxAtom *,MxAtom *,set<MxAtom *,MxAtomCompare,allocator<MxAtom *> >::_Kfn,MxAtomCompare,allocator<MxAtom *> >::_Insert
|
// _Tree<MxAtom *,MxAtom *,set<MxAtom *,MxAtomCompare,allocator<MxAtom *> >::_Kfn,MxAtomCompare,allocator<MxAtom *> >::_Insert
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
// TEMPLATE: BETA10 0x101237a0
|
// TEMPLATE: BETA10 0x101237a0
|
||||||
// _Tree<MxAtom *,MxAtom *,set<MxAtom *,MxAtomCompare,allocator<MxAtom *> >::_Kfn,MxAtomCompare,allocator<MxAtom *>
|
// _Tree<MxAtom *,MxAtom *,set<MxAtom *,MxAtomCompare,allocator<MxAtom *> >::_Kfn,MxAtomCompare,allocator<MxAtom *> >::const_iterator::operator*
|
||||||
// >::const_iterator::operator*
|
// clang-format on
|
||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
// TEMPLATE: LEGO1 0x100af6d0
|
// TEMPLATE: LEGO1 0x100af6d0
|
||||||
|
|
|
@ -47,8 +47,13 @@ class MxNotificationManager : public MxCore {
|
||||||
MxResult Send(MxCore* p_listener, const MxNotificationParam& p_param);
|
MxResult Send(MxCore* p_listener, const MxNotificationParam& p_param);
|
||||||
|
|
||||||
inline MxNotificationPtrList* GetQueue() { return m_queue; }
|
inline MxNotificationPtrList* GetQueue() { return m_queue; }
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x10132270
|
||||||
inline void SetActive(MxBool p_active) { m_active = p_active; }
|
inline void SetActive(MxBool p_active) { m_active = p_active; }
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x10132230
|
||||||
|
inline MxBool IsEmpty() const { return m_queue ? m_queue->empty() : TRUE; }
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100ac390
|
// SYNTHETIC: LEGO1 0x100ac390
|
||||||
// MxNotificationManager::`scalar deleting destructor'
|
// MxNotificationManager::`scalar deleting destructor'
|
||||||
|
|
||||||
|
@ -86,4 +91,7 @@ class MxNotificationManager : public MxCore {
|
||||||
// SYNTHETIC: LEGO1 0x100accd0
|
// SYNTHETIC: LEGO1 0x100accd0
|
||||||
// MxNotificationPtrList::~MxNotificationPtrList
|
// MxNotificationPtrList::~MxNotificationPtrList
|
||||||
|
|
||||||
|
// TEMPLATE: BETA10 0x10129670
|
||||||
|
// list<MxNotification *,allocator<MxNotification *> >::empty
|
||||||
|
|
||||||
#endif // MXNOTIFICATIONMANAGER_H
|
#endif // MXNOTIFICATIONMANAGER_H
|
||||||
|
|
|
@ -59,17 +59,40 @@ class MxOmni : public MxCore {
|
||||||
static MxBool ActionSourceEquals(MxDSAction* p_action, const char* p_name);
|
static MxBool ActionSourceEquals(MxDSAction* p_action, const char* p_name);
|
||||||
|
|
||||||
HWND GetWindowHandle() const { return this->m_windowHandle; }
|
HWND GetWindowHandle() const { return this->m_windowHandle; }
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x10125100
|
||||||
MxObjectFactory* GetObjectFactory() const { return this->m_objectFactory; }
|
MxObjectFactory* GetObjectFactory() const { return this->m_objectFactory; }
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x10125120
|
||||||
MxNotificationManager* GetNotificationManager() const { return this->m_notificationManager; }
|
MxNotificationManager* GetNotificationManager() const { return this->m_notificationManager; }
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x10125140
|
||||||
MxTickleManager* GetTickleManager() const { return this->m_tickleManager; }
|
MxTickleManager* GetTickleManager() const { return this->m_tickleManager; }
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x10125160
|
||||||
MxTimer* GetTimer() const { return this->m_timer; }
|
MxTimer* GetTimer() const { return this->m_timer; }
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x101251a0
|
||||||
MxStreamer* GetStreamer() const { return this->m_streamer; }
|
MxStreamer* GetStreamer() const { return this->m_streamer; }
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x100e5250
|
||||||
MxSoundManager* GetSoundManager() const { return this->m_soundManager; }
|
MxSoundManager* GetSoundManager() const { return this->m_soundManager; }
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x1009e860
|
||||||
MxVideoManager* GetVideoManager() const { return this->m_videoManager; }
|
MxVideoManager* GetVideoManager() const { return this->m_videoManager; }
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x101251c0
|
||||||
MxVariableTable* GetVariableTable() const { return this->m_variableTable; }
|
MxVariableTable* GetVariableTable() const { return this->m_variableTable; }
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x101251e0
|
||||||
MxMusicManager* GetMusicManager() const { return this->m_musicManager; }
|
MxMusicManager* GetMusicManager() const { return this->m_musicManager; }
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x10125200
|
||||||
MxEventManager* GetEventManager() const { return this->m_eventManager; }
|
MxEventManager* GetEventManager() const { return this->m_eventManager; }
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x10125180
|
||||||
MxAtomSet* GetAtomSet() const { return this->m_atomSet; }
|
MxAtomSet* GetAtomSet() const { return this->m_atomSet; }
|
||||||
|
|
||||||
MxLong HandleEndAction(MxParam& p_param);
|
MxLong HandleEndAction(MxParam& p_param);
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100aefd0
|
// SYNTHETIC: LEGO1 0x100aefd0
|
||||||
|
|
|
@ -5,26 +5,34 @@
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100acea0
|
// FUNCTION: LEGO1 0x100acea0
|
||||||
|
// FUNCTION: BETA10 0x10124d30
|
||||||
MxObjectFactory* ObjectFactory()
|
MxObjectFactory* ObjectFactory()
|
||||||
{
|
{
|
||||||
|
assert(MxOmni::GetInstance());
|
||||||
return MxOmni::GetInstance()->GetObjectFactory();
|
return MxOmni::GetInstance()->GetObjectFactory();
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100aceb0
|
// FUNCTION: LEGO1 0x100aceb0
|
||||||
|
// FUNCTION: BETA10 0x10124d77
|
||||||
MxNotificationManager* NotificationManager()
|
MxNotificationManager* NotificationManager()
|
||||||
{
|
{
|
||||||
|
assert(MxOmni::GetInstance());
|
||||||
return MxOmni::GetInstance()->GetNotificationManager();
|
return MxOmni::GetInstance()->GetNotificationManager();
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100acec0
|
// FUNCTION: LEGO1 0x100acec0
|
||||||
|
// FUNCTION: BETA10 0x10124dbe
|
||||||
MxTickleManager* TickleManager()
|
MxTickleManager* TickleManager()
|
||||||
{
|
{
|
||||||
|
assert(MxOmni::GetInstance());
|
||||||
return MxOmni::GetInstance()->GetTickleManager();
|
return MxOmni::GetInstance()->GetTickleManager();
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100aced0
|
// FUNCTION: LEGO1 0x100aced0
|
||||||
|
// FUNCTION: BETA10 0x10124e05
|
||||||
MxTimer* Timer()
|
MxTimer* Timer()
|
||||||
{
|
{
|
||||||
|
assert(MxOmni::GetInstance());
|
||||||
return MxOmni::GetInstance()->GetTimer();
|
return MxOmni::GetInstance()->GetTimer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,49 +45,65 @@ MxAtomSet* AtomSet()
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100acef0
|
// FUNCTION: LEGO1 0x100acef0
|
||||||
|
// FUNCTION: BETA10 0x10124e93
|
||||||
MxStreamer* Streamer()
|
MxStreamer* Streamer()
|
||||||
{
|
{
|
||||||
|
assert(MxOmni::GetInstance());
|
||||||
return MxOmni::GetInstance()->GetStreamer();
|
return MxOmni::GetInstance()->GetStreamer();
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100acf00
|
// FUNCTION: LEGO1 0x100acf00
|
||||||
|
// FUNCTION: BETA10 0x10124eda
|
||||||
MxSoundManager* MSoundManager()
|
MxSoundManager* MSoundManager()
|
||||||
{
|
{
|
||||||
|
assert(MxOmni::GetInstance());
|
||||||
return MxOmni::GetInstance()->GetSoundManager();
|
return MxOmni::GetInstance()->GetSoundManager();
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100acf10
|
// FUNCTION: LEGO1 0x100acf10
|
||||||
|
// FUNCTION: BETA10 0x10124f21
|
||||||
MxVideoManager* MVideoManager()
|
MxVideoManager* MVideoManager()
|
||||||
{
|
{
|
||||||
|
assert(MxOmni::GetInstance());
|
||||||
return MxOmni::GetInstance()->GetVideoManager();
|
return MxOmni::GetInstance()->GetVideoManager();
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100acf20
|
// FUNCTION: LEGO1 0x100acf20
|
||||||
|
// FUNCTION: BETA10 0x10124f68
|
||||||
MxVariableTable* VariableTable()
|
MxVariableTable* VariableTable()
|
||||||
{
|
{
|
||||||
|
assert(MxOmni::GetInstance());
|
||||||
return MxOmni::GetInstance()->GetVariableTable();
|
return MxOmni::GetInstance()->GetVariableTable();
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100acf30
|
// FUNCTION: LEGO1 0x100acf30
|
||||||
|
// FUNCTION: BETA10 0x10124faf
|
||||||
MxMusicManager* MusicManager()
|
MxMusicManager* MusicManager()
|
||||||
{
|
{
|
||||||
|
assert(MxOmni::GetInstance());
|
||||||
return MxOmni::GetInstance()->GetMusicManager();
|
return MxOmni::GetInstance()->GetMusicManager();
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100acf40
|
// FUNCTION: LEGO1 0x100acf40
|
||||||
|
// FUNCTION: BETA10 0x10124ff6
|
||||||
MxEventManager* EventManager()
|
MxEventManager* EventManager()
|
||||||
{
|
{
|
||||||
|
assert(MxOmni::GetInstance());
|
||||||
return MxOmni::GetInstance()->GetEventManager();
|
return MxOmni::GetInstance()->GetEventManager();
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100acf50
|
// FUNCTION: LEGO1 0x100acf50
|
||||||
|
// FUNCTION: BETA10 0x1012503d
|
||||||
MxResult Start(MxDSAction* p_dsAction)
|
MxResult Start(MxDSAction* p_dsAction)
|
||||||
{
|
{
|
||||||
|
assert(MxOmni::GetInstance());
|
||||||
return MxOmni::GetInstance()->Start(p_dsAction);
|
return MxOmni::GetInstance()->Start(p_dsAction);
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100acf70
|
// FUNCTION: LEGO1 0x100acf70
|
||||||
|
// FUNCTION: BETA10 0x10125098
|
||||||
void DeleteObject(MxDSAction& p_dsAction)
|
void DeleteObject(MxDSAction& p_dsAction)
|
||||||
{
|
{
|
||||||
|
assert(MxOmni::GetInstance());
|
||||||
MxOmni::GetInstance()->DeleteObject(p_dsAction);
|
MxOmni::GetInstance()->DeleteObject(p_dsAction);
|
||||||
}
|
}
|
||||||
|
|
|
@ -188,12 +188,8 @@ void MxOmni::Destroy()
|
||||||
DeleteObject(action);
|
DeleteObject(action);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: private members
|
|
||||||
if (m_notificationManager) {
|
if (m_notificationManager) {
|
||||||
while (m_notificationManager->GetQueue()) {
|
while (!m_notificationManager->IsEmpty()) {
|
||||||
if (m_notificationManager->GetQueue()->size() == 0) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
m_notificationManager->Tickle();
|
m_notificationManager->Tickle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -211,7 +207,6 @@ void MxOmni::Destroy()
|
||||||
delete m_notificationManager;
|
delete m_notificationManager;
|
||||||
delete m_tickleManager;
|
delete m_tickleManager;
|
||||||
|
|
||||||
// There could be a tree/iterator function that does this inline
|
|
||||||
if (m_atomSet) {
|
if (m_atomSet) {
|
||||||
while (m_atomSet->size() != 0) {
|
while (m_atomSet->size() != 0) {
|
||||||
// Pop each node and delete its value
|
// Pop each node and delete its value
|
||||||
|
@ -220,8 +215,10 @@ void MxOmni::Destroy()
|
||||||
m_atomSet->erase(begin);
|
m_atomSet->erase(begin);
|
||||||
delete value;
|
delete value;
|
||||||
}
|
}
|
||||||
|
|
||||||
delete m_atomSet;
|
delete m_atomSet;
|
||||||
}
|
}
|
||||||
|
|
||||||
Init();
|
Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@ MxNotification::~MxNotification()
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100ac250
|
// FUNCTION: LEGO1 0x100ac250
|
||||||
|
// FUNCTION: BETA10 0x10125805
|
||||||
MxNotificationManager::MxNotificationManager() : MxCore(), m_lock(), m_listenerIds()
|
MxNotificationManager::MxNotificationManager() : MxCore(), m_lock(), m_listenerIds()
|
||||||
{
|
{
|
||||||
m_unk0x2c = 0;
|
m_unk0x2c = 0;
|
||||||
|
|
Loading…
Reference in a new issue