diff --git a/NeutTower.dsk b/NeutTower.dsk index 80b536d..5a7afd5 100644 Binary files a/NeutTower.dsk and b/NeutTower.dsk differ diff --git a/neuttower/player.fnl b/neuttower/player.fnl index 7f7d5ab..ecacc79 100644 --- a/neuttower/player.fnl +++ b/neuttower/player.fnl @@ -3,12 +3,15 @@ (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:case [(string.byte "I") 0xff00] - [(string.byte "J") 0x00ff] - [(string.byte "K") 0x0001] - [(string.byte "M") 0x0100] - [:else 0x0000])) + (vm:ifchain [:dup (string.byte "I") 0x0b :either=] [:drop 0xff00] + [:dup (string.byte "J") 0x08 :either=] [:drop 0x00ff] + [:dup (string.byte "K") 0x15 :either=] [:drop 0x0001] + [:dup (string.byte "M") 0x0a :either=] [:drop 0x0100] + [:drop 0x0000])) (vm:def :yx+ ; yx yx -- yx [:lda vm.TOP :x]