Support for numpad-movement, diagonal movement

This commit is contained in:
Jaidyn Ann 2023-07-02 09:57:32 -05:00
parent ee4b2e98ef
commit 845c2540a9
3 changed files with 27 additions and 10 deletions

View File

@ -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+
'((#\↑ . )(#\← . )(#\↓ . )(#\→ . )
(append '((#\↑ . )(#\← . )(#\↓ . )(#\→ . )
(#\a . 🆗)(#\z . 🆗)(#\space . 🆗)(#\return . 🆗)
(#\s . )(#\x . )(#\Esc . )))
(#\s . )(#\x . )(#\Esc . ))
+numpad-game-layout+))
(defvar +wasd-game-layout+
'((#\w . )(#\a . )(#\s . )(#\d . )
(append '((#\w . )(#\a . )(#\s . )(#\d . )
(#\j . 🆗)(#\← . 🆗)(#\space . 🆗)(#\return . 🆗)
(#\k . )(#\↓ . )(#\Esc . )))
(#\k . )(#\↓ . )(#\Esc . ))
+numpad-game-layout+))
(defvar +ijkl-game-layout+
'((#\i . )(#\j . )(#\k . )(#\l . )
(append '((#\i . )(#\j . )(#\k . )(#\l . )
(#\a . 🆗)(#\z . 🆗)(#\← . 🆗)(#\space . 🆗)(#\return . 🆗)
(#\s . )(#\x . )(#\↓ . )(#\Esc . )))
(#\s . )(#\x . )(#\↓ . )(#\Esc . ))
+numpad-game-layout+))
(defun read-char-plist (&optional (stream *standard-input*))

View File

@ -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)))

View File

@ -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 :)