Systems module

Structures

ecs_system_desc_t

Mentioned in

EcsTickSource

Functions

ecs_get_system_binding_ctxGet system binding context
ecs_get_system_ctxGet system context
ecs_runRun a specific system manually
ecs_run_w_filterRun system with offset/limit and type filter
ecs_run_workerSame as ecs_run, but subdivides entities across number of provided stages.
ecs_system_get_queryGet the query object for a system
ecs_system_init

Mentioned in

FlecsSystemImport

Defines

Defines (system.h)

FLECS_SYSTEM_H

ECS_SYSTEM_DEFINE(world,id_,phase,...)
{
ecs_system_desc_t desc = {0};
ecs_entity_desc_t edesc = {0};
edesc.id = ecs_id(id_);
edesc.name = #id_;
edesc.add[0] = ((phase) ? ecs_pair(EcsDependsOn, (phase)) : 0);
edesc.add[1] = (phase);
desc.entity = ecs_entity_init(world, &edesc);
desc.query.filter.expr = #__VA_ARGS__;
desc.callback = id_;
ecs_id(id_) = ecs_system_init(world, &desc);
}
ecs_assert(ecs_id(id_) != 0, ECS_INVALID_PARAMETER, NULL);

Mentioned in:

ECS_SYSTEM(world,id,phase,...)
ecs_entity_t ecs_id(id) = 0; ECS_SYSTEM_DEFINE(world, id, phase, __VA_ARGS__);
ecs_entity_t id = ecs_id(id);
(void)ecs_id(id);
(void)id;

Mentioned in:

ecs_system(world,...)
ecs_system_init(world, &(ecs_system_desc_t) __VA_ARGS__ )