world.h (436B)
1 #pragma once 2 3 #include <stdbool.h> 4 #include "map.h" 5 #include "core/ecs/entity.h" 6 #include "core/ecs/system.h" 7 8 typedef struct World { 9 Map map; 10 Entity *entities; //@todo hashmap instead of array 11 System *systems; 12 int turn; 13 } World; 14 15 World * World_Init(); 16 void World_Add_Entity(World *w, Entity *e); 17 Entity * World_Get_Entity(World *w, int id); 18 void World_Add_System(World *w, System *s); 19 bool World_Run_Systems(World *w);