50 const char *module_name);
64 const char *module_name_c);
87 const char *library_name,
88 const char *module_name);
98#define ECS_MODULE_DEFINE(world, id)\
100 ecs_component_desc_t desc = {0};\
101 desc.entity = ecs_id(id);\
102 ecs_id(id) = ecs_module_init(world, #id, &desc);\
103 ecs_set_scope(world, ecs_id(id));\
107#define ECS_MODULE(world, id)\
108 ecs_entity_t ecs_id(id) = 0; ECS_MODULE_DEFINE(world, id)\
119#define ECS_IMPORT(world, id) ecs_import_c(world, id##Import, #id)
FLECS_API ecs_entity_t ecs_import_from_library(ecs_world_t *world, const char *library_name, const char *module_name)
Import a module from a library.
FLECS_API ecs_entity_t ecs_module_init(ecs_world_t *world, const char *c_name, const ecs_component_desc_t *desc)
Register a new module.
FLECS_API ecs_entity_t ecs_import(ecs_world_t *world, ecs_module_action_t module, const char *module_name)
Import a module.
FLECS_API ecs_entity_t ecs_import_c(ecs_world_t *world, ecs_module_action_t module, const char *module_name_c)
Same as ecs_import(), but with name to scope conversion.
ecs_id_t ecs_entity_t
An entity identifier.
struct ecs_world_t ecs_world_t
A world is the container for all ECS data and supporting features.
void(* ecs_module_action_t)(ecs_world_t *world)
Initialization action for modules.
Used with ecs_component_init().