5#ifdef USE_CONTROLLER_REGISTRY
41#define ENTITY_TYPE_(type, singular, plural, count, upper)
42#define ENTITY_CONTROLLER_TYPE_(type, singular, plural, count, upper, callback) \
43 static void notify_##callback(type *obj);
46#undef ENTITY_CONTROLLER_TYPE_
68#define ENTITY_TYPE_(type, singular, plural, count, upper)
69#define ENTITY_CONTROLLER_TYPE_(type, singular, plural, count, upper, callback) \
70 inline void ControllerRegistry::notify_##callback(type *obj) { \
71 for (auto *controller : controllers) { \
72 controller->on_##callback(obj); \
77#undef ENTITY_CONTROLLER_TYPE_
Global registry for Controllers to receive entity state updates.
static void register_controller(Controller *controller)
Register a controller to receive entity state updates.
static StaticVector< Controller *, CONTROLLER_REGISTRY_MAX > controllers
Minimal static vector - saves memory by avoiding std::vector overhead.
Providing packet encoding functions for exchanging data with a remote host.