implement LegoInputManager::Create (#495)

* implement LegoInputManager::Create

* Fixes

* Add annotation

* Add size assert

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
Misha
2024-01-27 16:55:59 -05:00
committed by GitHub
parent 19c771b85d
commit f706f80483
4 changed files with 109 additions and 38 deletions

View File

@@ -25,6 +25,29 @@ class LegoControlManager;
// SIZE 0x18
class LegoEventQueue : public MxQueue<LegoEventNotificationParam> {};
// VTABLE: LEGO1 0x100d6a20
// class MxCollection<MxCore*>
// VTABLE: LEGO1 0x100d6a38
// class MxList<MxCore*>
// VTABLE: LEGO1 0x100d6a50
// class MxPtrList<MxCore>
// VTABLE: LEGO1 0x100d6a68
// SIZE 0x18
class LegoNotifyList : public MxPtrList<MxCore> {
protected:
// FUNCTION: LEGO1 0x10028830
virtual MxS8 Compare(MxCore* p_element1, MxCore* p_element2) override
{
return p_element1 == p_element2 ? 0 : p_element1 < p_element2 ? -1 : 1;
} // vtable+0x14
public:
LegoNotifyList(MxBool p_ownership = FALSE) : MxPtrList<MxCore>(p_ownership) {}
};
// VTABLE: LEGO1 0x100d8760
// SIZE 0x338
class LegoInputManager : public MxPresenter {
@@ -78,47 +101,59 @@ public:
// LegoInputManager::`scalar deleting destructor'
private:
MxCriticalSection m_criticalSection;
MxList<undefined4>* m_unk0x5c; // list or hash table
LegoCameraController* m_camera;
LegoWorld* m_world;
LegoEventQueue* m_eventQueue; // +0x68
undefined4 m_unk0x6c;
undefined4 m_unk0x70;
undefined4 m_unk0x74;
UINT m_timer;
UINT m_timeout;
undefined m_unk0x80;
undefined m_unk0x81;
LegoControlManager* m_controlManager;
MxBool m_unk0x88;
IDirectInput* m_directInput;
IDirectInputDevice* m_directInputDevice;
undefined m_unk0x94;
undefined4 m_unk0x98;
undefined m_unk0x9c[0xF8];
undefined m_unk0x194;
MxBool m_unk0x195;
MxS32 m_joyid;
MxS32 m_joystickIndex;
JOYCAPS m_joyCaps;
MxBool m_useJoystick;
MxBool m_unk0x335;
MxBool m_unk0x336;
MxCriticalSection m_criticalSection; // 0x58
LegoNotifyList* m_keyboardNotifyList; // 0x5c
LegoCameraController* m_camera; // 0x60
LegoWorld* m_world; // 0x64
LegoEventQueue* m_eventQueue; // 0x68
undefined4 m_unk0x6c; // 0x6c
undefined4 m_unk0x70; // 0x70
undefined4 m_unk0x74; // 0x74
UINT m_timer; // 0x78
UINT m_timeout; // 0x7c
undefined m_unk0x80; // 0x80
undefined m_unk0x81; // 0x81
LegoControlManager* m_controlManager; // 0x84
MxBool m_unk0x88; // 0x88
IDirectInput* m_directInput; // 0x8c
IDirectInputDevice* m_directInputDevice; // 0x90
undefined m_unk0x94; // 0x94
undefined4 m_unk0x98; // 0x98
undefined m_unk0x9c[0xf8]; // 0x9c
undefined m_unk0x194; // 0x194
MxBool m_unk0x195; // 0x195
MxS32 m_joyid; // 0x198
MxS32 m_joystickIndex; // 0x19c
JOYCAPS m_joyCaps; // 0x200
MxBool m_useJoystick; // 0x334
MxBool m_unk0x335; // 0x335
MxBool m_unk0x336; // 0x336
};
// TEMPLATE: LEGO1 0x1005bb80
// MxCollection<LegoEventNotificationParam>::Compare
// TEMPLATE: LEGO1 0x100288b0
// MxCollection<MxCore *>::Destroy
// TEMPLATE: LEGO1 0x10028850
// MxCollection<MxCore *>::Compare
// TEMPLATE: LEGO1 0x1005bbe0
// MxCollection<LegoEventNotificationParam>::~MxCollection<LegoEventNotificationParam>
// TEMPLATE: LEGO1 0x10028860
// MxCollection<MxCore *>::~MxCollection<MxCore *>
// TEMPLATE: LEGO1 0x1005bc30
// MxCollection<LegoEventNotificationParam>::Destroy
// TEMPLATE: LEGO1 0x1005bc80
// MxList<LegoEventNotificationParam>::~MxList<LegoEventNotificationParam>
// TEMPLATE: LEGO1 0x100288c0
// MxList<MxCore *>::~MxList<MxCore *>
// SYNTHETIC: LEGO1 0x1005bd50
// MxCollection<LegoEventNotificationParam>::`scalar deleting destructor'
@@ -128,9 +163,24 @@ private:
// SYNTHETIC: LEGO1 0x1005beb0
// LegoEventQueue::`scalar deleting destructor'
// SYNTHETIC: LEGO1 0x10028a10
// MxCollection<MxCore *>::`scalar deleting destructor'
// SYNTHETIC: LEGO1 0x10028a80
// MxList<MxCore *>::`scalar deleting destructor'
// SYNTHETIC: LEGO1 0x10028b30
// MxPtrList<MxCore>::`scalar deleting destructor'
// SYNTHETIC: LEGO1 0x10028950
// LegoNotifyList::`scalar deleting destructor'
// TEMPLATE: LEGO1 0x1005bf20
// MxQueue<LegoEventNotificationParam>::~MxQueue<LegoEventNotificationParam>
// TEMPLATE: LEGO1 0x100289c0
// MxPtrList<MxCore>::~MxPtrList<MxCore>
// SYNTHETIC: LEGO1 0x1005bf70
// MxQueue<LegoEventNotificationParam>::`scalar deleting destructor'