Refactor into more modular architecture
This commit is contained in:
20
entity.h
Normal file
20
entity.h
Normal file
@@ -0,0 +1,20 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user