mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-11-22 15:37:55 -05:00
Implement MxOmni Start/stop timer (#181)
* Implement start/stop timer * Mark StartDirectSound as stub * remove accidently committed files
This commit is contained in:
parent
907c85616b
commit
8281e195f7
7 changed files with 54 additions and 16 deletions
|
@ -104,7 +104,7 @@ void IsleApp::Close()
|
||||||
Lego()->RemoveWorld(ds.GetAtomId(), ds.GetObjectId());
|
Lego()->RemoveWorld(ds.GetAtomId(), ds.GetObjectId());
|
||||||
Lego()->DeleteObject(ds);
|
Lego()->DeleteObject(ds);
|
||||||
TransitionManager()->SetWaitIndicator(NULL);
|
TransitionManager()->SetWaitIndicator(NULL);
|
||||||
Lego()->vtable0x3c();
|
Lego()->StopTimer();
|
||||||
|
|
||||||
MxLong lVar8;
|
MxLong lVar8;
|
||||||
do {
|
do {
|
||||||
|
@ -243,7 +243,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
|
||||||
g_reqEnableRMDevice = 0;
|
g_reqEnableRMDevice = 0;
|
||||||
VideoManager()->EnableRMDevice();
|
VideoManager()->EnableRMDevice();
|
||||||
g_rmDisabled = 0;
|
g_rmDisabled = 0;
|
||||||
Lego()->vtable0x3c();
|
Lego()->StopTimer();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_closed) {
|
if (g_closed) {
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
#include "mxbackgroundaudiomanager.h"
|
#include "mxbackgroundaudiomanager.h"
|
||||||
#include "mxdsfile.h"
|
#include "mxdsfile.h"
|
||||||
#include "legogamestate.h"
|
#include "legogamestate.h"
|
||||||
|
#include "legoutil.h"
|
||||||
|
|
||||||
// 0x100f4588
|
// 0x100f4588
|
||||||
char *g_nocdSourceName = NULL;
|
char *g_nocdSourceName = NULL;
|
||||||
|
@ -307,14 +308,18 @@ void LegoOmni::NotifyCurrentEntity()
|
||||||
// FIXME: Stub
|
// FIXME: Stub
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x1005b640
|
||||||
void LegoOmni::StartTimer()
|
void LegoOmni::StartTimer()
|
||||||
{
|
{
|
||||||
// FIXME: Stub
|
MxOmni::StartTimer();
|
||||||
|
SetAppCursor(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LegoOmni::vtable0x3c()
|
// OFFSET: LEGO1 0x1005b650
|
||||||
|
void LegoOmni::StopTimer()
|
||||||
{
|
{
|
||||||
// FIXME: Stub
|
MxOmni::StopTimer();
|
||||||
|
SetAppCursor(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
MxBool LegoOmni::vtable40()
|
MxBool LegoOmni::vtable40()
|
||||||
|
|
|
@ -61,7 +61,7 @@ class LegoOmni : public MxOmni
|
||||||
virtual int vtable0x30(char*, int, MxCore*) override;
|
virtual int vtable0x30(char*, int, MxCore*) override;
|
||||||
virtual void NotifyCurrentEntity() override;
|
virtual void NotifyCurrentEntity() override;
|
||||||
virtual void StartTimer() override;
|
virtual void StartTimer() override;
|
||||||
virtual void vtable0x3c() override;
|
virtual void StopTimer() override;
|
||||||
virtual MxBool vtable40();
|
virtual MxBool vtable40();
|
||||||
|
|
||||||
LegoVideoManager *GetVideoManager() { return (LegoVideoManager *) m_videoManager; }
|
LegoVideoManager *GetVideoManager() { return (LegoVideoManager *) m_videoManager; }
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#include "mxatomidcounter.h"
|
#include "mxatomidcounter.h"
|
||||||
#include "mxeventmanager.h"
|
#include "mxeventmanager.h"
|
||||||
#include "mxmusicmanager.h"
|
#include "mxmusicmanager.h"
|
||||||
#include "mxnotificationmanager.h"
|
#include "mxnotificationmanager.h"
|
||||||
#include "mxobjectfactory.h"
|
#include "mxobjectfactory.h"
|
||||||
#include "mxomnicreateparam.h"
|
#include "mxomnicreateparam.h"
|
||||||
|
@ -51,7 +51,7 @@ void MxOmni::Init()
|
||||||
m_timer = NULL;
|
m_timer = NULL;
|
||||||
m_streamer = NULL;
|
m_streamer = NULL;
|
||||||
m_atomIdCounterSet = NULL;
|
m_atomIdCounterSet = NULL;
|
||||||
m_unk64 = NULL;
|
m_timerRunning = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x100b0090
|
// OFFSET: LEGO1 0x100b0090
|
||||||
|
@ -98,16 +98,26 @@ void MxOmni::NotifyCurrentEntity()
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x100b09d0 STUB
|
// OFFSET: LEGO1 0x100b09d0
|
||||||
void MxOmni::StartTimer()
|
void MxOmni::StartTimer()
|
||||||
{
|
{
|
||||||
// TODO
|
if (m_timerRunning == FALSE && m_timer != NULL && m_soundManager != NULL)
|
||||||
|
{
|
||||||
|
m_timer->Start();
|
||||||
|
m_soundManager->vtable0x34();
|
||||||
|
m_timerRunning = TRUE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x100b0a00 STUB
|
// OFFSET: LEGO1 0x100b0a00
|
||||||
void MxOmni::vtable0x3c()
|
void MxOmni::StopTimer()
|
||||||
{
|
{
|
||||||
// TODO
|
if (m_timerRunning != FALSE && m_timer != NULL && m_soundManager != NULL)
|
||||||
|
{
|
||||||
|
m_timer->Stop();
|
||||||
|
m_soundManager->vtable0x38();
|
||||||
|
m_timerRunning = FALSE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x100b0690
|
// OFFSET: LEGO1 0x100b0690
|
||||||
|
|
|
@ -47,7 +47,7 @@ class MxOmni : public MxCore
|
||||||
virtual int vtable0x30(char*, int, MxCore*); // vtable+30
|
virtual int vtable0x30(char*, int, MxCore*); // vtable+30
|
||||||
virtual void NotifyCurrentEntity(); // vtable+34
|
virtual void NotifyCurrentEntity(); // vtable+34
|
||||||
virtual void StartTimer(); // vtable+38
|
virtual void StartTimer(); // vtable+38
|
||||||
virtual void vtable0x3c(); // vtable+3c
|
virtual void StopTimer(); // vtable+3c
|
||||||
static void SetInstance(MxOmni* instance);
|
static void SetInstance(MxOmni* instance);
|
||||||
HWND GetWindowHandle() const { return this->m_windowHandle; }
|
HWND GetWindowHandle() const { return this->m_windowHandle; }
|
||||||
MxObjectFactory* GetObjectFactory() const { return this->m_objectFactory; }
|
MxObjectFactory* GetObjectFactory() const { return this->m_objectFactory; }
|
||||||
|
@ -81,7 +81,7 @@ class MxOmni : public MxCore
|
||||||
|
|
||||||
MxCriticalSection m_criticalsection; // 0x48
|
MxCriticalSection m_criticalsection; // 0x48
|
||||||
|
|
||||||
unsigned char m_unk64; // 0x64
|
MxBool m_timerRunning; // 0x64
|
||||||
};
|
};
|
||||||
__declspec(dllexport) MxTickleManager * TickleManager();
|
__declspec(dllexport) MxTickleManager * TickleManager();
|
||||||
__declspec(dllexport) MxTimer * Timer();
|
__declspec(dllexport) MxTimer * Timer();
|
||||||
|
|
|
@ -46,4 +46,23 @@ void MxSoundManager::Destroy(MxBool p_param)
|
||||||
if (!p_param) {
|
if (!p_param) {
|
||||||
MxAudioManager::Destroy();
|
MxAudioManager::Destroy();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x100ae8b0 STUB
|
||||||
|
MxResult MxSoundManager::StartDirectSound(undefined4 p_unknown1, MxBool p_unknown2)
|
||||||
|
{
|
||||||
|
// TODO STUB
|
||||||
|
return FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x100aed10 STUB
|
||||||
|
void MxSoundManager::vtable0x34()
|
||||||
|
{
|
||||||
|
// TODO STUB
|
||||||
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x100aee10 STUB
|
||||||
|
void MxSoundManager::vtable0x38()
|
||||||
|
{
|
||||||
|
// TODO STUB
|
||||||
|
}
|
||||||
|
|
|
@ -14,6 +14,10 @@ class MxSoundManager : public MxAudioManager
|
||||||
MxSoundManager();
|
MxSoundManager();
|
||||||
virtual ~MxSoundManager() override; // vtable+0x0
|
virtual ~MxSoundManager() override; // vtable+0x0
|
||||||
|
|
||||||
|
virtual MxResult StartDirectSound(undefined4 p_unknown1, MxBool p_unknown2); //vtable+0x30
|
||||||
|
virtual void vtable0x34(); // vtable+0x34
|
||||||
|
virtual void vtable0x38(); // vtable+0x38
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Init();
|
void Init();
|
||||||
void Destroy(MxBool);
|
void Destroy(MxBool);
|
||||||
|
|
Loading…
Reference in a new issue