Skip to content

Commit 50fcc3b

Browse files
committed
update
1 parent 0a54322 commit 50fcc3b

2 files changed

Lines changed: 288 additions & 131 deletions

File tree

LEGORacers/include/inputdevice.h

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,29 @@
66

77
class OpalVault0xf0;
88

9+
class InputDevice;
10+
11+
class InputCallback {
12+
public:
13+
virtual void OnKeyDown(InputDevice& p_device, undefined2 p_keyCode) = 0;
14+
virtual void OnKeyUp(InputDevice& p_device, undefined2 p_keyCode) = 0;
15+
};
16+
917
// VTABLE: LEGORACERS 0x004b0e9c
1018
// SIZE 0x9c
1119
class InputDevice {
1220
public:
1321
InputDevice();
1422
virtual void VTable0x00();
15-
virtual void VTable0x04(undefined4, LegoBool p_arg2, undefined4);
23+
virtual void VTable0x04(undefined4, LegoBool p_arg2, LegoBool32);
1624
virtual void VTable0x08(undefined4, undefined4) = 0;
1725
virtual ~InputDevice();
1826
virtual LegoBool32 VTable0x10();
1927
virtual undefined4 VTable0x14(undefined4);
2028
virtual undefined4 VTable0x18();
21-
virtual undefined4 VTable0x1c();
29+
virtual LegoS32 VTable0x1c();
2230
virtual undefined4 VTable0x20();
23-
virtual const LegoChar* VTable0x24(undefined4);
31+
virtual undefined2* VTable0x24(undefined4);
2432
virtual void VTable0x28(undefined4) = 0;
2533
virtual LegoFloat VTable0x2c() = 0;
2634
virtual LegoFloat VTable0x30() = 0;
@@ -34,7 +42,7 @@ class InputDevice {
3442
virtual undefined4 VTable0x50();
3543
virtual undefined4 VTable0x54();
3644
virtual LegoBool32 VTable0x58() = 0;
37-
virtual LegoBool32 VTable0x5c() = 0;
45+
virtual LegoS32 VTable0x5c() = 0;
3846
virtual LegoBool32 VTable0x60() = 0;
3947

4048
void FUN_0044b9f0();
@@ -43,22 +51,18 @@ class InputDevice {
4351
void FUN_0044baf0(undefined2* p_arg1, undefined2* p_arg2);
4452
undefined2* FUN_0044bb20();
4553
undefined2* FUN_0044bb40();
46-
void FUN_0044bb40(LegoFloat, LegoFloat, undefined4);
4754
void FUN_0044bc60(undefined4);
4855
void FUN_0044bda0();
4956
void FUN_0044bdd0(undefined4 p_arg1, undefined p_arg2);
50-
void FUN_0044bdf0(undefined4);
57+
void FUN_0044bdf0(undefined4 p_arg);
5158
LegoBool32 FUN_0044be10(undefined4);
5259
undefined2 FUN_0044be70(const LegoChar*);
5360

5461
// SYNTHETIC: LEGORACERS 0x0044b920
5562
// InputDevice::`scalar deleting destructor'
5663

5764
protected:
58-
undefined4 m_unk0x04; // 0x04
59-
undefined4 m_unk0x08; // 0x08
60-
undefined4 m_unk0x0c; // 0x0c
61-
undefined4 m_unk0x10; // 0x10
65+
undefined4 m_unk0x04[4]; // 0x04
6266
OpalVault0xf0* m_opalVault; // 0x14
6367
LegoBool32 m_unk0x18; // 0x18
6468
undefined4 m_unk0x1c; // 0x1c
@@ -72,17 +76,17 @@ class InputDevice {
7276
undefined4 m_unk0x3c; // 0x3c
7377
undefined4 m_unk0x40; // 0x40
7478
undefined4 m_unk0x44; // 0x44
75-
undefined4 m_unk0x48; // 0x48
76-
undefined4 m_unk0x4c; // 0x4c
79+
undefined4 m_buttonCount; // 0x48
80+
undefined4 m_axisCount; // 0x4c
7781
LegoS32 m_unk0x50; // 0x50
78-
undefined4 m_unk0x54; // 0x54
79-
undefined4 m_unk0x58; // 0x58
82+
undefined4 m_devSubType; // 0x54
83+
undefined4 m_devType; // 0x58
8084
undefined4 m_unk0x5c; // 0x5c
8185
LegoChar m_unk0x60[32]; // 0x60
8286
undefined m_unk0x80[0x90 - 0x80]; // 0x80
8387
undefined4 m_unk0x90; // 0x90
84-
undefined4 m_unk0x94; // 0x94
85-
undefined4 m_unk0x98; // 0x98
88+
undefined2* m_unk0x94; // 0x94
89+
InputCallback* m_callback; // 0x98
8690
};
8791

8892
#include "compat.h"
@@ -111,7 +115,7 @@ class CommonInputDevice : public InputDevice {
111115
~CommonInputDevice() override;
112116
LegoBool32 VTable0x10() override;
113117
undefined4 VTable0x14(undefined4) override;
114-
const LegoChar* VTable0x24(undefined4) override;
118+
undefined2* VTable0x24(undefined4) override;
115119
LegoFloat VTable0x2c() override;
116120
undefined4 VTable0x38() override;
117121
undefined4 VTable0x3c() override;
@@ -122,7 +126,7 @@ class CommonInputDevice : public InputDevice {
122126
undefined4 VTable0x50() override;
123127
undefined4 VTable0x54() override;
124128
LegoBool32 VTable0x58() override;
125-
LegoBool32 VTable0x5c() override;
129+
LegoS32 VTable0x5c() override;
126130
LegoBool32 VTable0x60() override;
127131
virtual LegoBool32 VTable0x64(CreateDinputDeviceParams* p_params);
128132
virtual void VTable0x68(const DIDEVICEOBJECTDATA& p_data) = 0;
@@ -136,14 +140,14 @@ class CommonInputDevice : public InputDevice {
136140
void FUN_0044fa50();
137141
void FUN_0044faa0();
138142
void FUN_0044fb30();
139-
undefined4 FUN_0044fda0();
143+
undefined4 FUN_0044fda0(const GUID& p_guid) const;
140144
LegoBool32 FUN_0044fef0();
141145
undefined4 FUN_00450170(HRESULT p_hResult);
142146

143147
undefined4 m_unk0x9c; // 0x9c
144148
LPDIRECTINPUTDEVICE2A m_device; // 0xa0
145149
HWND m_hWnd; // 0xa4
146-
undefined4 m_unk0xa8; // 0xa8
150+
LPDIRECTINPUTEFFECT m_effect; // 0xa8
147151
undefined4 m_unk0xac; // 0xac
148152
GUID m_deviceGuid; // 0xb0
149153
DWORD m_cooperativeLevel; // 0xc0
@@ -158,10 +162,10 @@ class KeyboardInputDevice : public CommonInputDevice {
158162
KeyboardInputDevice();
159163

160164
void VTable0x00() override;
161-
void VTable0x04(undefined4, LegoBool, undefined4) override;
165+
void VTable0x04(undefined4, LegoBool, LegoBool32) override;
162166
void VTable0x08(undefined4, undefined4) override;
163167
~KeyboardInputDevice() override;
164-
undefined4 VTable0x1c() override;
168+
LegoS32 VTable0x1c() override;
165169
undefined4 VTable0x20() override;
166170
void VTable0x28(undefined4) override;
167171
LegoFloat VTable0x30() override;

0 commit comments

Comments
 (0)