diff options
author | Omniscient <omniscient.oce@gmail.com> | 2024-07-11 21:43:06 +1000 |
---|---|---|
committer | Omniscient <omniscient.oce@gmail.com> | 2024-07-11 21:43:06 +1000 |
commit | fedba7ff68924ff50022405fc9103a5acf7013fe (patch) | |
tree | cd4e8ebd21736d460ac0434ce08cc2012bf613e0 /src/systems/input.h | |
parent | 9f23f65ec631bcd08f200b3ef517da8acf8d6b17 (diff) |
wip
Diffstat (limited to 'src/systems/input.h')
-rw-r--r-- | src/systems/input.h | 13 |
1 files changed, 7 insertions, 6 deletions
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 |