PocketEmpires/GameStructures.h

80 lines
1.3 KiB
C

#ifndef __GAME_STRUCTURES__HEADER__
#define __GAME_STRUCTURES__HEADER__
#ifdef __cplusplus
extern "C" {
#endif //__cplusplus
/* *************************************
* Includes
* *************************************/
/* *************************************
* 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 enum t_buildingIds
{
BARRACKS = 0 ,
TOWER ,
}TYPE_BUILDING_ID;
typedef struct t_Building
{
uint16_t x;
uint16_t y;
uint8_t hp;
TYPE_BUILDING_ID 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__