-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMovement.h
261 lines (225 loc) · 12.7 KB
/
Movement.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
#pragma once
#include "PackObj.h"
#include "DLListBase.h"
#include "Frame.h"
#define I_DONT_WORK_YET_SO_DONT_COMPILE_ME
#ifndef I_DONT_WORK_YET_SO_DONT_COMPILE_ME
class CPhysicsObj;
class CWeenieObject;
class CMotionInterp;
class MoveToManager;
#define run_anim_speed ((float)4.0)
class MovementManager
{
public:
MovementManager();
~MovementManager();
static MovementManager* Create(CPhysicsObj *pPObject, CWeenieObject *pWObject);
CMotionInterp* get_minterp();
BOOL motions_pending();
void CancelMoveTo(DWORD Unknown);
void Destroy();
void EnterDefaultState();
BOOL IsMovingTo();
void MakeMoveToManager();
void SetPhysicsObject(CPhysicsObj *pObject);
void SetWeenieObject(CWeenieObject *pObject);
CMotionInterp* m_MInterp; // 0x00
MoveToManager* m_MoveToManager; // 0x04
CPhysicsObj* m_PhysicsObj; // 0x08
CWeenieObject* m_WeenieObj; // 0x0C
};
class MotionAction : public LListNode
{
public:
MotionAction();
ULONG pack_size();
BOOL UnPack(BYTE **ppData, ULONG iSize);
DWORD m_StateID; // 0x04
float m_PlaySpeed; // 0x08
DWORD m_Order; // 0x0C
BOOL m_OrderFlag; // 0x10
};
class RawMotionState : public PackObj
{
public:
RawMotionState();
~RawMotionState();
void Destroy();
BOOL UnPack(BYTE **ppData, ULONG iSize);
LListBase m_Actions; // 0x04, 0x08
BOOL m_IsRunning; // 0x0C
DWORD m_10;
DWORD m_14;
DWORD m_18;
float m_1C;
float m_20;
float m_24;
float m_28;
float m_2C;
float m_30;
float m_34;
};
class InterpretedMotionState : public PackObj
{
public:
InterpretedMotionState();
~InterpretedMotionState();
void Destroy();
};
class MovementParameters : public PackObj
{
public:
MovementParameters();
ULONG pack_size();
BOOL UnPack(BYTE **ppData, ULONG iSize);
BOOL UnPackNet(DWORD Type, BYTE **ppData, ULONG iSize);
DWORD m_04;
float m_08;
DWORD m_0C;
DWORD m_10;
float m_14;
float m_18;
float m_1C;
DWORD m_20;
DWORD m_24;
DWORD m_28;
};
class CMotionInterp
{
public:
CMotionInterp(CPhysicsObj *pPObject, CWeenieObject *pWObject);
~CMotionInterp();
static CMotionInterp* Create(CPhysicsObj *pPObject, CWeenieObject *pWObject);
void Destroy();
void SetPhysicsObject(CPhysicsObj *pObject);
void SetWeenieObject(CWeenieObject *pObject);
DWORD DoMotion(DWORD MotionID, const MovementParameters& Params);
void enter_default_state(void);
void apply_current_movement(BOOL Unk1, DWORD Unk2);
float get_max_speed(void);
CWeenieObject* m_WeenieObj; // 0x04
CPhysicsObj* m_PhysicsObj; // 0x08
RawMotionState m_RawState; // 0x0C
InterpretedMotionState m_InterpState; // 0x44
};
class MoveToManager
{
public:
MoveToManager();
~MoveToManager();
static MoveToManager *Create(CPhysicsObj *pPhysicsObj, CWeenieObject *pWeenieObj);
void Destroy();
void CancelMoveTo(DWORD Unknown);
void CleanUp();
void CleanUpAndCallWeenie(DWORD Unknown);
void InitializeLocalVariables();
void SetPhysicsObject(CPhysicsObj *pPhysicsObj);
void SetWeenieObject(CWeenieObject *pWeenie);
DWORD m_00; // 0x00
Position m_Pos04; // 0x04
Position m_Pos4C; // 0x4C
Position m_Pos94; // 0x94
MovementParameters m_MoveParams; // 0xDC
DLListBase m_Nodes; // 0x14C
CPhysicsObj* m_PhysicsObj; // 0x154
CWeenieObject* m_WeenieObj; // 0x158
};
const DWORD MotionIDs[] =
{
0x80000000, 0x85000001, 0x85000002, 0x41000003, 0x40000004, 0x45000005, 0x45000006, 0x44000007,
0x40000008, 0x40000009, 0x4000000A, 0x4000000B, 0x4000000C, 0x6500000D, 0x6500000E, 0x6500000F,
0x65000010, 0x40000011, 0x41000012, 0x41000013, 0x41000014, 0x40000015, 0x40000016, 0x40000017,
0x40000018, 0x40000019, 0x4000001A, 0x4000001B, 0x4000001C, 0x4000001D, 0x4000001E, 0x4000001F,
0x40000020, 0x40000021, 0x40000022, 0x40000023, 0x40000024, 0x40000025, 0x40000026, 0x40000027,
0x40000028, 0x40000029, 0x4000002A, 0x4000002B, 0x4000002C, 0x4000002D, 0x4000002E, 0x4000002F,
0x40000030, 0x40000031, 0x40000032, 0x40000033, 0x40000034, 0x40000035, 0x40000036, 0x40000037,
0x40000038, 0x40000039, 0x2000003A, 0x2500003B, 0x8000003C, 0x8000003D, 0x8000003E, 0x8000003F,
0x80000040, 0x80000041, 0x80000042, 0x80000043, 0x80000044, 0x80000045, 0x80000046, 0x80000047,
0x80000048, 0x80000049, 0x1000004A, 0x1000004B, 0x1300004C, 0x1000004D, 0x1000004E, 0x1000004F,
0x10000050, 0x10000051, 0x10000052, 0x10000053, 0x10000054, 0x10000055, 0x10000056, 0x10000057,
0x10000058, 0x10000059, 0x1000005A, 0x1000005B, 0x1000005C, 0x1000005D, 0x1000005E, 0x1000005F,
0x10000060, 0x10000061, 0x10000062, 0x10000063, 0x10000064, 0x10000065, 0x10000066, 0x10000067,
0x10000068, 0x10000069, 0x1000006A, 0x1000006B, 0x1000006C, 0x1000006D, 0x1000006E, 0x1000006F,
0x10000070, 0x10000071, 0x10000072, 0x10000073, 0x10000074, 0x10000075, 0x10000076, 0x10000077,
0x10000078, 0x13000079, 0x1300007A, 0x1300007B, 0x1300007C, 0x1300007D, 0x1300007E, 0x1300007F,
0x13000080, 0x13000081, 0x13000082, 0x13000083, 0x13000084, 0x13000085, 0x13000086, 0x13000087,
0x13000088, 0x13000089, 0x1300008A, 0x1300008B, 0x1300008C, 0x1300008D, 0x1300008E, 0x1300008F,
0x13000090, 0x13000091, 0x13000092, 0x13000093, 0x13000094, 0x13000095, 0x13000096, 0x13000097,
0x13000098, 0x13000099, 0x1300009A, 0x1200009B, 0x1000009C, 0x1000009D, 0x1000009E, 0x1000009F,
0x100000A0, 0x100000A1, 0x080000A2, 0x090000A3, 0x090000A4, 0x090000A5, 0x090000A6, 0x090000A7,
0x090000A8, 0x080000A9, 0x090000AA, 0x090000AB, 0x090000AC, 0x090000AD, 0x090000AE, 0x090000AF,
0x090000B0, 0x090000B1, 0x0D0000B2, 0x0D0000B3, 0x0D0000B4, 0x080000B5, 0x080000B6, 0x080000B7,
0x090000B8, 0x090000B9, 0x0D0000BA, 0x0D0000BB, 0x0D0000BC, 0x0D0000BD, 0x0D0000BE, 0x0D0000BF,
0x090000C0, 0x0C0000C1, 0x090000C2, 0x090000C3, 0x090000C4, 0x0D0000C5, 0x090000C6, 0x090000C7,
0x090000C8, 0x090000C9, 0x130000CA, 0x130000CB, 0x130000CC, 0x100000CD, 0x100000CE, 0x100000CF,
0x100000D0, 0x100000D1, 0x100000D2, 0x400000D3, 0x120000D4, 0x090000D5, 0x090000D6, 0x090000D7,
0x090000D8, 0x090000D9, 0x090000DA, 0x090000DB, 0x090000DC, 0x090000DD, 0x090000DE, 0x120000DF,
0x400000E0, 0x400000E1, 0x100000E2, 0x100000E3, 0x400000E4, 0x400000E5, 0x400000E6, 0x090000E7,
0x800000E8, 0x800000E9, 0x430000EA, 0x430000EB, 0x430000EC, 0x430000ED, 0x430000EE, 0x430000EF,
0x430000F0, 0x430000F1, 0x430000F2, 0x430000F3, 0x430000F4, 0x430000F5, 0x430000F6, 0x430000F7,
0x430000F8, 0x420000F9, 0x430000FA, 0x430000FB, 0x430000FC, 0x430000FD, 0x090000FE, 0x090000FF,
0x09000100, 0x09000101, 0x09000102, 0x09000103, 0x09000104, 0x09000105, 0x09000106, 0x09000107,
0x09000108, 0x09000109, 0x0900010A, 0x0900010B, 0x0900010C, 0x0900010D, 0x1000010E, 0x0900010F,
0x09000110, 0x09000111, 0x09000112, 0x09000113, 0x09000114, 0x43000115, 0x13000116, 0x43000117,
0x43000118, 0x43000119, 0x0900011A, 0x1000011B, 0x1000011C, 0x1000011D, 0x1000011E, 0x1000011F,
0x10000120, 0x10000121, 0x10000122, 0x10000123, 0x10000124, 0x10000125, 0x10000126, 0x10000127,
0x10000128, 0x10000129, 0x1000012A, 0x1000012B, 0x1000012C, 0x1000012D, 0x1000012E, 0x1000012F,
0x10000130, 0x10000131, 0x13000132, 0x40000133, 0x40000134, 0x40000135, 0x40000136, 0x10000137,
0x80000138, 0x80000139, 0x4300013A, 0x4300013B, 0x4300013C, 0x4300013D, 0x4300013E, 0x4300013F,
0x43000140, 0x43000141, 0x43000142, 0x43000143, 0x43000144, 0x43000145, 0x43000146, 0x13000147,
0x13000148, 0x13000149, 0x1300014A, 0x1300014B, 0x1300014C, 0x1300014D, 0x1300014E, 0x1300014F,
0x10000150, 0x09000151, 0x09000152, 0x09000153, 0x09000154, 0x09000155, 0x09000156, 0x09000157,
0x09000158, 0x09000159, 0x0900015A, 0x0900015B, 0x0900015C, 0x0900015D, 0x0900015E, 0x0900015F,
0x09000160, 0x09000161, 0x10000162, 0x10000163, 0x10000164,
};
// Are these the same? 0x5ADE50 I assumed so, so I copied them.
const DWORD MotionsIDs2[] =
{
0x80000000, 0x85000001, 0x85000002, 0x41000003, 0x40000004, 0x45000005, 0x45000006, 0x44000007,
0x40000008, 0x40000009, 0x4000000A, 0x4000000B, 0x4000000C, 0x6500000D, 0x6500000E, 0x6500000F,
0x65000010, 0x40000011, 0x41000012, 0x41000013, 0x41000014, 0x40000015, 0x40000016, 0x40000017,
0x40000018, 0x40000019, 0x4000001A, 0x4000001B, 0x4000001C, 0x4000001D, 0x4000001E, 0x4000001F,
0x40000020, 0x40000021, 0x40000022, 0x40000023, 0x40000024, 0x40000025, 0x40000026, 0x40000027,
0x40000028, 0x40000029, 0x4000002A, 0x4000002B, 0x4000002C, 0x4000002D, 0x4000002E, 0x4000002F,
0x40000030, 0x40000031, 0x40000032, 0x40000033, 0x40000034, 0x40000035, 0x40000036, 0x40000037,
0x40000038, 0x40000039, 0x2000003A, 0x2500003B, 0x8000003C, 0x8000003D, 0x8000003E, 0x8000003F,
0x80000040, 0x80000041, 0x80000042, 0x80000043, 0x80000044, 0x80000045, 0x80000046, 0x80000047,
0x80000048, 0x80000049, 0x1000004A, 0x1000004B, 0x1300004C, 0x1000004D, 0x1000004E, 0x1000004F,
0x10000050, 0x10000051, 0x10000052, 0x10000053, 0x10000054, 0x10000055, 0x10000056, 0x10000057,
0x10000058, 0x10000059, 0x1000005A, 0x1000005B, 0x1000005C, 0x1000005D, 0x1000005E, 0x1000005F,
0x10000060, 0x10000061, 0x10000062, 0x10000063, 0x10000064, 0x10000065, 0x10000066, 0x10000067,
0x10000068, 0x10000069, 0x1000006A, 0x1000006B, 0x1000006C, 0x1000006D, 0x1000006E, 0x1000006F,
0x10000070, 0x10000071, 0x10000072, 0x10000073, 0x10000074, 0x10000075, 0x10000076, 0x10000077,
0x10000078, 0x13000079, 0x1300007A, 0x1300007B, 0x1300007C, 0x1300007D, 0x1300007E, 0x1300007F,
0x13000080, 0x13000081, 0x13000082, 0x13000083, 0x13000084, 0x13000085, 0x13000086, 0x13000087,
0x13000088, 0x13000089, 0x1300008A, 0x1300008B, 0x1300008C, 0x1300008D, 0x1300008E, 0x1300008F,
0x13000090, 0x13000091, 0x13000092, 0x13000093, 0x13000094, 0x13000095, 0x13000096, 0x13000097,
0x13000098, 0x13000099, 0x1300009A, 0x1200009B, 0x1000009C, 0x1000009D, 0x1000009E, 0x1000009F,
0x100000A0, 0x100000A1, 0x080000A2, 0x090000A3, 0x090000A4, 0x090000A5, 0x090000A6, 0x090000A7,
0x090000A8, 0x080000A9, 0x090000AA, 0x090000AB, 0x090000AC, 0x090000AD, 0x090000AE, 0x090000AF,
0x090000B0, 0x090000B1, 0x0D0000B2, 0x0D0000B3, 0x0D0000B4, 0x080000B5, 0x080000B6, 0x080000B7,
0x090000B8, 0x090000B9, 0x0D0000BA, 0x0D0000BB, 0x0D0000BC, 0x0D0000BD, 0x0D0000BE, 0x0D0000BF,
0x090000C0, 0x0C0000C1, 0x090000C2, 0x090000C3, 0x090000C4, 0x0D0000C5, 0x090000C6, 0x090000C7,
0x090000C8, 0x090000C9, 0x130000CA, 0x130000CB, 0x130000CC, 0x100000CD, 0x100000CE, 0x100000CF,
0x100000D0, 0x100000D1, 0x100000D2, 0x400000D3, 0x120000D4, 0x090000D5, 0x090000D6, 0x090000D7,
0x090000D8, 0x090000D9, 0x090000DA, 0x090000DB, 0x090000DC, 0x090000DD, 0x090000DE, 0x120000DF,
0x400000E0, 0x400000E1, 0x100000E2, 0x100000E3, 0x400000E4, 0x400000E5, 0x400000E6, 0x090000E7,
0x800000E8, 0x800000E9, 0x430000EA, 0x430000EB, 0x430000EC, 0x430000ED, 0x430000EE, 0x430000EF,
0x430000F0, 0x430000F1, 0x430000F2, 0x430000F3, 0x430000F4, 0x430000F5, 0x430000F6, 0x430000F7,
0x430000F8, 0x420000F9, 0x430000FA, 0x430000FB, 0x430000FC, 0x430000FD, 0x090000FE, 0x090000FF,
0x09000100, 0x09000101, 0x09000102, 0x09000103, 0x09000104, 0x09000105, 0x09000106, 0x09000107,
0x09000108, 0x09000109, 0x0900010A, 0x0900010B, 0x0900010C, 0x0900010D, 0x1000010E, 0x0900010F,
0x09000110, 0x09000111, 0x09000112, 0x09000113, 0x09000114, 0x43000115, 0x13000116, 0x43000117,
0x43000118, 0x43000119, 0x0900011A, 0x1000011B, 0x1000011C, 0x1000011D, 0x1000011E, 0x1000011F,
0x10000120, 0x10000121, 0x10000122, 0x10000123, 0x10000124, 0x10000125, 0x10000126, 0x10000127,
0x10000128, 0x10000129, 0x1000012A, 0x1000012B, 0x1000012C, 0x1000012D, 0x1000012E, 0x1000012F,
0x10000130, 0x10000131, 0x13000132, 0x40000133, 0x40000134, 0x40000135, 0x40000136, 0x10000137,
0x80000138, 0x80000139, 0x4300013A, 0x4300013B, 0x4300013C, 0x4300013D, 0x4300013E, 0x4300013F,
0x43000140, 0x43000141, 0x43000142, 0x43000143, 0x43000144, 0x43000145, 0x43000146, 0x13000147,
0x13000148, 0x13000149, 0x1300014A, 0x1300014B, 0x1300014C, 0x1300014D, 0x1300014E, 0x1300014F,
0x10000150, 0x09000151, 0x09000152, 0x09000153, 0x09000154, 0x09000155, 0x09000156, 0x09000157,
0x09000158, 0x09000159, 0x0900015A, 0x0900015B, 0x0900015C, 0x0900015D, 0x0900015E, 0x0900015F,
0x09000160, 0x09000161, 0x10000162, 0x10000163, 0x10000164,
};
#endif