Files
PixelDefense/game/game_state.h

41 lines
826 B
C

#ifndef PIXELDEFENSE_GAME_STATE_H
#define PIXELDEFENSE_GAME_STATE_H
#include <breeze.h>
#include <flecs.h>
typedef struct Game {
Camera2D camera;
BzTileset terrainTileset;
BzTileset buildingsTileset;
BzTileset entitiesTileset;
BzTileMap map;
BzSpatialGrid *entityGrid;
f32 frameDuration;
ecs_entity_t entity;
struct {
i64 wood;
i64 iron;
i64 food;
i64 gold;
i64 pop;
} resources;
BzStackAlloc stackAlloc;
struct {
BzObjectPool *pathData;
} pools;
struct {
bool path;
bool entityColliders;
bool mapColliders;
bool spatialGrid;
} debugDraw;
f32 elapsed;
} Game;
extern ecs_world_t *ECS;
extern ECS_COMPONENT_DECLARE(Game); // defined in main.c
#endif //PIXELDEFENSE_GAME_STATE_H