#pragma once #include #include #include #include #include #include "fumotris.h" #include "gametime.h" union func { void (*generic)(void *arg); void (*update)(Time dt); }; struct Event { union func *clbks; size_t len; size_t capacity; }; bool CreateEvent(struct Event *event); bool EventSubscribe(struct Event *event, union func callback); void EventInvoke(struct Event *event, void *arg); void EventInvokeUpdate(struct Event *event, Time dt);