mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-28 18:51:16 +00:00
Fixes
This commit is contained in:
parent
ebbef2c42f
commit
ae54934108
@ -38,8 +38,8 @@ class LegoEventQueue : public MxQueue<LegoEventNotificationParam> {};
|
|||||||
// SIZE 0x18
|
// SIZE 0x18
|
||||||
class LegoNotifyList : public MxPtrList<MxCore> {
|
class LegoNotifyList : public MxPtrList<MxCore> {
|
||||||
protected:
|
protected:
|
||||||
// FUNCTION: LGEO1 0x10028830
|
// FUNCTION: LEGO1 0x10028830
|
||||||
virtual MxS8 Compare(MxCore* p_element1, MxCore* p_element2)
|
virtual MxS8 Compare(MxCore* p_element1, MxCore* p_element2) override
|
||||||
{
|
{
|
||||||
return p_element1 == p_element2 ? 0 : p_element1 < p_element2 ? -1 : 1;
|
return p_element1 == p_element2 ? 0 : p_element1 < p_element2 ? -1 : 1;
|
||||||
}
|
}
|
||||||
@ -102,7 +102,7 @@ class LegoInputManager : public MxPresenter {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
MxCriticalSection m_criticalSection; // 0x58
|
MxCriticalSection m_criticalSection; // 0x58
|
||||||
LegoNotifyList* m_notifyList; // 0x5c
|
LegoNotifyList* m_keyboardNotifyList; // 0x5c
|
||||||
LegoCameraController* m_camera; // 0x60
|
LegoCameraController* m_camera; // 0x60
|
||||||
LegoWorld* m_world; // 0x64
|
LegoWorld* m_world; // 0x64
|
||||||
LegoEventQueue* m_eventQueue; // 0x68
|
LegoEventQueue* m_eventQueue; // 0x68
|
||||||
@ -119,7 +119,7 @@ class LegoInputManager : public MxPresenter {
|
|||||||
IDirectInputDevice* m_directInputDevice; // 0x90
|
IDirectInputDevice* m_directInputDevice; // 0x90
|
||||||
undefined m_unk0x94; // 0x94
|
undefined m_unk0x94; // 0x94
|
||||||
undefined4 m_unk0x98; // 0x98
|
undefined4 m_unk0x98; // 0x98
|
||||||
undefined m_unk0x9c[0xF8]; // 0x9c
|
undefined m_unk0x9c[0xf8]; // 0x9c
|
||||||
undefined m_unk0x194; // 0x194
|
undefined m_unk0x194; // 0x194
|
||||||
MxBool m_unk0x195; // 0x195
|
MxBool m_unk0x195; // 0x195
|
||||||
MxS32 m_joyid; // 0x198
|
MxS32 m_joyid; // 0x198
|
||||||
|
|||||||
@ -16,7 +16,7 @@ MxS32 g_unk0x100f31b4 = 0;
|
|||||||
// FUNCTION: LEGO1 0x1005b790
|
// FUNCTION: LEGO1 0x1005b790
|
||||||
LegoInputManager::LegoInputManager()
|
LegoInputManager::LegoInputManager()
|
||||||
{
|
{
|
||||||
m_notifyList = NULL;
|
m_keyboardNotifyList = NULL;
|
||||||
m_world = NULL;
|
m_world = NULL;
|
||||||
m_camera = NULL;
|
m_camera = NULL;
|
||||||
m_eventQueue = NULL;
|
m_eventQueue = NULL;
|
||||||
@ -57,16 +57,19 @@ LegoInputManager::~LegoInputManager()
|
|||||||
MxResult LegoInputManager::Create(HWND p_hwnd)
|
MxResult LegoInputManager::Create(HWND p_hwnd)
|
||||||
{
|
{
|
||||||
MxResult result = SUCCESS;
|
MxResult result = SUCCESS;
|
||||||
m_controlManager = new LegoControlManager();
|
|
||||||
if (m_notifyList == NULL)
|
m_controlManager = new LegoControlManager;
|
||||||
m_notifyList = new LegoNotifyList();
|
|
||||||
if (m_eventQueue == NULL)
|
if (!m_keyboardNotifyList)
|
||||||
m_eventQueue = new LegoEventQueue();
|
m_keyboardNotifyList = new LegoNotifyList;
|
||||||
|
|
||||||
|
if (!m_eventQueue)
|
||||||
|
m_eventQueue = new LegoEventQueue;
|
||||||
|
|
||||||
CreateAndAcquireKeyboard(p_hwnd);
|
CreateAndAcquireKeyboard(p_hwnd);
|
||||||
GetJoystickId();
|
GetJoystickId();
|
||||||
|
|
||||||
if (m_notifyList == NULL || m_eventQueue == NULL || m_directInputDevice == NULL) {
|
if (!m_keyboardNotifyList || !m_eventQueue || !m_directInputDevice) {
|
||||||
Destroy();
|
Destroy();
|
||||||
result = FAILURE;
|
result = FAILURE;
|
||||||
}
|
}
|
||||||
@ -79,9 +82,9 @@ void LegoInputManager::Destroy()
|
|||||||
{
|
{
|
||||||
ReleaseDX();
|
ReleaseDX();
|
||||||
|
|
||||||
if (m_notifyList)
|
if (m_keyboardNotifyList)
|
||||||
delete m_notifyList;
|
delete m_keyboardNotifyList;
|
||||||
m_notifyList = NULL;
|
m_keyboardNotifyList = NULL;
|
||||||
|
|
||||||
if (m_eventQueue)
|
if (m_eventQueue)
|
||||||
delete m_eventQueue;
|
delete m_eventQueue;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user