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))
|
#\; #\: #\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+
|
(defvar +arrows-game-layout+
|
||||||
'((#\↑ . ↑)(#\← . ←)(#\↓ . ↓)(#\→ . →)
|
(append '((#\↑ . ↑)(#\← . ←)(#\↓ . ↓)(#\→ . →)
|
||||||
(#\a . 🆗)(#\z . 🆗)(#\space . 🆗)(#\return . 🆗)
|
(#\a . 🆗)(#\z . 🆗)(#\space . 🆗)(#\return . 🆗)
|
||||||
(#\s . ❎)(#\x . ❎)(#\Esc . ❎)))
|
(#\s . ❎)(#\x . ❎)(#\Esc . ❎))
|
||||||
|
+numpad-game-layout+))
|
||||||
|
|
||||||
|
|
||||||
(defvar +wasd-game-layout+
|
(defvar +wasd-game-layout+
|
||||||
'((#\w . ↑)(#\a . ←)(#\s . ↓)(#\d . →)
|
(append '((#\w . ↑)(#\a . ←)(#\s . ↓)(#\d . →)
|
||||||
(#\j . 🆗)(#\← . 🆗)(#\space . 🆗)(#\return . 🆗)
|
(#\j . 🆗)(#\← . 🆗)(#\space . 🆗)(#\return . 🆗)
|
||||||
(#\k . ❎)(#\↓ . ❎)(#\Esc . ❎)))
|
(#\k . ❎)(#\↓ . ❎)(#\Esc . ❎))
|
||||||
|
+numpad-game-layout+))
|
||||||
|
|
||||||
|
|
||||||
(defvar +ijkl-game-layout+
|
(defvar +ijkl-game-layout+
|
||||||
'((#\i . ↑)(#\j . ←)(#\k . ↓)(#\l . →)
|
(append '((#\i . ↑)(#\j . ←)(#\k . ↓)(#\l . →)
|
||||||
(#\a . 🆗)(#\z . 🆗)(#\← . 🆗)(#\space . 🆗)(#\return . 🆗)
|
(#\a . 🆗)(#\z . 🆗)(#\← . 🆗)(#\space . 🆗)(#\return . 🆗)
|
||||||
(#\s . ❎)(#\x . ❎)(#\↓ . ❎)(#\Esc . ❎)))
|
(#\s . ❎)(#\x . ❎)(#\↓ . ❎)(#\Esc . ❎))
|
||||||
|
+numpad-game-layout+))
|
||||||
|
|
||||||
|
|
||||||
(defun read-char-plist (&optional (stream *standard-input*))
|
(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 :Δ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
|
(otherwise
|
||||||
(list :map map))))
|
(list :map map))))
|
||||||
(list :map map)))
|
(list :map map)))
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
:control :meta :shift
|
:control :meta :shift
|
||||||
+qwerty-layout+ +dvorak-layout+
|
+qwerty-layout+ +dvorak-layout+
|
||||||
+arrows-game-layout+ +wasd-game-layout+ +ijkl-game-layout+
|
+arrows-game-layout+ +wasd-game-layout+ +ijkl-game-layout+
|
||||||
:↑ :← :→ :↓ :🆗 :❎))
|
:↑ :← :→ :↓ :↰ :↱ :↲ :↳ :🆗 :❎))
|
||||||
|
|
||||||
(defpackage :flora-search-aurora.display
|
(defpackage :flora-search-aurora.display
|
||||||
(:nicknames :fsa.d :display :✎)
|
(:nicknames :fsa.d :display :✎)
|
||||||
|
|
Ŝarĝante…
Reference in New Issue