added Timer(), GetTime to LegoNavController

This commit is contained in:
Christian Semmler 2023-06-16 11:29:40 +02:00
parent 79a5cf2e88
commit 56c92147af
No known key found for this signature in database
GPG Key ID: 086DAA1360BEEE5C
8 changed files with 25 additions and 29 deletions

View File

@ -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;
}
}

View File

@ -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];

View File

@ -10,4 +10,4 @@ LegoOmni *LegoOmni::GetInstance()
LegoOmni *Lego()
{
return LegoOmni::GetInstance();
}
}

View File

@ -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();

View File

@ -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();
}

View File

@ -25,6 +25,10 @@ class MxOmni
private:
char padding[0x3c];
MxTimer* m_Timer;
static MxOmni *m_instance;
};
__declspec(dllexport) MxTimer * Timer();
#endif // MXOMNI_H

View File

@ -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"\

BIN
isle.mdp

Binary file not shown.