-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEnvironment_Objects.h
More file actions
322 lines (225 loc) · 8.4 KB
/
Environment_Objects.h
File metadata and controls
322 lines (225 loc) · 8.4 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
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
313
314
315
316
317
318
319
320
321
322
#ifndef ENVIRONMENT_OBJECTS_H_INCLUDED
#define ENVIRONMENT_OBJECTS_H_INCLUDED
//#include "Global.h"
#include "Soul.h"
//The tile
class Environment_Floor_Objects: public Soul
{
private:
Chain_Link Link;
Square Floor_Objects;
//The tile type
int Type, Object_Type;
//Coordinates of the objects
int Object_Coord_x, Object_Coord_y;
int Center_Base;
// Collsion detection properties of Objects. Width relates to x, Lenght relate to y, Height relates to z.
int Object_Width, Object_Lenght;
// Activate animation for objects base on type
bool Animated;
bool Alive_Key;
public:
Environment_Floor_Objects();
//(1) The construtor for the base floor objects.Most base floor tiles are squares.
Environment_Floor_Objects( int x, int y, int object_type );
// Use restricted to Constructor 1 until further anylisis. Uses type to give value to height and width.
//void Width_Height_Assigner(int type);
//Get the tile type
int Get_Type();
int Get_Object_Type();
int Get_X();
int Get_Y();
int Get_Center_Base();
bool Get_Alive_Key();
//Display functions only
void Show();
//
///////
////////////////
//////////////////////////
//////////////////////////////////////
///////////////////////////////////////////////////
//USELESS
///////////////////////////////////////////////////
///////////////////////////////////////
///////////////////////////
////////////////
///////
//
void Soul_Physics(int condition, Uint32 deltaTicks){}
void Soul_Logic(Ai_Brain Copy_Brain, Uint32 deltaTicks){}
void Soul_Health_Condtions(Uint32 deltaTicks){}
void Soul_Input(){}
void Move_Special_Object(){}
void Teleport_Direct_Input() {}
void Teleport_Force_Input(float condition, int condition2){}
void Game_Start(External_Configuration config){}
void Variable_Setter_Bool_Conditional(int condition, bool condition2){}
void Variable_Setter_Int_Conditional(int condition, int condition2){}
void Variable_Setter_Special_Conditional(int condition, int condition2, bool conditionBool, int conditionInt){}
void Variable_Setter_Ai_Brain_Conditional(int condition, Ai_Brain Copy_Brain) {}
void Variable_Setter(){}
void Build_Font(SDL_Surface *font){}
void Variable_Update(Uint32 deltaTicks){}
void Command_Slave_Calculation(){}
Square Get_Objects(){ return Floor_Objects;}
Square Get_Objects_Base(){ return Floor_Objects;}
int Get_Health() {return -1;}
int Get_Gate_Type(){return 0;}
int Get_Gravity_Physics(){return 0;}
int Get_Object_Elevation(){return 0;}
int Get_Child_Num(){return 0;}
int Get_Slave_Order(){return 0;}
Chain_Link Get_Chain_Link(){return Link;}
bool Get_Render_Key(){return false;}
bool Get_Animated_Key(){return false;}
bool Get_Active_Animation_Key(){return false;}
bool Get_In_Use(){return false;}
std::string Get_Text() {return "";}
int Get_Object_State() {return 0;}
int Get_Z() {return 0;}
Square Get_Objects_Children(int condition){return Floor_Objects;}
void Show_Base(){}
void Show(int o){}
void Show_On_Screen(){}
void Show_Children(int condition, int condition2){}
void Show_Graphic_Fx_Shadowed(){}
void Show_Graphic_Fx_Drop_Shadow(int coord){}
void Show_Graphic_Fx_Transparancy(){}
void Show_Text( int x, int y, std::string text, SDL_Surface *font ){}
};
class Environment_Float_Objects: public Soul
{
private:
Chain_Link Link;
Square Floating_Objects, Floating_Objects_Base;
int Gravity_Physics;
//The tile type and the type of the class
int Type, Object_Type;
//Coordinates of the objects
int Object_Coord_x, Object_Coord_y, Object_Coord_z;
int Center_Base;
// Collsion detection properties of Objects. Width relates to x, Lenght relate to y, Height relates to z.
int Object_Width, Object_Lenght, Object_Height;
// The front edge of an object. Have a value in relation to y
int Object_Front_Edge, Object_Elevation;
// Activate animation for objects base on type
bool Animated;
bool Alive_Key;
public:
//(0) This constructor set the values of a few special variables.
Environment_Float_Objects();
Environment_Float_Objects( int x, int y, int z, int object_type );
//Define a square using object type.
void Variable_Setter();
void Variable_Update(Uint32 deltaTicks);
void Soul_Physics(int condition, Uint32 deltaTicks);
//Get the tile type
int Get_Type();
int Get_Object_Type();
int Get_Gravity_Physics();
int Get_Object_Elevation();
int Get_X();
int Get_Y();
int Get_Z();
int Get_Center_Base();
//Get the collision box of squares.
Square Get_Objects();
Square Get_Objects_Base();
bool Get_Alive_Key();
//Display functions only
void Show();
void Show_Base();
void Show_Graphic_Fx_Transparancy();
//
///////
////////////////
//////////////////////////
//////////////////////////////////////
///////////////////////////////////////////////////
//USELESS
///////////////////////////////////////////////////
///////////////////////////////////////
///////////////////////////
////////////////
///////
//
void Game_Start(External_Configuration config){}
void Variable_Setter_Bool_Conditional(int condition, bool condition2){}
void Variable_Setter_Int_Conditional(int condition, int condition2){}
void Variable_Setter_Special_Conditional(int condition, int condition2, bool conditionBool, int conditionInt){}
void Variable_Setter_Ai_Brain_Conditional(int condition, Ai_Brain Copy_Brain) {}
void Teleport_Direct_Input() {}
void Teleport_Force_Input(float condition, int condition2){}
void Build_Font(SDL_Surface *font){}
void Soul_Input(){}
void Soul_Logic(Ai_Brain Copy_Brain, Uint32 deltaTicks){}
void Soul_Health_Condtions(Uint32 deltaTicks){}
void Move_Special_Object(){}
void Command_Slave_Calculation(){}
int Get_Health() {return -1;}
int Get_Gate_Type(){return 0;}
int Get_Object_State() {return 0;}
int Get_Child_Num(){return 0;}
int Get_Slave_Order(){return 0;}
bool Get_Render_Key(){return false;}
bool Get_Animated_Key(){return false;}
bool Get_Active_Animation_Key(){return false;}
Chain_Link Get_Chain_Link(){return Link;}
std::string Get_Text() {return "";}
Square Get_Objects_Children(int condition){return Floating_Objects;}
void Show(int o){}
void Show_On_Screen(){}
void Show_Children(int condition, int condition2){}
void Show_Graphic_Fx_Shadowed(){}
void Show_Graphic_Fx_Drop_Shadow(int coord){}
void Show_Text( int x, int y, std::string text, SDL_Surface *font ){}
};
class Environment_Objects
{
private:
Square Floor_Objects;
Square Floating_Objects, Floating_Objects_Base;
Square Grounded_Objects;
//The tile type
int Type;
//Coordinates of the objects
int Object_Coord_x, Object_Coord_y, Object_Coord_z;
// Collsion detection properties of Objects. Width relates to x, Lenght relate to y, Height relates to z.
int Object_Width, Object_Lenght, Object_Height;
// The front edge of an object. Have a value in relation to y
int Object_Front_Edge, Object_Elevation;
// Activate animation for objects base on type
bool Animated;
enum {SQUARE, CIRCLE, TRIANGLE};
public:
//(0) This constructor set the values of a few special variables.
Environment_Objects();
//(1) The construtor for the base floor objects.Most base floor tiles are squares.
Environment_Objects( int x, int y, int object_type );
//(2) The construtor for floating square objects. Requires many many test. Check logs to see completeion prerequisits.
Environment_Objects( int x, int y, int z, int object_type );
//(3) The construtor for grounded square objects. Bool constructor has no usage. Used so compiler won't confuse consturtors.
Environment_Objects( bool Required, int x, int y, int z, int object_type );
// Use restricted to Constructor 1 until further anylisis. Uses type to give value to height and width.
void Width_Height_Assigner(int type);
//Define a square using object type.
void Square_Assigner(int type , int y);
//Get the tile type
int Get_Type();
int Get_X();
int Get_Y();
int Get_Z();
//Get the collision box of squares.
Square Get_Floor_Objects();
Square Get_Floating_Square_Objects();
Square Get_Floating_Square_Objects_Base();
Square Get_Ground_Square_Objects();
//Display functions only
void Show_Environment_Float_Object(int condition);
void Show_Environment_Float_Base_Object();
void Show_Environment_Ground_Object();
void Show_Environment_Floor_Object();
void Set_Values(int x, int y, int object_type);
};
#endif // ENVIRONMENT_OBJECTS_H_INCLUDED