forked from derandark/DungeonViewerAC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PartArray.h
158 lines (126 loc) · 4.16 KB
/
PartArray.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
#pragma once
#include "ObjCache.h"
#include "MathLib.h"
#include "DLListBase.h"
#include "Frame.h"
class Position;
class CObjCell;
class CPhysicsPart;
class CPhysicsObj;
class CSetup;
class CSingleMush;
class AnimSequenceNode;
class AnimFrame;
class AnimData;
class Palette;
class MotionTableManager;
class LIGHTLIST;
class CSequence : public PackObj
{
public:
CSequence();
~CSequence();
void clear();
void clear_animations();
void clear_physics();
void set_object(CPhysicsObj *pPhysicsObj);
void set_placement_frame(AnimFrame *PlacementFrame, DWORD ID);
void set_velocity(const Vector& Velocity);
void set_omega(const Vector& Omega);
void combine_physics(const Vector& Velocity, const Vector& Omega);
void subtract_physics(const Vector& Velocity, const Vector& Omega);
AnimFrame* get_curr_animframe();
long get_curr_frame_number();
void multiply_cyclic_animation_framerate(float fRate);
void remove_cyclic_anims();
void append_animation(AnimData *pAnimData);
void apply_physics(Frame* pframe, double arg4, double argC);
void update(double time_elapsed, Frame* pframe);
void update_internal(double time_elapsed, AnimSequenceNode** ppanim, double *pframenum, Frame *pframe);
void apricot();
void execute_hooks(AnimFrame *pAnimFrame, long lDir);
void advance_to_next_animation(double TimeElapsed, AnimSequenceNode** ppAnim, double *pFrameNum, Frame *pFrame);
DLListBase m_Animations; // 0x04
AnimSequenceNode *m_pNodes; // 0x0C
Vector m_Velocity; // 0x10
Vector m_Omega; // 0x1C
CPhysicsObj *m_pPhysicsObj; // 0x28
DWORD m_dw2C;
double m_CurrentFrameNum; // 0x30
AnimSequenceNode *m_CurrentAnim; // 0x38
AnimFrame *m_PlacementFrame; // 0x3C
DWORD m_PlacementID; // 0x40
DWORD m_dw44;
};
class CPartArray
{
public:
CPartArray();
~CPartArray();
static CPartArray *CreateMesh(CPhysicsObj *pPhysicsObj, DWORD ID);
static CPartArray *CreateSetup(CPhysicsObj *pPhysicsObj, DWORD ID, BOOL);
static CPartArray *CreateParticle(CPhysicsObj *pPhysicsObj, DWORD ObjCount, Vector *Unused);
void Destroy();
void DestroySetup();
void DestroyParts();
void DestroyPals();
void DestroyLights();
BOOL InitParts();
BOOL InitLights();
void InitDefaults();
void AddLightsToCell(CObjCell *pCell);
BOOL CacheHasPhysicsBSP();
void RemoveLightsFromCell(CObjCell *pCell);
void SetCellID(DWORD ID);
BOOL SetMeshID(DWORD ID);
BOOL SetSetupID(DWORD ID, BOOL Unknown);
BOOL SetPlacementFrame(DWORD ID);
void SetFrame(Frame *pFrame);
void SetNoDrawInternal(BOOL NoDraw);
void SetTranslucencyInternal(float Amount);
void UpdateParts(Frame *pFrame);
void Update(float fTimeElapsed, Frame *pFrame);
void UpdateViewerDistance(void);
void UpdateViewerDistance(float Distance, const Vector& Angle);
BOOL AllowsFreeHeading();
DWORD GetDataID();
float GetHeight();
float GetRadius();
void Draw(Position *Pos);
DWORD m_dw00;
CPhysicsObj* m_pPhysicsObj; // 0x04
CSequence m_Sequence; // 0x08 -- size 0x48
MotionTableManager* m_pMTManager; // 0x50
CSetup* m_pPartSetup; // 0x54
DWORD m_iPartCount; // 0x58
CPhysicsPart** m_pPartObjs; // 0x5C
Vector m_Scale; // 0x60
CSingleMush* m_pMush; // 0x6C
Palette** m_pPalettes; // 0x70
LIGHTLIST* m_pLightList; // 0x74
DWORD m_dw78;
};
class CPartGroup : public CPartArray
{
// Finish me
};
// Light information is obtained from CSetup
class LightInfo;
class LIGHTOBJ // size 0x48
{
public:
LIGHTOBJ();
~LIGHTOBJ();
LightInfo* m_LightInfo; // 0x00
Frame m_Frame; // 0x04
DWORD m_Flags; // 0x44
};
class LIGHTLIST // size 0x8
{
public:
LIGHTLIST(DWORD LightCount);
~LIGHTLIST();
void set_frame(Frame *pFrame);
DWORD m_LightCount;
LIGHTOBJ* m_Lights;
};