package game // all possible game events Event_Type :: enum { Game_Start, Game_Over, Game_Quit, Game_Pause, Game_Resume, Game_Main_Menu, Score_Change, Ball_Collision, } // optional details attached to an event Event :: struct { type: Event_Type, winner_is_player: bool, } // global event storage GLOBAL_EVENTS: [dynamic]Event emit_event :: proc(event: Event) { append(&GLOBAL_EVENTS, event) } flush_events :: proc() { clear(&GLOBAL_EVENTS) }