mirror of
https://github.com/isledecomp/isle.git
synced 2026-02-02 05:01:17 +00:00
commit code
This commit is contained in:
parent
f4646a7075
commit
e55bd9f607
@ -63,6 +63,13 @@ void LegoInputManager::Destroy()
|
|||||||
delete m_controlManager;
|
delete m_controlManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x1005b960 STUB
|
||||||
|
MxResult LegoInputManager::Create(HWND p_hwnd)
|
||||||
|
{
|
||||||
|
// TODO STUB
|
||||||
|
return SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x1005c030
|
// OFFSET: LEGO1 0x1005c030
|
||||||
void LegoInputManager::CreateAndAcquireKeyboard(HWND hwnd)
|
void LegoInputManager::CreateAndAcquireKeyboard(HWND hwnd)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -35,6 +35,7 @@ class LegoInputManager : public MxPresenter {
|
|||||||
|
|
||||||
virtual MxResult Tickle() override; // vtable+0x8
|
virtual MxResult Tickle() override; // vtable+0x8
|
||||||
|
|
||||||
|
MxResult Create(HWND p_hwnd);
|
||||||
void Destroy();
|
void Destroy();
|
||||||
void CreateAndAcquireKeyboard(HWND hwnd);
|
void CreateAndAcquireKeyboard(HWND hwnd);
|
||||||
void ReleaseDX();
|
void ReleaseDX();
|
||||||
|
|||||||
@ -3,10 +3,16 @@
|
|||||||
#include "legogamestate.h"
|
#include "legogamestate.h"
|
||||||
#include "legoinputmanager.h"
|
#include "legoinputmanager.h"
|
||||||
#include "legoobjectfactory.h"
|
#include "legoobjectfactory.h"
|
||||||
|
#include "legosoundmanager.h"
|
||||||
#include "legoutil.h"
|
#include "legoutil.h"
|
||||||
|
#include "legovideomanager.h"
|
||||||
#include "legoworld.h"
|
#include "legoworld.h"
|
||||||
|
#include "mxautolocker.h"
|
||||||
#include "mxbackgroundaudiomanager.h"
|
#include "mxbackgroundaudiomanager.h"
|
||||||
#include "mxdsfile.h"
|
#include "mxdsfile.h"
|
||||||
|
#include "mxomnicreateflags.h"
|
||||||
|
#include "mxomnicreateparam.h"
|
||||||
|
#include "mxticklemanager.h"
|
||||||
|
|
||||||
// 0x100f4588
|
// 0x100f4588
|
||||||
MxAtomId* g_nocdSourceName = NULL;
|
MxAtomId* g_nocdSourceName = NULL;
|
||||||
@ -302,16 +308,56 @@ void LegoOmni::Init()
|
|||||||
m_transitionManager = NULL;
|
m_transitionManager = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x10058e70 STUB
|
// OFFSET: LEGO1 0x10058e70
|
||||||
MxResult LegoOmni::Create(MxOmniCreateParam& p)
|
MxResult LegoOmni::Create(MxOmniCreateParam& p)
|
||||||
{
|
{
|
||||||
MxOmni::Create(p);
|
MxResult result = FAILURE;
|
||||||
|
MxAutoLocker lock(&this->m_criticalsection);
|
||||||
|
|
||||||
|
p.CreateFlags().CreateObjectFactory(FALSE);
|
||||||
|
p.CreateFlags().CreateVideoManager(FALSE);
|
||||||
|
p.CreateFlags().CreateSoundManager(FALSE);
|
||||||
|
p.CreateFlags().CreateTickleManager(FALSE);
|
||||||
|
|
||||||
|
if (!(m_tickleManager = new MxTickleManager()))
|
||||||
|
return FAILURE;
|
||||||
|
|
||||||
|
if (MxOmni::Create(p) != SUCCESS)
|
||||||
|
return FAILURE;
|
||||||
|
|
||||||
m_objectFactory = new LegoObjectFactory();
|
m_objectFactory = new LegoObjectFactory();
|
||||||
|
if (m_objectFactory == NULL)
|
||||||
|
return FAILURE;
|
||||||
|
|
||||||
|
if (m_soundManager = new LegoSoundManager()) {
|
||||||
|
if (m_soundManager->Create(10, 0) != SUCCESS) {
|
||||||
|
delete m_soundManager;
|
||||||
|
m_soundManager = NULL;
|
||||||
|
return FAILURE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_videoManager = new LegoVideoManager()) {
|
||||||
|
if (m_videoManager->Create(p.GetVideoParam(), 100, 0) != SUCCESS) {
|
||||||
|
delete m_videoManager;
|
||||||
|
m_videoManager = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_inputMgr = new LegoInputManager()) {
|
||||||
|
if (m_inputMgr->Create(p.GetWindowHandle()) != SUCCESS) {
|
||||||
|
delete m_inputMgr;
|
||||||
|
m_inputMgr = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
m_gameState = new LegoGameState();
|
m_gameState = new LegoGameState();
|
||||||
m_bkgAudioManager = new MxBackgroundAudioManager();
|
m_bkgAudioManager = new MxBackgroundAudioManager();
|
||||||
|
|
||||||
return SUCCESS;
|
SetAppCursor(1);
|
||||||
|
|
||||||
|
result = SUCCESS;
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x10058c30 STUB
|
// OFFSET: LEGO1 0x10058c30 STUB
|
||||||
|
|||||||
@ -28,7 +28,7 @@ void LegoSoundManager::Destroy(MxBool p_fromDestructor)
|
|||||||
// OFFSET: LEGO1 0x100299f0 STUB
|
// OFFSET: LEGO1 0x100299f0 STUB
|
||||||
MxResult LegoSoundManager::Create(MxU32 p_frequencyMS, MxBool p_createThread)
|
MxResult LegoSoundManager::Create(MxU32 p_frequencyMS, MxBool p_createThread)
|
||||||
{
|
{
|
||||||
return FAILURE;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x100299a0
|
// OFFSET: LEGO1 0x100299a0
|
||||||
|
|||||||
@ -17,7 +17,7 @@ class MxOmniCreateParam : public MxParam {
|
|||||||
MxOmniCreateFlags flags
|
MxOmniCreateFlags flags
|
||||||
);
|
);
|
||||||
|
|
||||||
const MxOmniCreateFlags& CreateFlags() const { return this->m_createFlags; }
|
MxOmniCreateFlags& CreateFlags() { return this->m_createFlags; }
|
||||||
const MxString& GetMediaPath() const { return m_mediaPath; }
|
const MxString& GetMediaPath() const { return m_mediaPath; }
|
||||||
const HWND GetWindowHandle() const { return m_windowHandle; }
|
const HWND GetWindowHandle() const { return m_windowHandle; }
|
||||||
MxVideoParam& GetVideoParam() { return m_videoParam; }
|
MxVideoParam& GetVideoParam() { return m_videoParam; }
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user