diff options
| author | Xander Swan <email> | 2025-12-03 09:52:13 -0500 |
|---|---|---|
| committer | Xander Swan <email> | 2025-12-03 09:52:13 -0500 |
| commit | 53cba1d004451f0782312cb203afb7da47a29c5f (patch) | |
| tree | b772324597c52674a626c7137359d34f528b1bd2 /src/input.odin | |
| parent | bb52b5f9c9def80b1e8704acabde6f8c6a34e1a2 (diff) | |
update renderer structure a lil
Diffstat (limited to 'src/input.odin')
| -rw-r--r-- | src/input.odin | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/input.odin b/src/input.odin index 0dad408..6c02349 100644 --- a/src/input.odin +++ b/src/input.odin @@ -14,10 +14,9 @@ Keybind :: struct { } Input :: struct { - move_up: Keybind, move_left: Keybind, - move_down: Keybind, move_right: Keybind, + jump: Keybind, key_down: [sapp.MAX_KEYCODES]bool, key_just_down: [sapp.MAX_KEYCODES]bool, @@ -26,10 +25,9 @@ Input :: struct { } init_keybinds :: proc(input: ^Input) { - input.move_up.input = sapp.Keycode.W input.move_left.input = sapp.Keycode.A - input.move_down.input = sapp.Keycode.S input.move_right.input = sapp.Keycode.D + input.jump.input = sapp.Keycode.SPACE } input_event :: proc(event: ^sapp.Event, input: ^Input) { |
