From 85537fdb56afa3c7e76d4ed44ba0e71de3f2dc0f Mon Sep 17 00:00:00 2001 From: Jeremy Penner Date: Thu, 10 Dec 2020 09:11:46 -0500 Subject: [PATCH] Level 3 completable! --- editor/mapedit.fnl | 7 +++-- game/defs.fnl | 15 ++++++---- game/entity.fnl | 8 ++++-- game/font.json | 2 +- game/init.fnl | 23 +++++++++++++-- game/level3.fnl | 68 ++++++++++++++++++++++++++++++++++++++++++++- game/map3.json | 2 +- game/portraits.json | 2 +- game/tiles.fnl | 2 +- game/tiles.json | 2 +- 10 files changed, 112 insertions(+), 19 deletions(-) diff --git a/editor/mapedit.fnl b/editor/mapedit.fnl index 42777e7..561d701 100644 --- a/editor/mapedit.fnl +++ b/editor/mapedit.fnl @@ -4,6 +4,7 @@ (local lume (require :lib.lume)) (local {: mouse-inside : activate : active? : checkbox : textfield : textbutton} (util.require :editor.imstate)) (local {: tilestrip-to-sprite} (util.require :editor.tiledraw)) +(local {: encode-yx} (util.require :game.tiles)) (local MapEditView (GraphicsEditView:extend)) (local sprite-scale 3) @@ -112,8 +113,10 @@ (love.graphics.setLineWidth 3) (love.graphics.rectangle :line tilex tiley tilew tileh) (love.graphics.setColor 1 1 1)) - (when (and (mouse-inside tilex tiley tilew tileh) (not= iobject nil)) - (set iobject-over iobject)) + (when (mouse-inside tilex tiley tilew tileh) + (when (not= iobject nil) (set iobject-over iobject)) + (renderer.draw_text style.font (string.format "%x" (encode-yx {:x mx :y my})) tilex (+ tiley 15) style.text) + (love.graphics.setColor 1 1 1)) (when (and self.itile (active? self :map) (mouse-inside tilex tiley tilew tileh) (not= itile self.itile)) (self:set-tile mx my self.itile)) (when (and (= self.itile nil) (active? self :map) (mouse-inside tilex tiley tilew tileh)) diff --git a/game/defs.fnl b/game/defs.fnl index 87db9a2..3b63a13 100644 --- a/game/defs.fnl +++ b/game/defs.fnl @@ -17,18 +17,20 @@ }) (local org { - :tiles (prg:org 0x4100) - :font (prg:org 0x4900) - :map (prg:org 0x4800) - :entity (prg:org 0x4b00) - :code vm.code + :tiles (prg:org 0x4100) + :font (prg:org 0x4900) + :map (prg:org 0x4800) + :entity (prg:org 0x4b00) + :levelcode (prg:org 0x4c00) + :code vm.code }) (local controlstate { :jaye 0 :neut 1 :rexx 2 - :count 3 + :gord 3 + :count 4 }) (fn achar [c] (bit.bor (string.byte c) 0x80)) @@ -95,6 +97,7 @@ (local entity (require :game.entity)) (tile.append-map map map-org) (entity.append-from-map map entity-org) + (set level.vm.code (level:org org.levelcode.org)) level) (fn say [portrait ...] diff --git a/game/entity.fnl b/game/entity.fnl index db98bd7..fe4993f 100644 --- a/game/entity.fnl +++ b/game/entity.fnl @@ -21,6 +21,7 @@ :act 2 :deact 3 :tog 4 + :noop 5 }) (vm:word :entity-count :lit :map-entity-count :bget) @@ -77,7 +78,8 @@ (vm:word :move-to-responder :get-responder :get :move-player-to) (vm:word :switch ; ev -- - :dup ev.touch := (vm:when :drop ev.tog :is-neut? (vm:when :move-to-responder)) + (vm:if-and [[:is-rexx? :not] [:dup ev.touch :=]] + [:drop ev.tog :is-neut? (vm:when :move-to-responder)]) :dup (itile :switchoff) (itile :switchon) :handle-onoff (itile :switchon) :activate-link) @@ -105,11 +107,11 @@ (vm:word :rexx ; ev -- ev.touch := (vm:when - (vm:if-and [[:is-neut?] [:responder-itile (itile :t-rexx)]] + (vm:if-and [[:is-neut?] [:responder-itile (itile :t-rexx) :=]] [0xffff :move-player-to (itile :t-rexxstop) :set-respondertile :get-responder :set-rexx] - [(vm:if-and [[:is-rexx?] [:responder-itile (itile :t-rexxstop)]] + [(vm:if-and [[:is-rexx?] [:responder-itile (itile :t-rexxstop) :=]] [0xffff :move-player-to (itile :t-rexx) :set-respondertile 0 :set-rexx :move-to-responder])]))) diff --git a/game/font.json b/game/font.json index 2367a61..408fe68 100644 --- a/game/font.json +++ b/game/font.json @@ -1 +1 @@ -[{"flags":[],"gfx":"8080808080808080"},{"flags":[],"gfx":"8C8C8C8C88808C80"},{"flags":[],"gfx":"B3B3928080808080"},{"flags":[],"gfx":"B6FFB6B6B6FFB680"},{"flags":[],"gfx":"8CBE839EB09F8C80"},{"flags":[],"gfx":"80A3938884B2B180"},{"flags":[],"gfx":"8E9B9BCEBBB3EE80"},{"flags":[],"gfx":"8C8C888080808080"},{"flags":[],"gfx":"988C8C8C8C8C9880"},{"flags":[],"gfx":"8C98989898988C80"},{"flags":[],"gfx":"8CAD9E8C9EAD8C80"},{"flags":[],"gfx":"808C8CBF8C8C8080"},{"flags":[],"gfx":"808080808C8C8880"},{"flags":[],"gfx":"8080809C80808080"},{"flags":[],"gfx":"80808080808C8C80"},{"flags":[],"gfx":"80A0B0988C868280"},{"flags":[],"gfx":"9CB6B6BEB6B69C80"},{"flags":[],"gfx":"989C989898989880"},{"flags":[],"gfx":"9CB6B0988C86BE80"},{"flags":[],"gfx":"9CB6B098B0B69C80"},{"flags":[],"gfx":"9C9E9B9BBF989880"},{"flags":[],"gfx":"BE86869EB0B09E80"},{"flags":[],"gfx":"9C86869EB6B69C80"},{"flags":[],"gfx":"BEB0B0988C8C8C80"},{"flags":[],"gfx":"9CB6B69CB6B69C80"},{"flags":[],"gfx":"9CB6B6BCB0B09C80"},{"flags":[],"gfx":"808C8C808C8C8080"},{"flags":[],"gfx":"808C8C808C8C8880"},{"flags":[],"gfx":"B0988C868C98B080"},{"flags":[],"gfx":"8080BE80BE808080"},{"flags":[],"gfx":"868C98B0988C8680"},{"flags":[],"gfx":"9CB6B0988C808C80"},{"flags":[],"gfx":"9EB3B3BBBB839E80"},{"flags":[],"gfx":"9CB6B6B6BEB6B680"},{"flags":[],"gfx":"9EB6B69EB6B69E80"},{"flags":[],"gfx":"9CB6868686B69C80"},{"flags":[],"gfx":"9EB6B6B6B6B69E80"},{"flags":[],"gfx":"BE86869E8686BE80"},{"flags":[],"gfx":"BE86869E86868680"},{"flags":[],"gfx":"9EB383BBB3B39E80"},{"flags":[],"gfx":"B6B6B6BEB6B6B680"},{"flags":[],"gfx":"8C8C8C8C8C8C8C80"},{"flags":[],"gfx":"B0B0B0B0B6BE9C80"},{"flags":[],"gfx":"B6B69E9EB6B6B680"},{"flags":[],"gfx":"868686868686BE80"},{"flags":[],"gfx":"92BFBFBFB3B3B380"},{"flags":[],"gfx":"9EB6B6B6B6B6B680"},{"flags":[],"gfx":"9CB6B6B6B6B69C80"},{"flags":[],"gfx":"9EB6B69E86868680"},{"flags":[],"gfx":"9CB6B6B6BEB6BC80"},{"flags":[],"gfx":"9EB6B69EB6B6B680"},{"flags":[],"gfx":"9CB6869CB0B69C80"},{"flags":[],"gfx":"BFBF8C8C8C8C8C80"},{"flags":[],"gfx":"B6B6B6B6B6B69C80"},{"flags":[],"gfx":"B6B6B69C9C9C8880"},{"flags":[],"gfx":"B3B3B3BFBFBF9280"},{"flags":[],"gfx":"B6B6B69CB6B6B680"},{"flags":[],"gfx":"B6B6B6BCB0B09C80"},{"flags":[],"gfx":"BEBEB0988CBEBE80"},{"flags":[],"gfx":"9C8C8C8C8C8C9C80"},{"flags":[],"gfx":"8082868C98B0A080"},{"flags":[],"gfx":"9C98989898989C80"},{"flags":[],"gfx":"8894808080808080"},{"flags":[],"gfx":"808080808080BE80"}] \ No newline at end of file +[{"flags":[],"gfx":"8080808080808080"},{"flags":[],"gfx":"8C8C8C8C88808C80"},{"flags":[],"gfx":"B3B3928080808080"},{"flags":[],"gfx":"B6FFB6B6B6FFB680"},{"flags":[],"gfx":"8CBE839EB09F8C80"},{"flags":[],"gfx":"80A3938884B2B180"},{"flags":[],"gfx":"8E9B9BCEBBB3EE80"},{"flags":[],"gfx":"8C8C888080808080"},{"flags":[],"gfx":"988C8C8C8C8C9880"},{"flags":[],"gfx":"8C98989898988C80"},{"flags":[],"gfx":"8CAD9E8C9EAD8C80"},{"flags":[],"gfx":"808C8CBF8C8C8080"},{"flags":[],"gfx":"808080808C8C8880"},{"flags":[],"gfx":"8080809C80808080"},{"flags":[],"gfx":"80808080808C8C80"},{"flags":[],"gfx":"80A0B0988C868280"},{"flags":[],"gfx":"9CB6B6BEB6B69C80"},{"flags":[],"gfx":"989C989898989880"},{"flags":[],"gfx":"9CB6B0988C86BE80"},{"flags":[],"gfx":"9CB6B098B0B69C80"},{"flags":[],"gfx":"9C9E9B9BBF989880"},{"flags":[],"gfx":"BE86869EB0B09E80"},{"flags":[],"gfx":"9C86869EB6B69C80"},{"flags":[],"gfx":"BEB0B0988C8C8C80"},{"flags":[],"gfx":"9CB6B69CB6B69C80"},{"flags":[],"gfx":"9CB6B6BCB0B09C80"},{"flags":[],"gfx":"808C8C808C8C8080"},{"flags":[],"gfx":"808C8C808C8C8880"},{"flags":[],"gfx":"B0988C868C98B080"},{"flags":[],"gfx":"8080BE80BE808080"},{"flags":[],"gfx":"868C98B0988C8680"},{"flags":[],"gfx":"9CB6B0988C808C80"},{"flags":[],"gfx":"9EB3B3BBBB839E80"},{"flags":[],"gfx":"9CB6B6B6BEB6B680"},{"flags":[],"gfx":"9EB6B69EB6B69E80"},{"flags":[],"gfx":"9CB6868686B69C80"},{"flags":[],"gfx":"9EB6B6B6B6B69E80"},{"flags":[],"gfx":"BE86869E8686BE80"},{"flags":[],"gfx":"BE86869E86868680"},{"flags":[],"gfx":"9EB383BBB3B39E80"},{"flags":[],"gfx":"B6B6B6BEB6B6B680"},{"flags":[],"gfx":"8C8C8C8C8C8C8C80"},{"flags":[],"gfx":"B0B0B0B0B6BE9C80"},{"flags":[],"gfx":"B6B69E9EB6B6B680"},{"flags":[],"gfx":"868686868686BE80"},{"flags":[],"gfx":"92BFBFBFB3B3B380"},{"flags":[],"gfx":"9EB6B6B6B6B6B680"},{"flags":[],"gfx":"9CB6B6B6B6B69C80"},{"flags":[],"gfx":"9EB6B69E86868680"},{"flags":[],"gfx":"9CB6B6B6BEB6BC80"},{"flags":[],"gfx":"9EB6B69EB6B6B680"},{"flags":[],"gfx":"9CB6869CB0B69C80"},{"flags":[],"gfx":"BFBF8C8C8C8C8C80"},{"flags":[],"gfx":"B6B6B6B6B6B69C80"},{"flags":[],"gfx":"B6B6B69C9C9C8880"},{"flags":[],"gfx":"B3B3B3BFBFBF9280"},{"flags":[],"gfx":"B6B6B69CB6B6B680"},{"flags":[],"gfx":"B6B6B6BCB0B09C80"},{"flags":[],"gfx":"BEBEB0988CBEBE80"},{"flags":[],"gfx":"BC8C8C8C8C8CBC80"},{"flags":[],"gfx":"8082868C98B0A080"},{"flags":[],"gfx":"9E98989898989E80"},{"flags":[],"gfx":"8894808080808080"},{"flags":[],"gfx":"808080808080BE80"}] \ No newline at end of file diff --git a/game/init.fnl b/game/init.fnl index 37d8eb2..22ca988 100644 --- a/game/init.fnl +++ b/game/init.fnl @@ -31,6 +31,8 @@ (vm:var :jaye-dir 0xff00) (vm:var :neut-yx 0x0b08) (vm:var :rexx-yx 0xffff) +(vm:var :gord-yx 0xffff) +(vm:var :gord-dir 0x0000) (vm:var :controlstate [:db controlstate.jaye]) (vm:word :is-jaye? :controlstate :bget controlstate.jaye :=) @@ -39,6 +41,7 @@ (vm:word :is-prog? :is-neut? :is-rexx? :|) (vm:word :neut-hidden? :neut-yx :get 0xffff :=) (vm:word :rexx-active? :rexx-yx :get 0xffff := :not) +(vm:word :gord-hidden? :gord-yx :get 0xffff :=) (vm:word :set-rexx ; e -- :dup (vm:if [:get controlstate.rexx] [:drop 0xffff controlstate.neut]) @@ -48,12 +51,14 @@ :controlstate :bget (vm:case [controlstate.jaye :jaye-tile] [controlstate.neut :neut-tile] + [controlstate.gord :gord-tile] [:else :lit :t-rexx])) (vm:word :player-yx ; -- pyx :controlstate :bget (vm:case [controlstate.jaye :jaye-yx] [controlstate.neut :neut-yx] + [controlstate.gord :gord-yx] [:else :rexx-yx])) (vm:word :draw-player ; -- @@ -69,7 +74,7 @@ :player-yx :dup :get :dup 0xffff := (vm:if [:drop] [:drawtile-at]) :set :draw-player) -(vm:word :handle-special-move ; yx -- +(vm:word :handle-special-move ; yx -- f (vm:if-and [[:is-rexx?] [:dup debris :flag-at?]] [(itile :t-floor) :update-itile vm.false] [:drop vm.false])) @@ -90,6 +95,13 @@ [0x00ff :lit :jaye-w] [:else :lit :jaye-e])) +(vm:word :gord-tile ; ptile + :gord-dir :get + (vm:case [0xff00 :lit :gord-n] + [0x0100 :lit :gord-s] + [0x00ff :lit :gord-w] + [:else :lit :gord-e])) + (vm:word :neut-tile :lit :neut1) ; todo: animate (vm:word :flag-at? ; yx flag -- f @@ -101,13 +113,20 @@ [:neut-hidden?] [controlstate.jaye] [controlstate.neut]) :controlstate :bset) +(vm:word :party-follow + (vm:if-and [[:gord-hidden? :not] [:is-jaye?]] + [controlstate.gord :controlstate :bset + :gord-yx :get :gord-dir :get :yx+ :move-player-to + :jaye-dir :get :gord-dir :set + controlstate.jaye :controlstate :bset])) + (vm:word :player-key ; key -- (vm:ifchain [:dup (string.byte " ") :=] [:drop :toggle-player] [:movement-dir :dup] [:player-yx :get :swap ; oldyx dir :try-move-player - :dup :player-yx :get := :not (vm:if [:untouch-entity] [:drop])] + :dup :player-yx :get := :not (vm:if [:party-follow :untouch-entity] [:drop])] [:drop])) (vm:word :full-redraw :drawmap :player-redraw) diff --git a/game/level3.fnl b/game/level3.fnl index c0686e0..3cfbdc1 100644 --- a/game/level3.fnl +++ b/game/level3.fnl @@ -1,6 +1,72 @@ -(local {: deflevel : say : itile} (require :game.defs)) +(local {: deflevel : say : itile : controlstate} (require :game.defs)) (local {: ev} (require :game.entity)) (local level (deflevel "game/map3.json")) +(local tile (require :game.tiles)) +(local {: walkable : neutable : debris} tile.flag-to-bit) + (local vm level.vm) +(vm:var :gord-introduced vm.false) +(vm:word :flicker :get-responder ev.tog :entity>do 0x400 :snooze) +(vm:word :gordterm ; ev -- + (vm:if-and [[:is-neut?] [:dup ev.touch :=] [:gord-introduced :get :not]] + [vm.true :gord-introduced :set + (say :neut "HUMAN PRESENCE" "DETECTED") + :flicker :flicker :flicker :flicker + (say :neut "]HUMAN ASSISTANCE IS REQUIRED") + (say :neut "]IF HUMAN IS PRESENT" " PLEASE RESPOND") + :hide-footer + :flicker :flicker :flicker :flicker + (say :gord "WHAT THE...") + (say :gord "IS SOMEONE IN THE TERMINAL?") + (say :gord "]HUMAN IS PRESENT") + (say :neut "]GREETINGS, HUMAN") + (say :neut "]THIS IS NEUT V0.71.4RC12") + (say :neut "]PLEASE STATE NAME AND" " STATUS") + (say :gord "]THIS IS GORD") + (say :gord "V1, I GUESS.") + (say :gord "]LEG IS PINNED UNDER DESK" " UNABLE TO MOVE") + (say :neut "]CAN YOU REACH THE SWITCH" " BEHIND YOU?") + 0x400 :snooze :lit :gordswitch ev.act :entity>do 0x400 :snooze + (say :gord "]I TURNED IT ON") + (say :neut "]MY PROGRAMMER THANKS" " YOU, GORD") + (say :neut "]WE WILL ASSIST YOU SOON") + (say :gord "]AWAITING YOUR HELP, NEUT") + :drop ev.noop]) + :term) + +(vm:var :rexx-introduced) +(vm:word :meetrexx ; ev -- + (vm:if-and [[:is-neut?] [:dup ev.touch :=] [:rexx-introduced :get :not]] + [vm.true :rexx-introduced :set + (say :neut "MOBILE ROBOTIC UNIT" "IDENTIFY YOURSELF") + (say :rexx "HIYA BOSS!" "I'M REXX, THE JANITOR!") + (say :rexx "AAAAAND YOUR NEW" "BEST FRIEND!!") + (say :neut "A HUMAN IS IN PERIL") + (say :neut "YOUR ASSISTANCE IS" "REQUIRED") + (say :rexx "YOU NEED ME TO TAKE OUT" "SOME GARBAGE??") + (say :rexx "OH BOY!! LET ME AT IT!")]) + :rexx) + +(vm:word :floor-clear? 0x406 walkable :flag-at?) +(vm:word :meetgord ; ev -- + (vm:if-and [[ev.touch :=] [(itile :gord-ground) :responder-itile :=]] + [:is-rexx? (vm:when + (say :gord "AHHH NOOO" "NOT GARBAGE" "I AM NOT GARBAGE") + (say :rexx "WHATEVER YOU SAY, BOSS!")) + :is-jaye? (vm:when + (say :jaye "ARE YOU HURT?") + (say :gord "MY LEG WAS PINNED." "I DON'T THINK I CAN PUT" "ANY WEIGHT ON IT.") + (say :jaye "HERE, LET ME HELP YOU UP.") + (itile :t-floor) :set-respondertile + 0xff00 :gord-dir :set + controlstate.gord :controlstate :bset + :get-responder :get :move-player-to + controlstate.jaye :controlstate :bset + (say :gord "THANKS.") + (say :jaye "DON'T MENTION IT.") + (say :jaye "I CAN HELP YOU GET AROUND IF" "YOU HELP ME NAVIGATE THIS" "MAZE OF A SECURITY SYSTEM.") + (say :gord "I'M JUST AS EAGER TO GET" "OUT OF HERE AS YOU.") + (say :gord "LET'S GO."))])) + level diff --git a/game/map3.json b/game/map3.json index 88d1889..e432c9d 100644 --- a/game/map3.json +++ b/game/map3.json @@ -1 +1 @@ -{"jaye":{"y":11,"x":9},"objects":[{"x":1,"func":"scan","y":5,"name":"","linkword":"","link":2},{"x":1,"func":"door","y":4,"name":"","linkword":""},{"x":7,"func":"term","y":6,"name":"","linkword":"","link":4},{"x":14,"func":"term","y":11,"name":"","linkword":"","link":7},{"x":9,"func":"switch","y":6,"name":"","linkword":"","link":6},{"x":11,"func":"door","y":9,"name":"","linkword":""},{"x":10,"func":"term","y":3,"name":"","linkword":"","link":3},{"x":11,"func":"scan","y":10,"name":"","linkword":"","link":9},{"x":14,"func":"door","y":7,"name":"","linkword":""},{"x":7,"func":"rexx","linkword":"","name":"","y":3}],"neut":{"y":12,"x":8},"map":"616161616161616181616161616161616161612161C063C0C0C0C0C0C0C06143C0E0C2C0C043022161C0C0C0C0C0C0C0C0C022C0C0C0C0C0C0C0612161C0C0C2C0C0C0C0C0C081C0C0C0C0C0C0C0612161C08282A2C0C0C0C0436123C0C0C0C0C0030221616161616161616261616161618161616161612161C063C0C02301C0C163C0C0C0C0C0822363022122C0C0C0C0C0C0A2A1C0C0C0C0C0C0C2C0C0612181C0C0C0C0E2C0C061C0C0C0C0C0C0C0C2C061216123C0C0C0C083C061E0C2C0C0C0C0438203022161610261610261616161026161026161026161212121212121212121212121212121212121212121"} \ No newline at end of file +{"jaye":{"y":11,"x":9},"objects":[{"x":1,"func":"scan","y":5,"name":"","linkword":"","link":2},{"x":1,"func":"door","y":4,"name":"","linkword":""},{"x":7,"func":"gordterm","y":6,"name":"","linkword":"","link":4},{"x":14,"func":"term","y":11,"name":"","linkword":"","link":7},{"x":9,"func":"switch","y":6,"name":"gordswitch","linkword":"","link":6},{"x":11,"func":"door","y":9,"name":"","linkword":""},{"x":10,"func":"term","y":3,"name":"","linkword":"","link":3},{"x":11,"func":"scan","y":10,"name":"","linkword":"","link":9},{"x":14,"func":"door","y":7,"name":"","linkword":""},{"x":7,"func":"meetrexx","linkword":"","name":"","y":3},{"x":8,"func":"meetgord","linkword":"","name":"","y":6}],"neut":{"y":12,"x":8},"map":"616161616161616181616161616161616161612161C063C0C0C0C0C0C0C06143C0E0C2C0C043022161C0C0C0C0C0C0C0C0C022C0C0C0C0C0C0C0612161C0C0C2C0C0C0C0C0C081C0C0C0C0C0C0C0612161C08282A2C0C0C0C0436123C0C0C0C0C0030221616161616161616261616161618161616161612161C063C0C02301C3C163C0C0C0C0C0822363022122C0C0C0C0C0C0A2A1C0C0C0C0C0C0C2C0C0612181C0C0C0C0E2C0C061C0C0C0C0C0C0C0C2C061216123C0C0C0C083C061E0C2C0C0C0C0438203022161610261610261616161026161026161026161212121212121212121212121212121212121212121"} \ No newline at end of file diff --git a/game/portraits.json b/game/portraits.json index 520f20d..b90a6ca 100644 --- a/game/portraits.json +++ b/game/portraits.json @@ -1 +1 @@ -[{"gfx":"8080808080E0E0F0F8FC2CBCACACACAC80809CFEFFFFFFD7D5D5555D4F5DD5D5BCB8B8B8F8F8F8F8FCFCFEFE86D0D0D495D5D5E5D5D5D5D7C797D7D0AAAAAAAA808086BFFFFFFFFAEAAA2A2E3C2EAAAA80808080808183878787058F8D8D8D8FAAAAAAA7AAAAEAEAE2E8EA8AD5D5D5D58F8F8787878F8F8F9F9FBFBE808A8AAA","label":"pjaye","flags":[]},{"gfx":"00002020000000004808080800202028004040011404450144010805445420352020000808084800000000202000000020544405080144014504140140400000000202012921220122011021222A052D00000405000001011211101100040415052A222110012201222129010202000004040011101112010100000504000000","label":"pneut","flags":[]}] \ No newline at end of file +[{"gfx":"8080808080E0E0F0F8FC2CBCACACACAC80809CFEFFFFFFD7D5D5555D4F5DD5D5BCB8B8B8F8F8F8F8FCFCFEFE86D0D0D495D5D5E5D5D5D5D7C797D7D0AAAAAAAA808086BFFFFFFFFAEAAA2A2E3C2EAAAA80808080808183878787058F8D8D8D8FAAAAAAA7AAAAEAEAE2E8EA8AD5D5D5D58F8F8787878F8F8F9F9FBFBE808A8AAA","label":"pjaye","flags":[]},{"gfx":"00002020000000004808080800202028004040011404450144010805445420352020000808084800000000202000000020544405080144014504140140400000000202012921220122011021222A052D00000405000001011211101100040415052A222110012201222129010202000004040011101112010100000504000000","label":"pneut","flags":[]},{"gfx":"80C090808484848484848484A8A8A8A8AA8080808080D4D4D5D5F59DFDD5D5D5A8A08080808080808080808080E0F8FC95D5D5D5F595D5D4D084D4D4D4D7FFFFD58080808080AAAAAAAABAE2FAAAAAA280828880A0A0A0A1A1A1A1A195959595A0AAAAAAAFA8AAAA8AA0AAAAAAEAFFFF95858181818181808080808080879FBF","label":"pgord","flags":[]},{"gfx":"808080808080C0C0C0C0C0C0C0C0C0C0808080808080AAAAFAFAFAAAAAAAAAAA8080808080C0D0D0D0D0D0D0D0D0D0D0A0A0A0A0A0AAAAAAA8A8A8A8A8A8A8A8808080808080D5D5DFDFDFD5D5D5D5D5808080808080828282828282828282828585858585D5D5D595959595959595958080808080828A8A8A8A8A8A8A8A8A8A","label":"prexx","flags":[]}] \ No newline at end of file diff --git a/game/tiles.fnl b/game/tiles.fnl index 5c03642..510f7da 100644 --- a/game/tiles.fnl +++ b/game/tiles.fnl @@ -55,5 +55,5 @@ (find-itile tiles label (+ itile 1)))) {: loadgfx : savegfx : appendtiles : appendgfx : append-map : flags : flag-to-bit : find-itile - : fn-tiles : fn-portraits : fn-font} + : fn-tiles : fn-portraits : fn-font : encode-yx} diff --git a/game/tiles.json b/game/tiles.json index 2da4496..7ad28c0 100644 --- a/game/tiles.json +++ b/game/tiles.json @@ -1 +1 @@ -[{"gfx":"7F7F1F03090923436943230909031F7F7F7F784111104542174245101141787F","word":"","label":"neut1","flags":[]},{"gfx":"7F1F03090923436943230909031F7F7F7F784111104542174245101141787F7F","word":"","label":"neut2","flags":[]},{"gfx":"808080C0C0C0E0C0D0C8C04040404080808083058585828A9282820A08081980","word":"","label":"jaye-e","flags":[]},{"gfx":"8080C020A0A0C0C0D0C8C0501010188080808183838782828A8A920202020380","word":"","label":"jaye-w","flags":[]},{"gfx":"8080E030B0B098C0D0D0C840404060808080870D8D8D99828A8A920202020780","word":"","label":"jaye-s","flags":[]},{"gfx":"8080C0E0E0E0B0C0D0C8C040404060808080838787878D828A92820202020780","word":"","label":"jaye-n","flags":[]},{"gfx":"80808C8080808080B08080808C808080808C80808083B0808080808080868080","word":"","label":"t-floor","flags":{"walkable":true}},{"gfx":"007C0C0C0C0C7C007C7E7EAA88888800001F181818181F001F0F979584848400","word":"term","label":"termoff","flags":[]},{"gfx":"007C2C0C0C2C7C007C7E7EAA88888800001F18191C191F001F0F979584848400","word":"term","label":"termon","flags":{"neutable":true}},{"gfx":"D5D5D5D5D5D5D5D5D5D5D5D5D5D5D5D5AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","word":"","label":"","flags":[]},{"gfx":"D5D5D5D5D5F5F5FDDDD5D5D5D5D5D5D5AAAAAAAAAEAEBFBFBFABAAAAAAAAAAAA","word":"","label":"","flags":[]},{"gfx":"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF","word":"","label":"","flags":{"neutable":true}},{"gfx":"FF8FA7B3B3B3B3B3B3B3B3B3B3B383FFFFF8F2E6E6E6E6E6E6E6E6E6E6E6E0FF","word":"door","label":"doorclosed","flags":[]},{"gfx":"FF8F87838383838383838383838383FFFFF8F0E0E0E0E0E0E0E0E0E0E0E0E0FF","word":"door","label":"dooropen","flags":{"walkable":true}},{"gfx":"FFFFCFCFCFCF898183838787878FFFFFFFFCE4E4E4E4E0E0E0E0E0E0F0F8FFFF","word":"switch","label":"switchoff","flags":{"neutable":true}},{"gfx":"FFFFCFCFCFCF898123232727878FFFFFFFFCE4E4E4E0E0616565656571F8FFFF","word":"switch","label":"switchon","flags":{"neutable":true}},{"gfx":"FFFF83D3D3D3D3D3D3D3D3D3D383FFFFFFFFC0CACACECACBCACACACACAC0FFFF","word":"","label":"","flags":[]},{"gfx":"FFFFAFEBFBFBFBBBBBFBFBFBEBAFFFFFFFFFF5D7DFDFDFDDDDDFDFDFD7F5FFFF","word":"scan","label":"scanoff","flags":{"neutable":true}},{"gfx":"FFFF2F2B2B2B6B6B6B6B2B2B2B2FFFFFFFFF755555555757575755555575FFFF","word":"scan","label":"scanon","flags":{"neutable":true}},{"gfx":"FFF3C78FBFFCF98187BFFFFFBF9F9FC7FFCFE1F1FCFCF8FEFEFCF9F0E6CE8F9F","word":"","label":"","flags":[]},{"gfx":"80808C80808080A8AAAAAAA888888880808C8080808380859595958584848480","word":"","label":"","flags":[]},{"gfx":"80808C8080A0A0A8AAAA8AA0A8808080808C8081919090848594959585858080","word":"","label":"","flags":{"debris":true}},{"gfx":"00005054545450404054545010383800000C0A2A2A2A0A03032A2A0A081C1C00","word":"","label":"","flags":[]},{"gfx":"0000001C1C10545040606010545454000030070702020A0A0100020A080A0200","word":"","label":"","flags":{"debris":true}},{"gfx":"80A0A8AA92D2D2AAC2C2AA92D2AA808080959595949494959494959494858080","word":"","label":"","flags":[]},{"gfx":"80808C808080A8C292AAAAAAAA8AC0D0808C80808083959290959194948580A8","word":"","label":"","flags":{"debris":true}},{"gfx":"80806008282A0800202880A8A8A8A08080980000141501051511819595958580","word":"","label":"","flags":[]},{"gfx":"80808C808080A0A8AAAA8AA2AAAAAA80808C0000000330010105051511010514","word":"","label":"","flags":{"debris":true}},{"gfx":"80D0D0D0C0D4C4C4CECAC0E0A0808080808A8B8A82AAA2A2F2D2828785808080","word":"rexx","label":"t-rexx","flags":[]},{"gfx":"F8989898BE8686868686BEB098F880809F989898FCE0E0E0E0E0FC8C989F8080","word":"","label":"t-rexxstop","flags":[]}] \ No newline at end of file +[{"gfx":"7F7F1F03090923436943230909031F7F7F7F784111104542174245101141787F","word":"","label":"neut1","flags":[]},{"gfx":"7F1F03090923436943230909031F7F7F7F784111104542174245101141787F7F","word":"","label":"neut2","flags":[]},{"gfx":"808080C0C0C0E0C0D0C8C04040404080808083058585828A9282820A08081980","word":"","label":"jaye-e","flags":[]},{"gfx":"8080C020A0A0C0C0D0C8C0501010188080808183838782828A8A920202020380","word":"","label":"jaye-w","flags":[]},{"gfx":"8080E030B0B098C0D0D0C840404060808080870D8D8D99828A8A920202020780","word":"","label":"jaye-s","flags":[]},{"gfx":"8080C0E0E0E0B0C0D0C8C040404060808080838787878D828A92820202020780","word":"","label":"jaye-n","flags":[]},{"gfx":"80808C8080808080B08080808C808080808C80808083B0808080808080868080","word":"","label":"t-floor","flags":{"walkable":true}},{"gfx":"007C0C0C0C0C7C007C7E7EAA88888800001F181818181F001F0F979584848400","word":"term","label":"termoff","flags":[]},{"gfx":"007C2C0C0C2C7C007C7E7EAA88888800001F18191C191F001F0F979584848400","word":"term","label":"termon","flags":{"neutable":true}},{"gfx":"D5D5D5D5D5D5D5D5D5D5D5D5D5D5D5D5AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","word":"","label":"","flags":[]},{"gfx":"D5D5D5D5D5F5F5FDDDD5D5D5D5D5D5D5AAAAAAAAAEAEBFBFBFABAAAAAAAAAAAA","word":"","label":"","flags":[]},{"gfx":"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF","word":"","label":"","flags":{"neutable":true}},{"gfx":"FF8FA7B3B3B3B3B3B3B3B3B3B3B383FFFFF8F2E6E6E6E6E6E6E6E6E6E6E6E0FF","word":"door","label":"doorclosed","flags":[]},{"gfx":"FF8F87838383838383838383838383FFFFF8F0E0E0E0E0E0E0E0E0E0E0E0E0FF","word":"door","label":"dooropen","flags":{"walkable":true}},{"gfx":"FFFFCFCFCFCF898183838787878FFFFFFFFCE4E4E4E4E0E0E0E0E0E0F0F8FFFF","word":"switch","label":"switchoff","flags":{"neutable":true}},{"gfx":"FFFFCFCFCFCF898123232727878FFFFFFFFCE4E4E4E0E0616565656571F8FFFF","word":"switch","label":"switchon","flags":{"neutable":true}},{"gfx":"FFFF83D3D3D3D3D3D3D3D3D3D383FFFFFFFFC0CACACECACBCACACACACAC0FFFF","word":"","label":"","flags":[]},{"gfx":"FFFFAFEBFBFBFBBBBBFBFBFBEBAFFFFFFFFFF5D7DFDFDFDDDDDFDFDFD7F5FFFF","word":"scan","label":"scanoff","flags":{"neutable":true}},{"gfx":"FFFF2F2B2B2B6B6B6B6B2B2B2B2FFFFFFFFF755555555757575755555575FFFF","word":"scan","label":"scanon","flags":{"neutable":true}},{"gfx":"FFF3C78FBFFCF98187BFFFFFBF9F9FC7FFCFE1F1FCFCF8FEFEFCF9F0E6CE8F9F","word":"","label":"","flags":[]},{"gfx":"80808C80808080A8AAAAAAA888888880808C8080808380859595958584848480","word":"","label":"","flags":[]},{"gfx":"80808C8080A0A0A8AAAA8AA0A8808080808C8081919090848594959585858080","word":"","label":"","flags":{"debris":true}},{"gfx":"00005054545450404054545010383800000C0A2A2A2A0A03032A2A0A081C1C00","word":"","label":"t-chair","flags":[]},{"gfx":"0000001C1C10545040606010545454000030070702020A0A0100020A080A0200","word":"","label":"","flags":{"debris":true}},{"gfx":"80A0A8AA92D2D2AAC2C2AA92D2AA808080959595949494959494959494858080","word":"","label":"","flags":[]},{"gfx":"80808C808080A8C292AAAAAAAA8AC0D0808C80808083959290959194948580A8","word":"","label":"","flags":{"debris":true}},{"gfx":"80806008282A0800202880A8A8A8A08080980000141501051511819595958580","word":"","label":"","flags":[]},{"gfx":"80808C808080A0A8AAAA8AA2AAAAAA80808C0000000330010105051511010514","word":"","label":"","flags":{"debris":true}},{"gfx":"80D0D0D0C0D4C4C4CECAC0E0A0808080808A8B8A82AAA2A2F2D2828785808080","word":"rexx","label":"t-rexx","flags":[]},{"gfx":"F8989898BE8686868686BEB098F880809F989898FCE0E0E0E0E0FC8C989F8080","word":"","label":"t-rexxstop","flags":[]},{"gfx":"80808C8088A8A8E0E0F0C8C0CCC08080808C80808080B08183838282829A8080","word":"","label":"gord-ground","flags":[]},{"gfx":"808080A0A080F0F0F0E8D0D09098808080808081818083838385828282868080","word":"","label":"gord-s","flags":[]},{"gfx":"80C09090A080F0F0F0F0D0D09098808080808282818083838383828282868080","word":"","label":"gord-n","flags":[]},{"gfx":"808080A0A080F0F0F0F0D0D090B0808080808181818081838581808282868080","word":"","label":"gord-e","flags":[]},{"gfx":"8080A0A0A080E0F0E8E0D0D09098808080808081818083838383828282838080","word":"","label":"gord-w","flags":[]}] \ No newline at end of file