forked from Ares-Developers/YRpp
-
Notifications
You must be signed in to change notification settings - Fork 25
/
InfantryTypeClass.h
117 lines (99 loc) · 2.61 KB
/
InfantryTypeClass.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
/*
AnimTypes are initialized by INI files.
*/
#pragma once
#include <TechnoTypeClass.h>
struct SubSequenceStruct
{
int StartFrame;
int CountFrames;
int FacingMultiplier;
SequenceFacing Facing;
int SoundCount;
int Sound1StartFrame;
int Sound1Index; // VocClass
int Sound2StartFrame;
int Sound2Index; // VocClass
};
struct SequenceStruct
{
SubSequenceStruct& GetSequence(Sequence sequence) {
return this->Sequences[static_cast<int>(sequence)];
}
const SubSequenceStruct& GetSequence(Sequence sequence) const {
return this->Sequences[static_cast<int>(sequence)];
}
SubSequenceStruct Sequences[42];
};
class NOVTABLE InfantryTypeClass : public TechnoTypeClass
{
public:
static const AbstractType AbsID = AbstractType::InfantryType;
static constexpr uintptr_t AbsVTable = 0x7EB610;
//Array
ABSTRACTTYPE_ARRAY(InfantryTypeClass, 0xA8E348u);
//IPersist
virtual HRESULT __stdcall GetClassID(CLSID* pClassID) R0;
//IPersistStream
virtual HRESULT __stdcall Load(IStream* pStm) R0;
virtual HRESULT __stdcall Save(IStream* pStm, BOOL fClearDirty) R0;
//Destructor
virtual ~InfantryTypeClass() RX;
//AbstractClass
virtual AbstractType WhatAmI() const RT(AbstractType);
virtual int Size() const R0;
//ObjectTypeClass
virtual bool SpawnAtMapCoords(CellStruct* pMapCoords, HouseClass* pOwner) R0;
virtual ObjectClass* CreateObject(HouseClass* pOwner) R0;
//Constructor
InfantryTypeClass(const char* pID) noexcept
: InfantryTypeClass(noinit_t())
{ JMP_THIS(0x5236A0); }
protected:
explicit __forceinline InfantryTypeClass(noinit_t) noexcept
: TechnoTypeClass(noinit_t())
{ }
//===========================================================================
//===== Properties ==========================================================
//===========================================================================
public:
int ArrayIndex;
PipIndex Pip;
PipIndex OccupyPip;
WeaponStruct OccupyWeapon;
WeaponStruct EliteOccupyWeapon;
SequenceStruct* Sequence;
int FireUp;
int FireProne;
int SecondaryFire;
int SecondaryProne;
TypeList<AnimTypeClass*> DeadBodies;
TypeList<AnimTypeClass*> DeathAnims;
TypeList<int> VoiceComment;
int EnterWaterSound;
int LeaveWaterSound;
bool Cyborg;
bool NotHuman;
bool Ivan; //used for the bomb attack cursor...
int DirectionDistance;
bool Occupier;
bool Assaulter;
int HarvestRate;
bool Fearless;
bool Crawls;
bool Infiltrate;
bool Fraidycat;
bool TiberiumProof;
bool Civilian;
bool C4;
bool Engineer;
bool Agent;
bool Thief;
bool VehicleThief;
bool Doggie;
bool Deployer;
bool DeployedCrushable;
bool UseOwnName;
bool JumpJetTurn;
private: DWORD align_ECC;
};