Support for numpad-movement, diagonal movement
This commit is contained in:
parent
ee4b2e98ef
commit
845c2540a9
27
input.lisp
27
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*))
|
||||
|
|
|
@ -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)))
|
||||
|
|
|
@ -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 :✎)
|
||||
|
|
Ŝarĝante…
Reference in New Issue