#ifndef LEGOINPUTMANAGER_H #define LEGOINPUTMANAGER_H #include "decomp.h" #include "legoeventnotificationparam.h" #include "legoworld.h" #include "mxlist.h" #include "mxpresenter.h" #include "mxqueue.h" #include class LegoControlManager; // VTABLE: LEGO1 0x100d87b8 // class MxCollection // VTABLE: LEGO1 0x100d87d0 // class MxList // VTABLE: LEGO1 0x100d87e8 // class MxQueue // VTABLE: LEGO1 0x100d8800 // SIZE 0x18 class LegoEventQueue : public MxQueue {}; // VTABLE: LEGO1 0x100d6a20 // class MxCollection // VTABLE: LEGO1 0x100d6a38 // class MxList // VTABLE: LEGO1 0x100d6a50 // class MxPtrList // VTABLE: LEGO1 0x100d6a68 // SIZE 0x18 class LegoNotifyList : public MxPtrList { 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(p_ownership) {} }; // VTABLE: LEGO1 0x100d6ac0 // class MxListCursor // VTABLE: LEGO1 0x100d6ad8 // class MxPtrListCursor // VTABLE: LEGO1 0x100d6aa8 // SIZE 0x10 class LegoNotifyListCursor : public MxPtrListCursor { public: LegoNotifyListCursor(LegoNotifyList* p_list) : MxPtrListCursor(p_list) {} }; // VTABLE: LEGO1 0x100d8760 // SIZE 0x338 class LegoInputManager : public MxPresenter { public: LegoInputManager(); virtual ~LegoInputManager() override; void QueueEvent(NotificationId p_id, MxU8 p_modifier, MxLong p_x, MxLong p_y, MxU8 p_key); void Register(MxCore*); void UnRegister(MxCore*); virtual MxResult Tickle() override; // vtable+0x8 // FUNCTION: LEGO1 0x1005b8c0 virtual MxResult PutData() override { return SUCCESS; }; // vtable+0x4c MxResult Create(HWND p_hwnd); void Destroy(); void CreateAndAcquireKeyboard(HWND p_hwnd); void ReleaseDX(); MxResult GetJoystickId(); MxResult GetJoystickState(MxU32* p_joystickX, MxU32* p_joystickY, DWORD* p_buttonsState, MxU32* p_povPosition); void SetTimer(); void KillTimer(); void EnableInputProcessing(); void SetCamera(LegoCameraController* p_camera); void ClearCamera(); void SetWorld(LegoWorld* p_world); void ClearWorld(); inline void SetUnknown88(MxBool p_unk0x88) { m_unk0x88 = p_unk0x88; } inline void SetUnknown335(MxBool p_unk0x335) { m_unk0x335 = p_unk0x335; } inline void SetUnknown336(MxBool p_unk0x336) { m_unk0x336 = p_unk0x336; } inline void SetUseJoystick(MxBool p_useJoystick) { m_useJoystick = p_useJoystick; } inline void SetJoystickIndex(MxS32 p_joystickIndex) { m_joystickIndex = p_joystickIndex; } inline void DisableInputProcessing() { m_unk0x88 = TRUE; m_unk0x336 = FALSE; } inline LegoControlManager* GetControlManager() { return m_controlManager; } inline LegoWorld* GetWorld() { return m_world; } inline LegoCameraController* GetCamera() { return m_camera; } void ProcessEvents(); MxBool ProcessOneEvent(LegoEventNotificationParam& p_param); // SYNTHETIC: LEGO1 0x1005b8d0 // LegoInputManager::`scalar deleting destructor' private: 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 0x10028850 // MxCollection::Compare // TEMPLATE: LEGO1 0x10028860 // MxCollection::~MxCollection // TEMPLATE: LEGO1 0x100288b0 // MxCollection::Destroy // TEMPLATE: LEGO1 0x100288c0 // MxList::~MxList // SYNTHETIC: LEGO1 0x10028950 // LegoNotifyList::`scalar deleting destructor' // TEMPLATE: LEGO1 0x100289c0 // MxPtrList::~MxPtrList // SYNTHETIC: LEGO1 0x10028a10 // MxCollection::`scalar deleting destructor' // SYNTHETIC: LEGO1 0x10028a80 // MxList::`scalar deleting destructor' // SYNTHETIC: LEGO1 0x10028b30 // MxPtrList::`scalar deleting destructor' // SYNTHETIC: LEGO1 0x10028fd0 // LegoNotifyListCursor::`scalar deleting destructor' // TEMPLATE: LEGO1 0x10029040 // MxPtrListCursor::~MxPtrListCursor // SYNTHETIC: LEGO1 0x10029090 // MxListCursor::`scalar deleting destructor' // SYNTHETIC: LEGO1 0x10029100 // MxPtrListCursor::`scalar deleting destructor' // TEMPLATE: LEGO1 0x10029170 // MxListCursor::~MxListCursor // TEMPLATE: LEGO1 0x100291c0 // LegoNotifyListCursor::~LegoNotifyListCursor // TEMPLATE: LEGO1 0x1005bb80 // MxCollection::Compare // TEMPLATE: LEGO1 0x1005bbe0 // MxCollection::~MxCollection // TEMPLATE: LEGO1 0x1005bc30 // MxCollection::Destroy // TEMPLATE: LEGO1 0x1005bc80 // MxList::~MxList // SYNTHETIC: LEGO1 0x1005bd50 // MxCollection::`scalar deleting destructor' // SYNTHETIC: LEGO1 0x1005bdc0 // MxList::`scalar deleting destructor' // SYNTHETIC: LEGO1 0x1005beb0 // LegoEventQueue::`scalar deleting destructor' // TEMPLATE: LEGO1 0x1005bf20 // MxQueue::~MxQueue // SYNTHETIC: LEGO1 0x1005bf70 // MxQueue::`scalar deleting destructor' // TEMPLATE: LEGO1 0x1005d010 // MxListEntry::GetValue #endif // LEGOINPUTMANAGER_H