From 97dc0701abf7d905c260de13edecff46323a4872 Mon Sep 17 00:00:00 2001 From: Misha Date: Thu, 29 Jun 2023 16:08:08 +0300 Subject: [PATCH] Move get* helpers to their correct locations --- LEGO1/legoomni.h | 7 ------- LEGO1/mxomni.cpp | 54 ++++++++++++++++++++++++++++++++++++++++++++++++ LEGO1/mxomni.h | 18 +++++++++++++--- 3 files changed, 69 insertions(+), 10 deletions(-) diff --git a/LEGO1/legoomni.h b/LEGO1/legoomni.h index 69a0c62b..7bfc1f8d 100644 --- a/LEGO1/legoomni.h +++ b/LEGO1/legoomni.h @@ -93,26 +93,19 @@ class LegoOmni : public MxOmni __declspec(dllexport) MxBackgroundAudioManager * BackgroundAudioManager(); __declspec(dllexport) MxDSObject * CreateStreamObject(MxDSFile *,short); -__declspec(dllexport) MxEventManager * EventManager(); __declspec(dllexport) LegoGameState * GameState(); __declspec(dllexport) const char * GetNoCD_SourceName(); __declspec(dllexport) LegoInputManager * InputManager(); __declspec(dllexport) LegoOmni * Lego(); -__declspec(dllexport) MxSoundManager * MSoundManager(); __declspec(dllexport) void MakeSourceName(char *, const char *); -__declspec(dllexport) MxMusicManager * MusicManager(); __declspec(dllexport) MxNotificationManager * NotificationManager(); __declspec(dllexport) LegoEntity * PickEntity(long,long); __declspec(dllexport) LegoROI * PickROI(long,long); __declspec(dllexport) void SetOmniUserMessage(void (*)(const char *,int)); __declspec(dllexport) LegoSoundManager * SoundManager(); __declspec(dllexport) long Start(MxDSAction *); -__declspec(dllexport) MxStreamer * Streamer(); -__declspec(dllexport) MxTickleManager * TickleManager(); __declspec(dllexport) MxTransitionManager * TransitionManager(); -__declspec(dllexport) MxVariableTable * VariableTable(); __declspec(dllexport) LegoVideoManager * VideoManager(); - __declspec(dllexport) long Start(MxDSAction *a); LegoBuildingManager* BuildingManager(); diff --git a/LEGO1/mxomni.cpp b/LEGO1/mxomni.cpp index e8616f03..9b7cedbc 100644 --- a/LEGO1/mxomni.cpp +++ b/LEGO1/mxomni.cpp @@ -83,8 +83,62 @@ long MxOmni::Notify(MxParam &p) return 0; } +// OFFSET: LEGO1 0x100acea0 +MxObjectFactory *ObjectFactory() +{ + return MxOmni::GetInstance()->GetObjectFactory(); +} + +// OFFSET: LEGO1 0x100aceb0 +MxNotificationManager *NotificationManager() +{ + return MxOmni::GetInstance()->GetNotificationManager(); +} + +// OFFSET: LEGO1 0x100acec0 +MxTickleManager *TickleManager() +{ + return MxOmni::GetInstance()->GetTickleManager(); +} + // OFFSET: LEGO1 0x100aced0 MxTimer *Timer() { return MxOmni::GetInstance()->GetTimer(); } + +// OFFSET: LEGO1 0x100acef0 +MxStreamer* Streamer() +{ + return MxOmni::GetInstance()->GetStreamer(); +} + +// OFFSET: LEGO1 0x100acf00 +MxSoundManager* MSoundManager() +{ + return MxOmni::GetInstance()->GetSoundManager(); +} + +// OFFSET: LEGO1 0x100acf10 +MxVideoManager* MVideoManager() +{ + return MxOmni::GetInstance()->GetVideoManager(); +} + +// OFFSET: LEGO1 0x100acf20 +MxVariableTable* VariableTable() +{ + return MxOmni::GetInstance()->GetVariableTable(); +} + +// OFFSET: LEGO1 0x100acf30 +MxMusicManager* MusicManager() +{ + return MxOmni::GetInstance()->GetMusicManager(); +} + +// OFFSET: LEGO1 0x100acf40 +MxEventManager* EventManager() +{ + return MxOmni::GetInstance()->GetEventManager(); +} \ No newline at end of file diff --git a/LEGO1/mxomni.h b/LEGO1/mxomni.h index b73df50d..e79e8d17 100644 --- a/LEGO1/mxomni.h +++ b/LEGO1/mxomni.h @@ -36,9 +36,16 @@ class MxOmni : public MxCore virtual MxResult Create(MxOmniCreateParam &p); // vtable+18 virtual void Destroy(); // vtable+1c static void SetInstance(MxOmni* instance); - + MxObjectFactory* GetObjectFactory() const { return this->m_objectFactory; } + MxNotificationManager* GetNotificationManager() const { return this->m_notificationManager; } + MxTickleManager* GetTickleManager() const { return this->m_tickleManager; } MxTimer* GetTimer() const { return this->m_timer; } - + MxStreamer* GetStreamer() const { return this->m_streamer; } + MxSoundManager* GetSoundManager() const { return this->m_soundManager; } + MxVideoManager* GetVideoManager() const { return this->m_videoManager; } + MxVariableTable* GetVariableTable() const { return this->m_variableTable; } + MxMusicManager* GetMusicManager() const { return this->m_musicManager; } + MxEventManager* GetEventManager() const { return this->m_eventManager; } protected: static MxOmni* m_instance; @@ -61,7 +68,12 @@ class MxOmni : public MxCore unsigned char m_unk64; // 0x64 }; - +__declspec(dllexport) MxTickleManager * TickleManager(); __declspec(dllexport) MxTimer * Timer(); +__declspec(dllexport) MxStreamer * Streamer(); +__declspec(dllexport) MxSoundManager * MSoundManager(); +__declspec(dllexport) MxVariableTable * VariableTable(); +__declspec(dllexport) MxMusicManager * MusicManager(); +__declspec(dllexport) MxEventManager * EventManager(); #endif // MXOMNI_H