honeylisp/game/init.fnl

65 lines
1.6 KiB
Plaintext
Raw Normal View History

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
(local disk (util.reload :game.disk))
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)
2021-01-22 03:54:21 +00:00
(util.reload :game.boop)
2021-02-12 02:38:57 +00:00
(util.reload :game.cheat)
2020-11-22 03:50:11 +00:00
(tile.appendtiles org.code)
(org.code:append [:align 0x100] :font)
(tile.appendgfx org.code (tile.loadgfx tile.fn-font))
2021-02-13 19:32:54 +00:00
(tile.append-portraitwords vm {:pneut #[:vm :chuck-mode :get (vm:if [:lit :pchuck] [:lit :pneut])]})
(util.reload :game.level1)
(util.reload :game.level2)
(util.reload :game.level3)
(util.reload :game.level4)
(util.reload :game.level5)
(util.reload :game.level6)
(util.reload :game.bosskey)
(vm:var :tick-count)
2021-02-12 02:38:57 +00:00
(vm:word :handle-key :tick :read-key :dup :cheat-key :player-key :hide-footer)
2021-01-24 16:32:49 +00:00
(vm:word :tick :map-specific-tick :tick-count :get 1 :+ :tick-count :set :player-redraw :rnd :drop)
2020-12-15 04:14:35 +00:00
(vm:var :next-level 0)
(vm:word :load-next-level :next-level :get :dup (vm:if [:load-level 0 :next-level :set] [:drop]))
(vm:word :load-level ; level-ptr --
:lit :map-ptr :set :reload-level)
(vm:word :reload-level
:map-jaye-yx :jaye-yx :set
:map-neut-yx :neut-yx :set
:map-gord-yx :gord-yx :set
2020-12-12 01:53:46 +00:00
0 :gord-dir :set
2020-12-03 01:08:10 +00:00
0xffff :rexx-yx :set
:map-specific-load
2020-12-03 01:08:10 +00:00
:full-redraw)
2020-11-27 04:33:14 +00:00
(vm.code:append :main
[:jsr :reset]
[:jsr :interpret]
[:vm :hires
:lit :level1 :load-level
(vm:forever
(vm:hotswap-sync :lit :level6 :load-level)
2020-11-17 20:35:41 +00:00
:interactive-eval-checkpoint
:handle-key
)
:quit])
(disk.append-boot-loader prg)
(prg:assemble)
(disk.write prg)
2020-11-02 00:39:31 +00:00
prg