summaryrefslogtreecommitdiff
path: root/src/input.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/input.rs')
-rw-r--r--src/input.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/input.rs b/src/input.rs
index dd49cd0..7fe6c79 100644
--- a/src/input.rs
+++ b/src/input.rs
@@ -21,6 +21,9 @@ pub enum Input {
ClearEntities,
ClearParticles,
+ // game controls?
+ Grenade,
+
// placeholder actions
Action1,
Action2,
@@ -30,9 +33,9 @@ pub enum Input {
Action6,
}
-const INPUT_VAR_LEN: usize = 17;
+const INPUT_VAR_LEN: usize = 16;
-const KEYMAP: [(KeyCode, Input); 15] = [
+const KEYMAP: [(KeyCode, Input); 16] = [
(KeyCode::KeyW, Input::Up),
(KeyCode::KeyA, Input::Left),
(KeyCode::KeyS, Input::Down),
@@ -42,6 +45,7 @@ const KEYMAP: [(KeyCode, Input); 15] = [
(KeyCode::KeyC, Input::ClearGrid),
(KeyCode::KeyV, Input::ClearEntities),
(KeyCode::KeyP, Input::ClearParticles),
+ (KeyCode::KeyG, Input::Grenade),
(KeyCode::Digit1, Input::Action1),
(KeyCode::Digit2, Input::Action2),
(KeyCode::Digit3, Input::Action3),