#include #include #include "game.h" Game game; static inline bool EntityAllocated(const Entity* e) { return (e->flags & ENTITY_ALLOCATED); } void AddEntity(Entity* e) { static int nextId = 0; e->id = nextId++; e->flags |= ENTITY_ALLOCATED; for(int i = 0; i < MAX_ENTITY_COUNT; i++) { if (!EntityAllocated(&game.entities[i])) { game.entities[i] = *e; } } } void InitGame() { game.paused = false; memset(game.entities, 0, sizeof(game.entities)); } void UpdateGame(float deltaTime) { (void)deltaTime; } void DrawGame() { BeginDrawing(); ClearBackground(RAYWHITE); EndDrawing(); }