forked from Spore-Community/Spore-ModAPI
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcCreatureModeStrategy.h
More file actions
224 lines (186 loc) · 5.49 KB
/
cCreatureModeStrategy.h
File metadata and controls
224 lines (186 loc) · 5.49 KB
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
#pragma once
#include <Spore\App\IMessageListener.h>
#include <Spore\App\IGameMode.h>
#include <Spore\Input.h>
#include <Spore\Clock.h>
#include <Spore\Simulator\SubSystem\cStrategy.h>
#include <Spore\Simulator\cCreatureDisplayStrategy.h>
#include <Spore\Simulator\cCreatureBase.h>
#include <Spore\Simulator\cInteractableObject.h>
#define cCreatureModeStrategyPtr eastl::intrusive_ptr<App::cCreatureModeStrategy>
#define ICreatureModeActionHandlerPtr eastl::intrusive_ptr<App::ICreatureModeActionHandler>
#define CreatureModeStrategy (*App::cCreatureModeStrategy::Get())
namespace App
{
class ICreatureModeActionHandler
: public DefaultRefCounted
{
public:
/* 10h */ virtual bool func10h(int);
/* 14h */ virtual bool func14h(); // true
/* 18h */ virtual bool ExecuteAction(uint32_t actionID, void* actionData);
/* 1Ch */ virtual bool func1Ch(int);
};
class cCreatureModeStrategy
/* 00h */ : public App::IGameMode
/* 04h */ , public App::IMessageListener
/* 08h */ , public Simulator::cStrategy
{
public:
static cCreatureModeStrategy* Get();
void ExecuteAction(uint32_t actionID, void* actionData);
public:
/* 24h */ int field_24;
/* 28h */ Simulator::cGonzagoTimer field_28;
/* 48h */ bool field_48;
/* 49h */ bool field_49;
/* 4Ch */ eastl::vector<int> field_4C;
/* 60h */ int field_60;
/* 64h */ int field_64;
/* 68h */ cCreatureDisplayStrategyPtr mpDisplayStrategy;
/* 6Ch */ bool field_6C;
/* 70h */ int field_70;
/* 74h */ int field_74;
/* 78h */ int field_78;
/* 7Ch */ int field_7C;
/* 80h */ int field_80;
/* 88h */ Clock field_88;
/* A0h */ int field_A0;
/* A4h */ int field_A4; // -1
/* A8h */ int field_A8; // -1
/* ACh */ int field_AC;
/* B0h */ int field_B0;
/* B4h */ int field_B4;
/* B8h */ int field_B8;
/* BCh */ eastl::vector<ICreatureModeActionHandlerPtr> mActionHandlers;
/* D0h */ int field_D0;
/* D4h */ int field_D4;
/* D8h */ int field_D8;
/* DCh */ bool mbDisplayingEvolutionButton;
/* DDh */ bool field_DD;
/* DEh */ bool field_DE;
/* E0h */ int mAllPartsUnlockedColumn; // 1
/* E4h */ bool field_E4;
/* E5h */ bool field_E5;
/* E6h */ bool field_E6;
};
ASSERT_SIZE(cCreatureModeStrategy, 0xE8);
namespace Addresses(cCreatureModeStrategy)
{
DeclareAddress(Get); // 0xD2D640 0xD38840
DeclareAddress(ExecuteAction); // 0xD38770 0xD39360
}
#ifdef SDK_TO_GHIDRA
cCreatureModeStrategy* sCreatureModeStrategy;
#endif
namespace CreatureModeStrategies {
using namespace Simulator;
struct Interact {
static const uint32_t ID = 0xD3353638;
cCreatureBase* creature;
cInteractableObject* interactableObject;
int count; // ?
void* unk1; // unknown class
};
struct EatFruit {
static const uint32_t ID = 0xD335362B;
cCreatureBase* creature;
cInteractableObject* food;
int field_8; // 0
int field_16; // 0
void* unk1; // unknown class?
};
struct EatMeat {
static const uint32_t ID = 0xD335362D;
cCreatureBase* creature;
cInteractableObject* food;
int field_8; // 0
void* unk1; // unknown class?
};
struct UnlockPart {
static const uint32_t ID = 0x5371F11;
cCreatureBase* creature;
int field_4;
int unlockLevel;
};
struct Mate {
static const uint32_t ID = 0xD335362C;
cCreatureBase* creature;
cCreatureBase* targetcreature;
int field_8; // 0
void* unk1; // unknown class?
};
struct LayEgg {
static const uint32_t ID = 0xD335362C;
cCreatureBase* creature;
cCreatureBase* targetcreature;
int field_8; // 0
void* unk1; // unknown class?
};
struct Pickup {
static const uint32_t ID = 0xD3353636;
cCreatureBase* creature;
cGameData* target; // cInteractableObject* or cCreatureBase*
int field_8; // 0
void* unk1; // unknown class?
};
struct Pickup1 {
static const uint32_t ID = 0xD335362C;
cCreatureBase* creature;
cGameData* target; // cInteractableObject* or cCreatureBase*
int field_8; // 0
void* unk1; // unknown class?
};
/// Unknowns ///
struct UnkActionCombat1 { // something to do with combat?
static const uint32_t ID = 0xD3353637;
uint32_t field_4; // 0
int field_8; // usually 1
uint32_t field_12; // 0
uint32_t field_16; // large value
uint32_t field_20;
};
struct UnkActionRelation1 { // Called when socializing or killing successfully?
static const uint32_t ID = 0x45AB96E;
cCreatureBase* creature;
int field_4;
// struct, class, or pointer? Not cGameData
uint32_t field_8;
int field_12; // usually 1
uint32_t field_16;
uint32_t field_20;
};
struct UnkActionSocial1 { // Called when socializing successfully, after UnkActionRelation1
static const uint32_t ID = 0x60B4123;
cCreatureBase* creature;
cCreatureBase* targetcreature;
uint32_t field_8;
uint32_t field_12;
uint32_t field_16;
uint32_t field_20;
uint32_t field_24;
uint32_t field_28;
};
struct UnkActionKill1 { // Called when killing successfully, after UnkActionRelation1
static const uint32_t ID = 0xD335362C;
cCreatureBase* creature;
cCreatureBase* targetcreature;
uint32_t field_8;
uint32_t field_12;
uint32_t field_16;
uint32_t field_20;
uint32_t field_24;
uint32_t field_28;
};
struct UnkActionKill2 { // Called when killing successfully, after UnkActionKill1
static const uint32_t ID = 0xD3353637;
cCreatureBase* creature;
cCreatureBase* targetcreature;
uint32_t field_12; // large value
uint32_t field_16; // large value
uint32_t field_20;
uint32_t field_24;
uint32_t field_28;
};
}
}