Files
PixelDefense/game/game_state.h
2023-12-17 09:06:14 +01:00

39 lines
762 B
C

#ifndef PIXELDEFENSE_GAME_STATE_H
#define PIXELDEFENSE_GAME_STATE_H
#include <breeze.h>
#include <flecs.h>
typedef struct Game {
Camera2D camera;
BzTileset tileset;
BzTileMap map;
BzSpatialGrid *entityGrid;
f32 frameDuration;
struct {
i64 wood;
i64 iron;
i64 food;
i64 gold;
i64 pop;
} resources;
BzStackAlloc stackAlloc;
struct {
BzObjectPool *pathData;
BzObjectPool *actions;
} 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