diff --git a/input.lisp b/input.lisp index 1abe83b..6a1f7d3 100644 --- a/input.lisp +++ b/input.lisp @@ -31,22 +31,31 @@ #\; #\: #\q #\Q #\j #\J #\k #\K #\x #\X #\b #\B #\m #\M #\w #\W #\v #\V #\z #\Z)) +(defvar +numpad-game-layout+ + '((#\8 . ↑)(#\4 . ←)(#\2 . ↓)(#\6 . →)(#\7 . ↰)(#\9 . ↱)(#\1 . ↲)(#\3 . ↳) + (#\5 . 🆗)(#\return . 🆗) + (#\+ . ❎)(#\0 . ❎))) + + (defvar +arrows-game-layout+ - '((#\↑ . ↑)(#\← . ←)(#\↓ . ↓)(#\→ . →) - (#\a . 🆗)(#\z . 🆗)(#\space . 🆗)(#\return . 🆗) - (#\s . ❎)(#\x . ❎)(#\Esc . ❎))) + (append '((#\↑ . ↑)(#\← . ←)(#\↓ . ↓)(#\→ . →) + (#\a . 🆗)(#\z . 🆗)(#\space . 🆗)(#\return . 🆗) + (#\s . ❎)(#\x . ❎)(#\Esc . ❎)) + +numpad-game-layout+)) (defvar +wasd-game-layout+ - '((#\w . ↑)(#\a . ←)(#\s . ↓)(#\d . →) - (#\j . 🆗)(#\← . 🆗)(#\space . 🆗)(#\return . 🆗) - (#\k . ❎)(#\↓ . ❎)(#\Esc . ❎))) + (append '((#\w . ↑)(#\a . ←)(#\s . ↓)(#\d . →) + (#\j . 🆗)(#\← . 🆗)(#\space . 🆗)(#\return . 🆗) + (#\k . ❎)(#\↓ . ❎)(#\Esc . ❎)) + +numpad-game-layout+)) (defvar +ijkl-game-layout+ - '((#\i . ↑)(#\j . ←)(#\k . ↓)(#\l . →) - (#\a . 🆗)(#\z . 🆗)(#\← . 🆗)(#\space . 🆗)(#\return . 🆗) - (#\s . ❎)(#\x . ❎)(#\↓ . ❎)(#\Esc . ❎))) + (append '((#\i . ↑)(#\j . ←)(#\k . ↓)(#\l . →) + (#\a . 🆗)(#\z . 🆗)(#\← . 🆗)(#\space . 🆗)(#\return . 🆗) + (#\s . ❎)(#\x . ❎)(#\↓ . ❎)(#\Esc . ❎)) + +numpad-game-layout+)) (defun read-char-plist (&optional (stream *standard-input*)) diff --git a/overworld.lisp b/overworld.lisp index b49abde..9888ab7 100644 --- a/overworld.lisp +++ b/overworld.lisp @@ -221,6 +221,14 @@ Returns parameters to be used in the next invocation of OVERWORLD-STATE." (move-player map :Δy -1)) ('⌨:↓ (move-player map :Δy 1)) + ('⌨:↰ + (move-player map :Δx -1 :Δy -1)) + ('⌨:↱ + (move-player map :Δx 1 :Δy -1)) + ('⌨:↲ + (move-player map :Δx -1 :Δy 1)) + ('⌨:↳ + (move-player map :Δx 1 :Δy 1)) (otherwise (list :map map)))) (list :map map))) diff --git a/packages.lisp b/packages.lisp index 852211c..68b2925 100644 --- a/packages.lisp +++ b/packages.lisp @@ -33,7 +33,7 @@ :control :meta :shift +qwerty-layout+ +dvorak-layout+ +arrows-game-layout+ +wasd-game-layout+ +ijkl-game-layout+ - :↑ :← :→ :↓ :🆗 :❎)) + :↑ :← :→ :↓ :↰ :↱ :↲ :↳ :🆗 :❎)) (defpackage :flora-search-aurora.display (:nicknames :fsa.d :display :✎)