mirror of
https://github.com/isledecomp/isle.git
synced 2024-11-26 01:28:30 -05:00
implement a few mxomni/legoomni functions (#193)
This commit is contained in:
parent
0db96ce2d6
commit
625ee52fe0
5 changed files with 33 additions and 16 deletions
|
@ -708,7 +708,7 @@ inline void IsleApp::Tick(BOOL sleepIfNotNextFrame)
|
|||
}
|
||||
|
||||
if (this->m_frameDelta + g_lastFrameTime < currentTime) {
|
||||
if (!Lego()->vtable40()) {
|
||||
if (!Lego()->IsTimerRunning()) {
|
||||
TickleManager()->Tickle();
|
||||
}
|
||||
g_lastFrameTime = currentTime;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include "legoutil.h"
|
||||
|
||||
// 0x100f4588
|
||||
char *g_nocdSourceName = NULL;
|
||||
MxAtomId *g_nocdSourceName = NULL;
|
||||
|
||||
// 0x101020e8
|
||||
void (*g_omniUserMessage)(const char *,int);
|
||||
|
@ -225,7 +225,7 @@ MxTransitionManager *TransitionManager()
|
|||
// OFFSET: LEGO1 0x10053430
|
||||
const char *GetNoCD_SourceName()
|
||||
{
|
||||
return g_nocdSourceName;
|
||||
return g_nocdSourceName->GetInternal();
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1005b5f0
|
||||
|
@ -252,7 +252,23 @@ LegoEntity *PickEntity(MxLong,MxLong)
|
|||
// OFFSET: LEGO1 0x10058bd0
|
||||
void LegoOmni::Init()
|
||||
{
|
||||
// FIXME: Stub
|
||||
MxOmni::Init();
|
||||
m_unk68 = 0;
|
||||
m_inputMgr = NULL;
|
||||
m_unk6c = 0;
|
||||
m_unk74 = 0;
|
||||
m_unk78 = 0;
|
||||
m_currentWorld = NULL;
|
||||
m_unk80 = FALSE;
|
||||
m_isle = NULL;
|
||||
m_unk8c = 0;
|
||||
m_plantManager = NULL;
|
||||
m_gameState = NULL;
|
||||
m_animationManager = NULL;
|
||||
m_buildingManager = NULL;
|
||||
m_bkgAudioManager = NULL;
|
||||
m_unk13c = TRUE;
|
||||
m_transitionManager = NULL;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10058e70
|
||||
|
@ -266,6 +282,7 @@ MxResult LegoOmni::Create(COMPAT_CONST MxOmniCreateParam &p)
|
|||
return SUCCESS;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10058c30 STUB
|
||||
void LegoOmni::Destroy()
|
||||
{
|
||||
// FIXME: Stub
|
||||
|
@ -322,12 +339,6 @@ void LegoOmni::StopTimer()
|
|||
SetAppCursor(0);
|
||||
}
|
||||
|
||||
MxBool LegoOmni::vtable40()
|
||||
{
|
||||
// FIXME: Stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100157a0
|
||||
LegoWorld *GetCurrentWorld()
|
||||
{
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include "compat.h"
|
||||
#include "mxomni.h"
|
||||
#include "mxdsaction.h"
|
||||
#include "legoanimationmanager.h"
|
||||
|
||||
class Isle;
|
||||
class LegoBuildingManager;
|
||||
|
@ -62,7 +63,6 @@ class LegoOmni : public MxOmni
|
|||
virtual void NotifyCurrentEntity() override;
|
||||
virtual void StartTimer() override;
|
||||
virtual void StopTimer() override;
|
||||
virtual MxBool vtable40();
|
||||
|
||||
LegoVideoManager *GetVideoManager() { return (LegoVideoManager *) m_videoManager; }
|
||||
LegoSoundManager *GetSoundManager() { return (LegoSoundManager *)m_soundManager;}
|
||||
|
@ -83,19 +83,18 @@ class LegoOmni : public MxOmni
|
|||
undefined4 m_unk74;
|
||||
undefined4 m_unk78;
|
||||
LegoWorld *m_currentWorld;
|
||||
undefined4 m_unk80;
|
||||
MxBool m_unk80;
|
||||
LegoNavController *m_navController; // 0x84
|
||||
Isle* m_isle; // 0x88
|
||||
char m_unk8c[0x4];
|
||||
undefined4 m_unk8c;
|
||||
LegoPlantManager* m_plantManager; // 0x90
|
||||
char m_unk94[0x4];
|
||||
LegoAnimationManager* m_animationManager;
|
||||
LegoBuildingManager* m_buildingManager; // 0x98
|
||||
LegoGameState *m_gameState; // 0x9c
|
||||
MxDSAction m_action;
|
||||
MxBackgroundAudioManager *m_bkgAudioManager; // 0x134
|
||||
MxTransitionManager *m_transitionManager; // 0x138
|
||||
int m_unk13c;
|
||||
|
||||
MxBool m_unk13c;
|
||||
};
|
||||
|
||||
__declspec(dllexport) MxBackgroundAudioManager * BackgroundAudioManager();
|
||||
|
|
|
@ -121,6 +121,12 @@ void MxOmni::StopTimer()
|
|||
}
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10058a90
|
||||
MxBool MxOmni::IsTimerRunning()
|
||||
{
|
||||
return m_timerRunning;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100b0690
|
||||
void MxOmni::DestroyInstance()
|
||||
{
|
||||
|
|
|
@ -48,6 +48,7 @@ class MxOmni : public MxCore
|
|||
virtual void NotifyCurrentEntity(); // vtable+34
|
||||
virtual void StartTimer(); // vtable+38
|
||||
virtual void StopTimer(); // vtable+3c
|
||||
virtual MxBool IsTimerRunning(); //vtable+40
|
||||
static void SetInstance(MxOmni* instance);
|
||||
HWND GetWindowHandle() const { return this->m_windowHandle; }
|
||||
MxObjectFactory* GetObjectFactory() const { return this->m_objectFactory; }
|
||||
|
|
Loading…
Reference in a new issue