diff --git a/8Bitsy.dsk b/8Bitsy.dsk index 47fa253..4b832d8 100644 Binary files a/8Bitsy.dsk and b/8Bitsy.dsk differ diff --git a/game/player.fnl b/game/player.fnl index 2513560..2225a3d 100644 --- a/game/player.fnl +++ b/game/player.fnl @@ -3,12 +3,15 @@ (local {: walkable} 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] @@ -68,9 +71,7 @@ :swap :itile-at :lookup-flags :&) (vm:word :player-key ; key -- - (vm:ifchain - [:movement-dir :dup] - [:try-move-player :load-next-level] + (vm:ifchain [:movement-dir :dup] [:try-move-player :load-next-level] [:drop])) (vm:word :full-redraw :drawmap :player-redraw) diff --git a/link/mame.fnl b/link/mame.fnl index 01e126b..7aad450 100644 --- a/link/mame.fnl +++ b/link/mame.fnl @@ -23,7 +23,7 @@ (set self.breakpoints {})) (fn Machine.boot [self] (when (not self.pid) - (set self.pid (start-mame :apple2p)))) + (set self.pid (start-mame :apple2e)))) (fn Machine.run [self] (self:boot) (self:connect))