9#include "ecs_builtin.h"
19 component_t component_id;
26ECSNET_API
ecs_t* ecs_create();
31ECSNET_API
void ecs_destroy(
ecs_t* ecs);
36ECSNET_API
void ecs_init(
ecs_t *ecs);
43ECSNET_API entity_t ecs_create_entity(
ecs_t *ecs);
50ECSNET_API entity_t ecs_try_create_entity_by_id(
ecs_t* ecs, entity_t
id);
57ECSNET_API
void ecs_destroy_entity(
ecs_t *ecs, entity_t entity);
68ECSNET_API
bool ecs_serialize_entity(
ecs_t *ecs, entity_t entity, uint8_t *out_buffer,
size_t *out_size,
size_t max_out_size);
76ECSNET_API entity_t ecs_deserialize_entity(
ecs_t *ecs,
const uint8_t *in_buffer);
86ECSNET_API
bool ecs_add_component(
ecs_t *ecs, entity_t entity, component_t component,
void *data);
95ECSNET_API
void *ecs_get_component(
ecs_t *ecs, entity_t entity, component_t component);
103ECSNET_API
const char *ecs_get_component_name(
ecs_t *ecs, component_t component);
112ECSNET_API
bool ecs_has_component(
ecs_t *ecs, entity_t entity, component_t component);
121ECSNET_API
bool ecs_is_component_dirty(
ecs_t* ecs, entity_t entity, component_t component);
130ECSNET_API
bool ecs_remove_component(
ecs_t *ecs, entity_t entity, component_t component);
139ECSNET_API
void ecs_mark_component_dirty(
ecs_t *ecs, entity_t entity, component_t component);
145void ecs_set_dirty_hook(
void (*hook)(entity_t));
153ECSNET_API
int ecs_get_dirty_components(
ecs_t *ecs, entity_t entity,
dirty_component_t *out_dirty_components);
161ECSNET_API
void ecs_clear_component_dirty(
ecs_t *ecs, entity_t entity, component_t component);
176ECSNET_API
void ecs_register_system(
ecs_t *ecs, system_func_t func);
183ECSNET_API
void ecs_update(
ecs_t *ecs,
float dt);
187ECSNET_API
extern component_t COMPONENT_POSITION;
188ECSNET_API
extern component_t COMPONENT_ROTATION;
189ECSNET_API
extern component_t COMPONENT_TRANSFORM;
190ECSNET_API
extern component_t COMPONENT_VELOCITY;
197ECSNET_API
void ecs_register_builtin_systems(
ecs_t *ecs);
203ECSNET_API
void ecs_register_builtin_components(
ecs_t *ecs);
Definition ecs_types.h:77
Dirty flag used by the networking layer to sync ECS data. It marks whether an entity's component has ...
Definition ecs.h:18
Internal structure representing the ECS world state. This holds:
Definition ecs_internal.h:44