input.h (377B)
1 enum GameButton 2 { 3 BTN_LEFT, 4 BTN_RIGHT, 5 BTN_UP, 6 BTN_DOWN, 7 BTN_JUMP, 8 BTN_DEBUG_FLOAT, 9 10 NUM_GAME_BUTTONS, 11 NULL_GAME_BUTTON, 12 }; 13 14 // TODO: define static assert without string arg 15 static_assert(NUM_GAME_BUTTONS <= 32, ""); 16 17 struct GameInput 18 { 19 f32 dt; 20 u32 button_states; 21 u32 prev_button_states; 22 u32 button_ups; 23 u32 button_downs; 24 };