From c1efdf9b0875f2a39488a86cd838947a24fab9fc Mon Sep 17 00:00:00 2001 From: quou Date: Tue, 2 May 2023 21:02:04 +1000 Subject: Initial commit. --- input.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 input.h (limited to 'input.h') diff --git a/input.h b/input.h new file mode 100644 index 0000000..ea2bc18 --- /dev/null +++ b/input.h @@ -0,0 +1,24 @@ +#ifndef input_h +#define input_h + +typedef enum { + btn_unknown = 0, + btn_jump, + btn_shoot, + btn_dpad_left, + btn_dpad_right, + btn_dpad_up, + btn_dpad_down, + btn_pause, + btn_edit, + btn_save_level, + btn_count +} Button; + +int button_pressed(Button btn); +int button_just_pressed(Button btn); +int button_just_released(Button btn); + +void reset_input(); + +#endif -- cgit v1.2.3-54-g00ecf