forked from citizenfx/fivem
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathropeManager.h
147 lines (121 loc) · 3.06 KB
/
ropeManager.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
#pragma once
#include "StdInc.h"
#include <rageVectors.h>
namespace rage
{
// ----------- rage::ropeData -----------
class grcTexture;
class ropeData
{
public:
ropeData();
virtual ~ropeData() {}
void* operator new(size_t size);
void operator delete(void* pointer);
uint32_t numSections; // 0x8
float radius; // 0xC
uint32_t diffuseTextureNameHash; // 0x10
uint32_t normalMapNameHash; // 0x14
grcTexture* diffuseTexture; // 0x18
grcTexture* normalMap; // 0x20
float distanceMappingScale; // 0x28
float UVScaleX; // 0x2C
float UVScaleY; // 0x30
float specularFresnel; // 0x34
float specularFalloff; // 0x38
float specularIntensity; // 0x3C
float bumpiness; // 0x40
uint32_t color; // 0x44
};
static_assert(sizeof(ropeData) == 0x48);
// ----------- rage::ropeDataManager -----------
class ropeDataManager
{
public:
virtual ~ropeDataManager() = 0;
void UnloadRopeTextures();
void Load();
atArray<ropeData*> typeData; // 0x8
static ropeDataManager* GetInstance();
};
static_assert(sizeof(ropeDataManager) == 0x18);
// ----------- rage::ropeInstance -----------
class phVerletCloth;
class rmcRopeDrawable;
class phInst;
class environmentCloth;
class scriptHandler;
enum eRopeFlags : uint8_t
{
DrawShadowEnabled = 2,
Breakable = 4,
RopeUnwindingFront = 8,
RopeWinding = 32
};
class ropeInstance
{
public:
ropeInstance* currentRope; // 0x0
ropeInstance* nextRope; // 0x8
ropeInstance* previousRope; // 0x10
phVerletCloth* verletCloth; // 0x18
char pad_20[0x38]; // 0x20
rmcRopeDrawable* drawable; // 0x58
phInst* phInst; // 0x60
environmentCloth* environmentCloth; // 0x68
char pad_70[0x8]; // 0x70
uint32_t attachLength; // 0x78
char pad_8C[0x24]; // 0x70
char* attachBoneOne; // 0xA0
char* attachBoneTwo; // 0xA8
Vector3 entityOneOffset; // 0xB0
Vector3 entityTwoOffset; // 0xC0
char pad_D0[0x4]; // 0xD0
Vector3 attachPosition; // 0xD4
char pad_E4[0xB0]; // 0xE4
scriptHandler* scriptHandler; // 0x198
uint32_t updateOrder; // 0x1A0
int handle; // 0x1A4
char pad_1A8[0x4]; // 0x1A8
uint32_t ropeTypeIndex; // 0x1AC
char pad_1B0[0x8]; // 0x1B0
float field_1B4; // 0x1B8
uint32_t field_1BC; // 0x1BC
float forcedLength; // 0x1C0
float initLength; // 0x1C4
float minLength; // 0x1C8
float lengthChangeRate; // 0x1CC
float sectionLength; // 0x1D0
float timeMultiplier; // 0x1D4
char pad_1D8[0x6]; // 0x1D8
eRopeFlags flags; // 0x1DE
char pad_1DF[0x1]; // 0x1DF
};
static_assert(sizeof(ropeInstance) == 0x1E0);
// ----------- rage::ropeManager -----------
class verletTaskManager;
template<typename T>
class LinkedList
{
public:
T head;
T tail;
};
class ropeManager
{
public:
virtual ~ropeManager() = 0;
char pad_8[0x8]; // 0x8
verletTaskManager* verletTaskManager; // 0x10
uint32_t numAllocated; // 0x18
uint32_t numAvailable; // 0x1C
char pad_20[0x8]; // 0x20
LinkedList<ropeInstance*> allocated; // 0x28
LinkedList<ropeInstance*> available; // 0x38
char pad_48[0x10]; // 0x48
LinkedList<phVerletCloth*> cloths; // 0x58
ropeInstance* FindRope(int handle);
static ropeManager* GetInstance();
};
static_assert(sizeof(ropeManager) == 0x68);
}