-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcarnage.cpp
180 lines (140 loc) · 3.59 KB
/
carnage.cpp
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
#include "carnage.h"
#include "validate.h"
#include "trig.h"
#include "panel.h"
#include "spool.h"
extern const char *gObjFile;
extern CBaddy *BaddyList;
EXPORT u8 gObjFileRegion;
// @SMALLTODO
CCarnageHitSpark::CCarnageHitSpark(CVector*)
{
printf("CCarnageHitSpark::CCarnageHitSpark(CVector*);");
}
// @Ok
CCarnageHitSpark::~CCarnageHitSpark(void)
{
}
// @Ok
CCarnage::~CCarnage(void)
{
this->DeleteFrom(reinterpret_cast<CBody**>(&BaddyList));
Panel_DestroyHealthBar();
if (this->field_32C)
delete reinterpret_cast<CItem*>(this->field_32C);
if (this->field_344)
Mem_Delete(this->field_344);
}
// @NotOk
// globals
CCarnage::CCarnage(int* a2, int a3)
{
this->field_334 = 0;
this->field_338 = 0;
this->field_33C = 0;
this->field_370 = 0;
this->field_374 = 0;
this->field_378 = 0;
this->SquirtAngles(reinterpret_cast<i16*>(this->SquirtPos(a2)));
this->InitItem("carnage");
this->AttachTo(reinterpret_cast<CBody**>(0x56E9900));
this->mFlags |= 0x480;
this->field_3C = 0x548980;
this->field_194 = 278528;
this->field_38 = 314;
this->field_31C.bothFlags = 1;
this->field_E2 = 3000;
this->field_DC = 160;
this->field_21E = 100;
this->field_35C = 1;
this->field_354 = 241;
unsigned __int16 *LinksPointer = reinterpret_cast<unsigned __int16*>(Trig_GetLinksPointer(a3));
print_if_false(*LinksPointer == 1, "Error");
this->field_358 = LinksPointer[1];
Panel_CreateHealthBar(this, 314);
CreateSonicBubbleVertexWobbler();
}
// @MEDIUMTODO
void CreateSonicBubbleVertexWobbler(void)
{}
// @Ok
void Carnage_Create_Carnage(const unsigned int *stack, unsigned int *result)
{
int* v2 = reinterpret_cast<int*>(*stack);
int v3 = static_cast<int>(stack[1]);
*result = reinterpret_cast<unsigned int>(new CCarnage(v2, v3));
}
// @NotOk
// globals
CSonicBubble::CSonicBubble(void)
{
this->InitItem(gObjFile);
this->mModel = Spool_GetModel(0xE9DD4877, gObjFileRegion);
this->AttachTo(reinterpret_cast<CBody**>(0x56E9900));
this->mCBodyFlags &= 0xFFFFFFEF;
this->field_DC = 0;
}
// @Ok
void CSonicBubble::SetScale(int scale)
{
this->field_28 = 0;
this->field_2A = 0;
this->field_2C = 0;
this->mFlags |= 0x200;
}
extern CBaddy* BaddyList;
// @NotOk
// globals
CSonicBubble::~CSonicBubble(void)
{
this->DeleteFrom(reinterpret_cast<CBody**>(&BaddyList));
}
// @Ok
void CCarnage::Shouldnt_DoPhysics_Be_Virtual(void)
{
this->DoPhysics();
}
// @Ok
INLINE CCarnageElectrified::CCarnageElectrified(CSuper* pSuper)
{
print_if_false(pSuper != 0, "NULL pSuper sent to CVenomWrap");
print_if_false(pSuper->field_38 == 314, "Non carnage sent to CCarnageElectrified");
this->field_3C = Mem_MakeHandle(pSuper);
}
// @Ok
CCarnageElectrified::~CCarnageElectrified(void)
{
}
// @BIGTODO
void CCarnage::DoPhysics(void)
{}
void validate_CCarnage(void){
VALIDATE_SIZE(CCarnage, 0x37C);
VALIDATE(CCarnage, field_32C, 0x32C);
VALIDATE(CCarnage, field_334, 0x334);
VALIDATE(CCarnage, field_338, 0x338);
VALIDATE(CCarnage, field_33C, 0x33C);
VALIDATE(CCarnage, field_344, 0x344);
VALIDATE(CCarnage, field_354, 0x354);
VALIDATE(CCarnage, field_358, 0x358);
VALIDATE(CCarnage, field_35C, 0x35C);
VALIDATE(CCarnage, field_36C, 0x36C);
VALIDATE(CCarnage, field_370, 0x370);
VALIDATE(CCarnage, field_374, 0x374);
VALIDATE(CCarnage, field_378, 0x378);
}
void validate_CSonicBubble(void)
{
VALIDATE_SIZE(CSonicBubble, 0xF8);
VALIDATE(CSonicBubble, field_F4, 0xF4);
}
void validate_CCarnageElectrified(void)
{
VALIDATE_SIZE(CCarnageElectrified, 0x48);
VALIDATE(CCarnageElectrified, field_3C, 0x3C);
VALIDATE(CCarnageElectrified, field_44, 0x44);
}
void validate_CCarnageHitSpark(void)
{
VALIDATE_SIZE(CCarnageHitSpark, 0x84);
}