2020-11-27 02:34:05 +00:00
|
|
|
(local util (require :lib.util))
|
|
|
|
(local {: lo : hi : readjson} util)
|
2020-11-27 04:33:14 +00:00
|
|
|
(local tile (util.reload :game.tiles))
|
2020-12-22 04:24:39 +00:00
|
|
|
(local {: prg : vm : org} (util.reload :game.defs))
|
2020-11-27 04:46:36 +00:00
|
|
|
|
2020-11-27 04:33:14 +00:00
|
|
|
(util.reload :game.gfx)
|
2020-11-29 05:44:23 +00:00
|
|
|
(util.reload :game.footer)
|
2020-11-27 04:33:14 +00:00
|
|
|
(util.reload :game.map)
|
|
|
|
(util.reload :game.entity)
|
2020-12-22 04:24:39 +00:00
|
|
|
(util.reload :game.player)
|
2020-11-22 03:50:11 +00:00
|
|
|
|
2020-11-27 04:33:14 +00:00
|
|
|
(tile.appendtiles org.tiles)
|
|
|
|
(tile.appendgfx org.font (tile.loadgfx tile.fn-font))
|
2020-10-15 03:40:01 +00:00
|
|
|
|
2020-12-30 17:48:58 +00:00
|
|
|
(vm:var :tick-count)
|
2020-12-15 04:14:35 +00:00
|
|
|
(vm:word :handle-key :tick :read-key :player-key :hide-footer)
|
2020-12-30 17:48:58 +00:00
|
|
|
(vm:word :tick :map-specific-tick :tick-count :get 1 :+ :tick-count :set :player-redraw)
|
2020-12-15 04:14:35 +00:00
|
|
|
|
2020-12-03 01:08:10 +00:00
|
|
|
(vm:word :load-level
|
|
|
|
:lit :map-jaye-yx :get :jaye-yx :set
|
|
|
|
:lit :map-neut-yx :get :neut-yx :set
|
2020-12-12 01:53:46 +00:00
|
|
|
:lit :map-gord-yx :get :gord-yx :set
|
|
|
|
0 :gord-dir :set
|
2020-12-03 01:08:10 +00:00
|
|
|
0xffff :rexx-yx :set
|
|
|
|
:full-redraw)
|
2020-11-23 00:44:56 +00:00
|
|
|
|
2020-11-27 04:33:14 +00:00
|
|
|
(vm.code:append :main
|
2020-10-06 03:47:25 +00:00
|
|
|
[:jsr :reset]
|
|
|
|
[:jsr :interpret]
|
2020-11-15 02:55:50 +00:00
|
|
|
[:vm :hires
|
2020-12-03 01:08:10 +00:00
|
|
|
:load-level
|
2020-10-15 03:40:01 +00:00
|
|
|
(vm:forever
|
2020-12-03 01:08:10 +00:00
|
|
|
(vm:hotswap-sync :load-level)
|
2020-11-17 20:35:41 +00:00
|
|
|
:interactive-eval-checkpoint
|
2020-11-16 16:27:34 +00:00
|
|
|
:handle-key
|
2020-10-15 03:40:01 +00:00
|
|
|
)
|
2020-10-06 03:47:25 +00:00
|
|
|
:quit])
|
|
|
|
|
2020-12-19 06:07:13 +00:00
|
|
|
(util.reload :game.level6)
|
2020-11-27 04:33:14 +00:00
|
|
|
|
2020-10-06 03:47:25 +00:00
|
|
|
(prg:assemble)
|
2020-11-02 00:39:31 +00:00
|
|
|
|