From fedba7ff68924ff50022405fc9103a5acf7013fe Mon Sep 17 00:00:00 2001 From: Omniscient Date: Thu, 11 Jul 2024 21:43:06 +1000 Subject: wip --- src/systems/input.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/systems/input.h') diff --git a/src/systems/input.h b/src/systems/input.h index c119016..1ef7940 100644 --- a/src/systems/input.h +++ b/src/systems/input.h @@ -6,7 +6,6 @@ #include "defines.h" #include "keys.h" -struct core; struct GLFWWindow; typedef struct mouse_state { @@ -18,13 +17,13 @@ typedef struct mouse_state { bool left_btn_pressed; } mouse_state; -typedef struct input_state { +typedef struct Input_State { struct GLFWwindow *window; mouse_state mouse; bool depressed_keys[KEYCODE_MAX]; bool just_pressed_keys[KEYCODE_MAX]; bool just_released_keys[KEYCODE_MAX]; -} input_state; +} Input_State; /** @brief `key` is currently being held down */ bool key_is_pressed(keycode key); @@ -36,6 +35,8 @@ bool key_just_pressed(keycode key); bool key_just_released(keycode key); // --- Lifecycle -bool input_system_init(input_state *input, struct GLFWwindow *window); -void input_system_shutdown(input_state *input); -void input_update(input_state *state); \ No newline at end of file + +bool Input_Init(Input_state *input, struct GLFWwindow *window); +void Input_Shutdown(Input_state *input); + +void Input_Update(Input_state *state); // must be run once per main loop -- cgit v1.2.3-70-g09d2