-
Notifications
You must be signed in to change notification settings - Fork 0
/
GTASA_classes.h
170 lines (144 loc) · 4.19 KB
/
GTASA_classes.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
#ifndef GTASA_CLASSES_H
#define GTASA_CLASSES_H
#include <Windows.h>
#include <stdint.h>
class CAnimBlock
{
public:
const char* GetName();
bool IsLoaded();
uint16_t GetReferenceCount();
int GetIdOffset();
size_t GetAnimationCount();
DWORD GetFirstAssocGroup();
void SetAnimationCount(size_t numAnims);
void SetName(const char* name);
void SetIdOffset(int idOffset);
void SetFirstAssocGroup(DWORD assocGroup);
void SetLoaded(bool loaded);
void SetReferenceCount(uint16_t refs);
char m_name[16];
bool m_loaded;
char pad1;
uint16_t m_refs;
int m_idOffset;
size_t m_numAnims;
DWORD m_assocGroup;
};
struct CAnimBlendSequence
{
unsigned int m_nHash;
unsigned short m_nFlags;
unsigned short m_nFrameCount;
void *m_pFrames;
};
/*
class CAnimBlendSequence {
public:
unsigned int m_nHash;
unsigned short m_nFlags;
unsigned short m_nFrameCount;
void *m_pFrames;
//funcs
//CAnimBlendSequence();
//~CAnimBlendSequence();
void CompressKeyframes(unsigned char* arg1);
int GetDataSize(bool arg1);
bool MoveMemorY();
int RemoveQuaternionFlips();
void RemoveUncompressedData(unsigned char* arg1);
void SetBoneTag(int hash);
void SetName(char const* string);
void SetNumFrames(int count, bool arg2, bool arg3, unsigned char* arg4);
void Uncompress(unsigned char* arg1);
};
*/
class CAnimBlendHierarchy;
class CAnimBlendStaticAssociation {
protected:
void *vtable;
public:
unsigned short m_nNumBlendNodes;
short m_nAnimID;
short m_nAnimGroup;
short m_nFlags;
int* m_pAnimBlendNodesSequenceArray;
CAnimBlendHierarchy* m_pAnimBlendHier;
void AllocateSequenceArray(int size);
//CAnimBlendStaticAssociation();
void Init(void* pClump, CAnimBlendHierarchy* pAnimBlendHier);
//virtual ~CAnimBlendStaticAssociation() = 0;
};
class CAnimBlendHierarchy {
public:
unsigned int m_hashKey;
CAnimBlendSequence *m_pSequences;
unsigned short m_nSeqCount; // pAnimHierarchy + 8
bool m_bRunningCompressed;
char field_B;
int m_nAnimBlockId;
float m_fTotalTime;
int field_14;
//funcs
void* AllocSequenceBlock(bool arg1);
//CAnimBlendHierarchy();
void CalcTotalTime();
void CalcTotalTimeCompressed();
void RemoveAnimSequences();
void RemoveQuaternionFlips();
void RemoveUncompressedData();
void SetName(char const* string);
void Shutdown();
void Uncompress();
};
//4 + 4 + 4 + 4 + 2 + 2 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 2 + 2 + 4 + 4
class CAnimBlendAssociation {
protected:
void *vtable;
public:
void *m_pPrev;
void *m_pAnimBlendClumpData;
unsigned short m_nNumBlendNodes;
short m_nAnimGroup;
void *m_pAnimBlendNodeArray;
CAnimBlendHierarchy *m_pAnimBlendHierarchy;
float m_fBlendAmount;
float m_fBlendDelta;
float m_fCurrentTime;
float m_fSpeed;
float m_fTimeStep;
short m_nwAnimID;
unsigned short m_nFlags;
unsigned int m_nCallbackType;
void *m_pCallbackFunc;
void *m_pCallbackData;
//funcs
void* AllocateAnimBlendNodeArray(int numBlendNodes);
CAnimBlendAssociation(void *& arg1_CAnimBlendStaticAssociation);
CAnimBlendAssociation(void* pClump, CAnimBlendHierarchy* pAnimBlendHier);
void* GetNode(int index);
void Init(void* & arg1_CAnimBlendStaticAssociation);
void Init(void* pClump, CAnimBlendHierarchy* pAnimBlendHier);
void ReferenceAnimBlock();
void SetBlend(float fBlendAmount, float fBlendDelta);
void SetCurrentTime(float currentTime);
void SetDeleteCallback(void* func, void* data);
void SetFinishCallback(void* func, void* data);
void Start(float currentTime);
void SyncAnimation(CAnimBlendAssociation* arg1);
bool UpdateBlend(float BlendDeltaMult);
void UpdateTime();
//~CAnimBlendAssociation();
//virtual ~CAnimBlendAssociation();
};
class CAnimBlendClumpData
{
public:
void *nextAssoc; // pointer to CAnimBlendAssociation::next
void *prevAssoc;
int numFrames;
// xbox has a 4b field here
DWORD *pedPosition;
DWORD *frames;
};
#endif