summaryrefslogtreecommitdiff
path: root/GameStructures.h
blob: 72958a338596192e7a0a681130c69afbd5939d89 (plain) (blame)
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
#ifndef __GAME_STRUCTURES__HEADER__
#define __GAME_STRUCTURES__HEADER__

#ifdef __cplusplus
extern "C" {
#endif //__cplusplus

/* *************************************
 * 	Defines
 * *************************************/

/* *************************************
 * 	Structs and enums
 * *************************************/

typedef struct t_Camera
{
	int16_t X_Offset;
	int16_t Y_Offset;
	int8_t X_Speed;
	int8_t Y_Speed;
	uint8_t Speed_Timer;
}TYPE_CAMERA;

typedef struct t_Building
{
	uint16_t x;
	uint16_t y;
	uint8_t hp;
	uint8_t id;
	bool built;
	bool selected;
}TYPE_BUILDING;

typedef struct t_Unit
{
	uint16_t x;
	uint16_t y;
	uint16_t target_x;
	uint16_t target_y;
	uint8_t hp;
	uint8_t id;
	bool dir;	// False = up-down; true = left-right
	bool mirror; // True = down or left; true = up or right
	bool walking;
	bool alive;
	bool selected;
}TYPE_UNIT;

typedef struct t_CollisionBlock
{
	uint16_t x;
	uint16_t y;
	uint8_t w;
	uint8_t h;
}TYPE_COLLISION_BLOCK;

typedef struct t_Resource
{
	uint8_t Wood;
	uint8_t Gold;
	uint8_t Food;
}TYPE_RESOURCES;

#ifdef __cplusplus
}
#endif //__cplusplus

#endif // __GAME_STRUCTURES__HEADER__