21 lines
470 B
C
21 lines
470 B
C
#ifndef ENTITY_H
|
|
#define ENTITY_H
|
|
|
|
#define MAX_ENTITIES 256U
|
|
|
|
typedef void (*update_cb_t)(unsigned new_entity_id, void *ref);
|
|
typedef void (*remove_cb_t)(void *ref);
|
|
|
|
void entities_clear();
|
|
void entities_purge();
|
|
|
|
unsigned entity_add();
|
|
void entity_mark(unsigned id);
|
|
|
|
unsigned entity_add_component(
|
|
unsigned id, update_cb_t update, remove_cb_t remove, void *ref);
|
|
void entity_update_component(
|
|
unsigned entity_id, unsigned component_id, void *new_ref);
|
|
|
|
#endif
|