summaryrefslogtreecommitdiff
path: root/src/input.rs
diff options
context:
space:
mode:
authorKai Stevenson <kai@kaistevenson.com>2026-08-26 23:54:09 -0700
committerKai Stevenson <kai@kaistevenson.com>2026-08-26 23:54:09 -0700
commita272aa9d9b2c642871abe2dc3379e6ffcce8bf56 (patch)
tree0d9bc97a916e7df97281cc4d81cc0c292540517c /src/input.rs
parent893502300c0206cf629ff4e9ed5b9327743ebd30 (diff)
sprite loader
Diffstat (limited to 'src/input.rs')
-rw-r--r--src/input.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/input.rs b/src/input.rs
index 09a0436..30f3834 100644
--- a/src/input.rs
+++ b/src/input.rs
@@ -23,6 +23,7 @@ pub enum Input {
// game controls?
Grenade,
+ Tnt,
// placeholder actions
Action1,
@@ -33,9 +34,9 @@ pub enum Input {
Action6,
}
-const INPUT_VAR_LEN: usize = 16;
+const INPUT_VAR_LEN: usize = 17;
-const KEYMAP: [(KeyCode, Input); 16] = [
+const KEYMAP: [(KeyCode, Input); INPUT_VAR_LEN] = [
(KeyCode::KeyW, Input::Up),
(KeyCode::KeyA, Input::Left),
(KeyCode::KeyS, Input::Down),
@@ -46,6 +47,7 @@ const KEYMAP: [(KeyCode, Input); 16] = [
(KeyCode::KeyV, Input::ClearEntities),
(KeyCode::KeyP, Input::ClearParticles),
(KeyCode::KeyG, Input::Grenade),
+ (KeyCode::KeyT, Input::Tnt),
(KeyCode::Digit1, Input::Action1),
(KeyCode::Digit2, Input::Action2),
(KeyCode::Digit3, Input::Action3),