Arrow key support in Neut Tower
This commit is contained in:
parent
897f0bbe55
commit
62ea08aa24
BIN
NeutTower.dsk
BIN
NeutTower.dsk
Binary file not shown.
|
@ -3,12 +3,15 @@
|
||||||
|
|
||||||
(local {: walkable : neutable : debris : sittable} (tile.flag-to-bit))
|
(local {: walkable : neutable : debris : sittable} (tile.flag-to-bit))
|
||||||
|
|
||||||
|
(vm:word :either= ; target val1 val2 -- f
|
||||||
|
:>rot :over := :>rot := :|)
|
||||||
|
|
||||||
(vm:word :movement-dir ; key -- dyx
|
(vm:word :movement-dir ; key -- dyx
|
||||||
(vm:case [(string.byte "I") 0xff00]
|
(vm:ifchain [:dup (string.byte "I") 0x0b :either=] [:drop 0xff00]
|
||||||
[(string.byte "J") 0x00ff]
|
[:dup (string.byte "J") 0x08 :either=] [:drop 0x00ff]
|
||||||
[(string.byte "K") 0x0001]
|
[:dup (string.byte "K") 0x15 :either=] [:drop 0x0001]
|
||||||
[(string.byte "M") 0x0100]
|
[:dup (string.byte "M") 0x0a :either=] [:drop 0x0100]
|
||||||
[:else 0x0000]))
|
[:drop 0x0000]))
|
||||||
|
|
||||||
(vm:def :yx+ ; yx yx -- yx
|
(vm:def :yx+ ; yx yx -- yx
|
||||||
[:lda vm.TOP :x]
|
[:lda vm.TOP :x]
|
||||||
|
|
Loading…
Reference in a new issue