-
Notifications
You must be signed in to change notification settings - Fork 44
/
BuildingTypeClass.h
312 lines (280 loc) · 6.79 KB
/
BuildingTypeClass.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
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
#pragma once
#include <TechnoTypeClass.h>
class OverlayTypeClass;
struct BuildingAnimStruct
{
char Anim[0x10];
char Damaged[0x10];
char Garrisoned[0x10];
Point2D Position;
int ZAdjust;
int YSort;
bool Powered;
bool PoweredLight;
bool PoweredEffect;
bool PoweredSpecial;
};
struct BuildingAnimFrameStruct
{
DWORD dwUnknown;
int FrameCount;
int FrameDuration;
};
class NOVTABLE BuildingTypeClass : public TechnoTypeClass
{
public:
static const AbstractType AbsID = AbstractType::BuildingType;
//Array
ABSTRACTTYPE_ARRAY(BuildingTypeClass, 0xA83C68u);
//IPersist
virtual HRESULT __stdcall GetClassID(CLSID* pClassID) R0;
//IPersistStream
//Destructor
virtual ~BuildingTypeClass() RX;
//AbstractClass
virtual AbstractType WhatAmI() const RT(AbstractType);
virtual int Size() const R0;
//AbstractTypeClass
//ObjectTypeClass
virtual bool SpawnAtMapCoords(CellStruct* pMapCoords, HouseClass* pOwner) R0;
virtual ObjectClass* CreateObject(HouseClass* pOwner) R0;
//TechnoTypeClass
//BuildingTypeClass
virtual SHPStruct* LoadBuildup() R0;
//non-virtual
bool IsVehicle() const
{ JMP_THIS(0x465D40); }
short GetFoundationWidth() const
{ JMP_THIS(0x45EC90); }
short GetFoundationHeight(bool bIncludeBib) const
{ JMP_THIS(0x45ECA0); }
bool CanPlaceHere(CellStruct* cell, HouseClass* owner) const
{ JMP_THIS(0x464AC0); }
// helpers
bool HasSuperWeapon(int index) const {
return (this->SuperWeapon == index || this->SuperWeapon2 == index);
}
bool HasSuperWeapon() const {
return (this->SuperWeapon != -1 || this->SuperWeapon2 != -1);
}
bool CanTogglePower() const {
return this->TogglePower && (this->PowerDrain > 0 || this->Powered);
}
BuildingAnimStruct& GetBuildingAnim(BuildingAnimSlot slot) {
return this->BuildingAnim[static_cast<int>(slot)];
}
const BuildingAnimStruct& GetBuildingAnim(BuildingAnimSlot slot) const {
return this->BuildingAnim[static_cast<int>(slot)];
}
//Constructor
BuildingTypeClass(const char* pID) noexcept
: BuildingTypeClass(noinit_t())
{ JMP_THIS(0x45DD90); }
protected:
explicit __forceinline BuildingTypeClass(noinit_t) noexcept
: TechnoTypeClass(noinit_t())
{ }
//===========================================================================
//===== Properties ==========================================================
//===========================================================================
public:
int ArrayIndex;
CellStruct* FoundationData;
SHPStruct* Buildup;
bool BuildupLoaded;
BuildCat BuildCat;
CoordStruct HalfDamageSmokeLocation1;
CoordStruct HalfDamageSmokeLocation2;
DWORD align_E24;
double GateCloseDelay;
int LightVisibility;
int LightIntensity;
int LightRedTint;
int LightGreenTint;
int LightBlueTint;
Point2D PrimaryFirePixelOffset;
Point2D SecondaryFirePixelOffset;
OverlayTypeClass *ToOverlay;
int ToTile;
char BuildupFile [0x10];
int BuildupSound;
int PackupSound;
int CreateUnitSound;
int UnitEnterSound;
int UnitExitSound;
int WorkingSound;
int NotWorkingSound;
char PowersUpBuilding [0x18];
UnitTypeClass* FreeUnit;
InfantryTypeClass* SecretInfantry;
UnitTypeClass* SecretUnit;
BuildingTypeClass* SecretBuilding;
int field_EB0;
int Adjacent;
AbstractType Factory;
CoordStruct TargetCoordOffset;
CoordStruct ExitCoord;
CellStruct* FoundationOutside;
int field_ED8;
int DeployFacing;
int PowerBonus;
int PowerDrain;
int ExtraPowerBonus;
int ExtraPowerDrain;
eFoundation Foundation;
int Height;
int OccupyHeight;
int MidPoint;
int DoorStages;
BuildingAnimFrameStruct BuildingAnimFrame[6];
BuildingAnimStruct BuildingAnim[0x15];
int Upgrades;
SHPStruct* DeployingAnim;
bool DeployingAnimLoaded;
SHPStruct* UnderDoorAnim;
bool UnderDoorAnimLoaded;
SHPStruct* Rubble;
bool RubbleLoaded;
SHPStruct* RoofDeployingAnim;
bool RoofDeployingAnimLoaded;
SHPStruct* UnderRoofDoorAnim;
bool UnderRoofDoorAnimLoaded;
SHPStruct* DoorAnim;
SHPStruct* SpecialZOverlay;
int SpecialZOverlayZAdjust;
SHPStruct* BibShape;
bool BibShapeLoaded;
int NormalZAdjust;
int AntiAirValue;
int AntiArmorValue;
int AntiInfantryValue;
Point2D ZShapePointMove;
int unknown_1538;
int unknown_153C;
int unknown_1540;
int unknown_1544;
WORD ExtraLight;
bool TogglePower;
bool HasSpotlight;
bool IsTemple;
bool IsPlug;
bool HoverPad;
bool BaseNormal;
bool EligibileForAllyBuilding;
bool EligibleForDelayKill;
bool NeedsEngineer;
int CaptureEvaEvent;
int ProduceCashStartup;
int ProduceCashAmount;
int ProduceCashDelay;
int InfantryGainSelfHeal;
int UnitsGainSelfHeal;
int RefinerySmokeFrames;
bool Bib;
bool Wall;
bool Capturable;
bool Powered;
bool PoweredSpecial;
bool Overpowerable;
bool Spyable;
bool CanC4;
bool WantsExtraSpace;
bool Unsellable;
bool ClickRepairable;
bool CanBeOccupied;
bool CanOccupyFire;
int MaxNumberOccupants;
bool ShowOccupantPips;
Point2D MuzzleFlash[0xA];
Point2D DamageFireOffset[8];
Point2D QueueingCell;
int NumberImpassableRows;
Point2D RemoveOccupy[8];
Point2D AddOccupy[8];
bool Radar;
bool SpySat;
bool ChargeAnim;
bool IsAnimDelayedFire;
bool SiloDamage;
bool UnitRepair;
bool UnitReload;
bool Bunker;
bool Cloning;
bool Grinding;
bool UnitAbsorb;
bool InfantryAbsorb;
bool SecretLab;
bool DoubleThick;
bool Flat;
bool DockUnload;
bool Recoilless;
bool HasStupidGuardMode;
bool BridgeRepairHut;
bool Gate;
bool SAM;
bool ConstructionYard;
bool NukeSilo;
bool Refinery;
bool Weeder;
bool WeaponsFactory;
bool LaserFencePost;
bool LaserFence;
bool FirestormWall;
bool Hospital;
bool Armory;
bool EMPulseCannon;
bool TickTank;
bool TurretAnimIsVoxel;
bool BarrelAnimIsVoxel;
bool CloakGenerator;
bool SensorArray;
bool ICBMLauncher;
bool Artillary;
bool Helipad;
bool OrePurifier;
bool FactoryPlant;
float InfantryCostBonus;
float UnitsCostBonus;
float AircraftCostBonus;
float BuildingsCostBonus;
float DefensesCostBonus;
bool GDIBarracks;
bool NODBarracks;
bool YuriBarracks;
float ChargedAnimTime;
int DelayedFireDelay;
int SuperWeapon;
int SuperWeapon2;
int GateStages;
int PowersUpToLevel;
bool DamagedDoor;
bool InvisibleInGame;
bool TerrainPalette;
bool PlaceAnywhere;
bool ExtraDamageStage;
bool AIBuildThis;
bool IsBaseDefense;
BYTE CloakRadiusInCells;
bool ConcentricRadialIndicator;
int PsychicDetectionRadius;
int BarrelStartPitch;
char VoxelBarrelFile [0x1C];
CoordStruct VoxelBarrelOffsetToPitchPivotPoint;
CoordStruct VoxelBarrelOffsetToRotatePivotPoint;
CoordStruct VoxelBarrelOffsetToBuildingPivotPoint;
CoordStruct VoxelBarrelOffsetToBarrelEnd;
bool DemandLoad;
bool DemandLoadBuildup;
bool FreeBuildup;
bool IsThreatRatingNode;
bool PrimaryFireDualOffset;
bool ProtectWithWall;
bool CanHideThings;
bool CrateBeneath;
bool LeaveRubble;
bool CrateBeneathIsMoney;
char TheaterSpecificID [0x13];
int NumberOfDocks;
VectorClass<CoordStruct> DockingOffsets;
private: DWORD align_1794;
};