diff --git a/LEGO1/legonavcontroller.cpp b/LEGO1/legonavcontroller.cpp index f6f339ca..0bc5301b 100644 --- a/LEGO1/legonavcontroller.cpp +++ b/LEGO1/legonavcontroller.cpp @@ -69,14 +69,8 @@ LegoNavController::LegoNavController() this->m_unk68 = 0; this->m_unk60 = 0; - // TODO: Timer(), InputManager() - // MxTimer* timer = Timer(); - // if (timer[0xc] == 0) { - // assign to this->m_Timer - // } - // else { - // assign to this->m_Timer - // } + MxTimer *timer = Timer(); + this->m_time = timer->GetTime(); // LegoInputManager* inputManager = InputManager(); // inputManager->Register(this); @@ -164,4 +158,4 @@ float LegoNavController::CalculateNewAccel(int p_pos, int p_center, float p_maxA } return result; -} +} \ No newline at end of file diff --git a/LEGO1/legonavcontroller.h b/LEGO1/legonavcontroller.h index 7e7320c5..4db75dcc 100644 --- a/LEGO1/legonavcontroller.h +++ b/LEGO1/legonavcontroller.h @@ -46,7 +46,7 @@ class LegoNavController : public MxCore float m_turnDecel; float m_turnSensitivity; MxBool m_turnUseVelocity; - MxTimer *m_Timer; + int m_time; MxBool m_trackDefault; MxBool m_unk5D; char m_unk5E[2]; diff --git a/LEGO1/legoomni.cpp b/LEGO1/legoomni.cpp index e43be3bd..1b690409 100644 --- a/LEGO1/legoomni.cpp +++ b/LEGO1/legoomni.cpp @@ -10,4 +10,4 @@ LegoOmni *LegoOmni::GetInstance() LegoOmni *Lego() { return LegoOmni::GetInstance(); -} +} \ No newline at end of file diff --git a/LEGO1/legoomni.h b/LEGO1/legoomni.h index 1d4d92ef..a9db8020 100644 --- a/LEGO1/legoomni.h +++ b/LEGO1/legoomni.h @@ -5,6 +5,7 @@ #include "mxdsaction.h" #include "mxdsfile.h" #include "mxdsobject.h" +#include "mxomni.h" #include "mxomnicreateparam.h" #include "mxresult.h" #include "mxstreamer.h" @@ -28,7 +29,7 @@ class MxMusicManager; class MxNotificationManager; class MxSoundManager; -class LegoOmni +class LegoOmni : public MxOmni { public: __declspec(dllexport) void CreateBackgroundAudio(); @@ -70,22 +71,6 @@ class LegoOmni int m_unk24; int m_unk28; int m_unk2c; - int m_unk30; - int m_unk34; - int m_unk38; - int m_unk3c; - int m_unk40; - int m_unk44; - int m_unk48; - int m_unk4c; - int m_unk50; - int m_unk54; - int m_unk58; - int m_unk5c; - int m_unk60; - int m_unk64; - int m_unk68; - int m_unk6c; LegoInputManager *m_inputMgr; static LegoOmni *m_instance; @@ -110,7 +95,6 @@ __declspec(dllexport) LegoSoundManager * SoundManager(); __declspec(dllexport) long Start(MxDSAction *); __declspec(dllexport) MxStreamer * Streamer(); __declspec(dllexport) MxTickleManager * TickleManager(); -__declspec(dllexport) MxTimer * Timer(); __declspec(dllexport) MxTransitionManager * TransitionManager(); __declspec(dllexport) MxVariableTable * VariableTable(); __declspec(dllexport) LegoVideoManager * VideoManager(); diff --git a/LEGO1/mxomni.cpp b/LEGO1/mxomni.cpp index 9ed7b6e1..fdf7e610 100644 --- a/LEGO1/mxomni.cpp +++ b/LEGO1/mxomni.cpp @@ -1,5 +1,12 @@ #include "mxomni.h" +MxOmni *MxOmni::m_instance = NULL; + +MxOmni *MxOmni::GetInstance() +{ + return m_instance; +} + MxResult MxOmni::Create(const MxOmniCreateParam &p) { if (p.CreateFlags().CreateTimer()) @@ -13,3 +20,8 @@ MxResult MxOmni::Create(const MxOmniCreateParam &p) return SUCCESS; } + +MxTimer* Timer() +{ + return MxOmni::GetInstance()->GetTimer(); +} \ No newline at end of file diff --git a/LEGO1/mxomni.h b/LEGO1/mxomni.h index 5a121323..e241c065 100644 --- a/LEGO1/mxomni.h +++ b/LEGO1/mxomni.h @@ -25,6 +25,10 @@ class MxOmni private: char padding[0x3c]; MxTimer* m_Timer; + + static MxOmni *m_instance; }; +__declspec(dllexport) MxTimer * Timer(); + #endif // MXOMNI_H diff --git a/isle.mak b/isle.mak index 80d7ce3e..ad16c24f 100644 --- a/isle.mak +++ b/isle.mak @@ -503,6 +503,7 @@ DEP_CPP_LEGOO=\ ".\LEGO1\mxdsaction.h"\ ".\LEGO1\mxdsfile.h"\ ".\LEGO1\mxdsobject.h"\ + ".\LEGO1\mxomni.h"\ ".\LEGO1\mxomnicreateflags.h"\ ".\LEGO1\mxomnicreateparam.h"\ ".\LEGO1\mxomnicreateparambase.h"\ @@ -724,6 +725,7 @@ DEP_CPP_LEGON=\ ".\LEGO1\mxdsaction.h"\ ".\LEGO1\mxdsfile.h"\ ".\LEGO1\mxdsobject.h"\ + ".\LEGO1\mxomni.h"\ ".\LEGO1\mxomnicreateflags.h"\ ".\LEGO1\mxomnicreateparam.h"\ ".\LEGO1\mxomnicreateparambase.h"\ diff --git a/isle.mdp b/isle.mdp index 335aa8d2..982addf5 100644 Binary files a/isle.mdp and b/isle.mdp differ