~technomancy/fennel-compendium

c5ba68312371675733442f5b19ba9a0b39e40c4d — Phil Hagelberg 5 months ago b425f57
Add mecha-flight game.
2 files changed, 773 insertions(+), 1 deletions(-)

M Makefile
A mecha-flight.fnl
M Makefile => Makefile +2 -1
@@ 88,7 88,7 @@ yahtzee-adventure: yahtzee-adventure/lib/fennel.lua
	cd $@ && love .

tic: amethyst.fnl hats.fnl life.fnl mech.fnl robotfindskitten.fnl \
		spilljackers.fnl xeno.fnl butterfly-effect.fnl
		spilljackers.fnl xeno.fnl butterfly-effect.fnl mecha-flight.fnl

amethyst.fnl: ; tic80 $@
hats.fnl: ; tic80 $@


@@ 98,5 98,6 @@ robotfindskitten.fnl: ; tic80 $@
spilljackers.fnl: ; tic80 $@
xeno.fnl: ; tic80 $@
butterfly-effect.fnl: ; tic80 $@
mecha-flight.fnl: ; tic80 $@

.PHONY: all love tic compiler

A mecha-flight.fnl => mecha-flight.fnl +771 -0
@@ 0,0 1,771 @@
;; title:  mecha flight
;; author: daniel g
;; desc:   side-scrolling bullet-hell
;; script: fennel

;; use of theme: every ten seconds,
;;  the player's weapon changes.

(local TITLE "MECHA\nFLIGHT")
(var game 0)
(var t 0)
(var score 0)
(var mod 1) ; difficulty and score mod
;(local bnds [0 0 240 128])
(var can-shoot? false)

(math.randomseed (time))

(macro unless [c ...]
	`(if ,c nil (do ,...)))

(macro dec! [x]
	`(set ,x (- ,x 1)))
(macro inc! [x]
	`(set ,x (+ ,x 1)))
(macro neg [x]
	`(- 0 ,x))

(macro tm [t x y]
	`(// (% ,t ,x) ,y))

(local Chad "Chad")

(local pi*2 (* math.pi 2))
(local pi/6 (/ math.pi 6))
(local pi/4 (/ math.pi 4))
(local pi/2 (/ math.pi 2))

(fn clmp-x [x]
	(math.min (math.max x 0) 232))
(fn clmp-y [y]
	(math.min (math.max y 0) 120))

(fn sdst [x1 y1 x2 y2] ;simple distance (dx+dy)
	(+ (math.abs (- x2 x1)) (math.abs (- y2 y1))))

(fn angle [x1 y1 x2 y2]
	(math.atan2 (- y2 y1) (- x2 x1)))

(fn aabb [x1 y1 w1 h1 x2 y2 w2 h2]
	(and
		(< x1 (+ x2 w2))
		(< x2 (+ x1 w1))
		(< y1 (+ y2 h2))
		(< y2 (+ y1 h1))))

(local c/yield coroutine.yield)
(local c/resume coroutine.resume)
(local c/status coroutine.status)
(local c/create coroutine.create)
(var drw-co ; drawing coroutines
	{:cs [] ; coroutine list
	 :add (fn [slf c]
			(table.insert slf.cs (c/create c)))
		:drw (fn [slf]
			(for [i (# slf.cs) 1 -1]
				(let [c (. slf.cs i)]
					(c/resume c)
					(when (= (c/status c) "dead")
						;(trace (c/status c))
						(table.remove slf.cs i)))))
	})
(fn explode [obj]
	(when obj.on
		(set obj.on false))
	(fn []
		(var timer 60)
		;(trace "EXPLODE")
		(while (> timer 0)
			;(trace t)
			(spr (+ 278 (tm t 16 8)) obj.x obj.y 0)
			(dec! timer)
			(c/yield)
			)))

(fn updblt [slf] ; update-bullet
	(let [dx (* slf.vel (math.cos slf.dir))
	      dy (* slf.vel (math.sin slf.dir))]
		(set slf.x (+ slf.x dx))
		(set slf.y (+ slf.y dy))
		(when
			(or
				(> slf.x 245)
				(< slf.x -5)
				(> slf.y 140)
				(< slf.y -5))
			(set slf.on false))))
	
(fn drwblt [slf]
	(when (> slf.hit 0)
		(for [i 1 14]
			(poke4 (+ (* 0x3FF0 2) i) 15)))
 (spr
		(+ slf.spri (tm t 30 15))	slf.x slf.y 0)
	(when (> slf.hit 0)
		(for [i 1 14]
			(poke4 (+ (* 0x3FF0 2) i) i))))

(local MAX_BULLETS 1000)
(fn new-bpl []; bullet pool
	(let [bpl
		{:fst 0
	 	:lst -1
			;dirty: (how many times bullet update affects queue)
			;:drt 0
			:bts {}
			:nq (fn [slf b] ;enqueue
				(inc! slf.lst)
				;(set slf.lst (+ 1 slf.lst))
				;(when (= game 1)
				;	(trace slf.fst)
				;	(trace slf.lst)
				;	(trace "-----------"))
				(tset slf slf.lst b))
			:dq (fn [slf] ;dequeue
				(when (> slf.fst slf.lst)
					(trace slf.fst)
					(trace slf.lst)
					(error "pool is empty"))
				(let [val (. slf slf.fst)]
					(when val.on
						(trace slf.fst)
						(trace slf.lst)
						(var bs 0)
						(each [_ b (ipairs slf.bts)]
							(when b.on (inc! bs)))
						(trace bs)
						(error "Live bullet freed"))
					(tset slf slf.fst nil)
					(inc! slf.fst)
					;(set slf.fst (+ 1 slf.fst))
					val))
			:fire
				(fn [slf x y ox oy w h r v s p? d? ex? hp upd cl] ; dequeue bullet then enqueue
					(if can-shoot?
						(let [b (slf:dq)]
						 (set b.x x)
							(set b.y y)
							(set b.ox ox)
							(set b.oy oy)
							(set b.w w)
							(set b.h h)
							(set b.dir r)
							(set b.vel v)
							(set b.spri s)
							(set b.hit 0)
							(set b.plr? p?)
							(if (= nil d?)
								(set b.dbp? true)
								(set b.dbp? d?))
							(if (= nil ex?)
								(set b.ex? false)
								(set b.ex? ex?))
							(set b.on true)
							(set b.frd true)
							(set b.hp (or hp 1))
							(if (= upd nil)
								(set b.upd updblt)
								(set b.upd upd))
							(set b.clchk cl)
							b)
						nil))
			:free (fn [slf b]
				(set b.frd false)
				(if (and b.on b.ex?)
					(drw-co:add (explode b))
					(set b.on false)))
			:upd (fn [slf]
			 ;(trace "-----------")
				;(var fst slf.fst)
				(each [_ b (ipairs slf.bts)]
					(when b.on
						(unless (= nil b.clchk)
							(b:clchk))
						(if (<= b.hp 0)
							(slf:free b)
							(b:upd)))))
				;(set slf.drt 0))
			:ltupd (fn [slf] ; late update for re-enqueieing destroyed bullets
				(each [_ b (ipairs slf.bts)]
					(dec! b.hit)
					(when (<= b.hp 0)
						(when (and b.on b.ex?)
							(drw-co:add (explode b.x b.y)))
						(slf:free b))
					(when (and b.frd (not b.on))
						(set b.frd false)
						;(trace "NQ")
						;(for [i slf.fst slf.lst]
						;	(when (= b (. slf i))
						;		(error "Duplicate enqueue")))
						(slf:nq b))))
			:drw (fn [slf]
				(each [_ b (ipairs slf.bts)]
					(when b.on
						(drwblt b))))
			:clr (fn [slf]
				(each [_ b (ipairs slf.bts)]
					(set b.on false))
				(slf:ltupd))
			:rst (fn [slf] ; hard reset
				(for [i slf.fst slf.lst]
					(tset slf i nil))
				(set slf.fst 0)
				(set slf.lst -1)
				(each [_ b (ipairs slf.bts)]
					(set b.on false)
					(set b.frd false)
					(slf:nq b)))
			:dmgall (fn [slf]
				(each [_ b (ipairs slf.bts)]
					(dec! b.hp)
					(when (<= b.hp 0)
						(slf:free b))))
		}]
	(for [i 1 MAX_BULLETS]
		(let [b
			{:x 0.0
				:y 0.0
				:ox 0
				:oy 0
				:w 0
				:h 0
				:dir 0.0
				:vel 0.0
				:spri 0
				:hp 1
				:upd updblt
				:clchk nil ; optional collision detection callback
				:gun nil
				:hit 0 ; was it damaged in this frame (and how many frames to flash)
				:plr? false ; was the bullet fired by the player
				:dbp? true ; does it get damaged by contact w/ player?
				:ex? false ; should it explode when destroyed?
				:on false
				:frd false}]
				(bpl:nq b)
				(table.insert bpl.bts b)))
	bpl))

(var bpl (new-bpl))
(var me Chad)

(fn gnfr [slf x y r p?] ;gun fire
	(when (<= slf.rt 0)
		(set slf.rt slf.rld)
		(slf:shoot x y r p?)))
(fn gnupd [slf] ; gun update
	(if (> slf.rt 0)
		(dec! slf.rt)))
(fn new-gun [rld spri shoot]
	{:rld rld ; how many ticks between shots
	 :rt 0 ; reload timer
		:spri spri
		:fire gnfr
		:upd gnupd
		:shoot shoot})

(var gun [
	(fn [];straight shooter
		(new-gun 10 274
			(fn [slf x y r p?]
				(bpl:fire x y 1 2 6 4 r 3 slf.spri p?))))
	(fn []; fires three
		(new-gun 45 276
			(fn [slf x y r p?]
				(bpl:fire x y 2 2 4 4 r 1.25 slf.spri p?)
				(bpl:fire x y 2 2 4 4 (+ r (neg pi/6)) 1.25 slf.spri p?)
				(bpl:fire x y 2 2 4 4 (+ r pi/6) 1.25 slf.spri p?))))
	(fn []; fires around shooter
		(new-gun 30 292;276 ;292
			(fn [slf x y _ p?]
				(let [spd 1.25]
					(for [r pi/4 pi*2 pi/4]
						(bpl:fire x y 2 2 4 4 r spd slf.spri p?)
						)))))
	(fn [] ; fires three straight bolts
		(new-gun 15 280
			(fn [slf x y r p?]
				(let [spd 3]
					(for [i -1 1]
						(bpl:fire x (+ y (* i 5)) 0 3 8 2 r spd slf.spri p?)
						)))))
	])

(fn new-enemy [s ox oy w h gun hp upd cl]
	(fn [x y]
		(let [b (bpl:fire
											x y ox oy w h
											0 0 s
											false false true
											hp upd cl)]
			(when (and (= b nil) can-shoot?)
				(error "failed to create enemy"))
			(set b.gun (gun))
			b)))

(fn cl-check [obj]
	(each [_ b (ipairs bpl.bts)]
		(when (and
									(~= obj b)
									b.on
									(aabb
										(+ obj.x obj.ox)
										(+ obj.y obj.oy)
										obj.w obj.h
										(+ b.x b.ox)
										(+ b.y b.oy)
										b.w b.h))
	 	(when (~= obj.plr? b.plr?); basically xor
				(dec! obj.hp)
				;(trace b.hp)
				(dec! b.hp)
				(set obj.hit 5)
				(set b.hit 5)
				(when (and (<= obj.hp 0) (not obj.plr?) b.plr?)
					(set score (+ score (* mod 100))))
				 ))))

(fn plr-cl [plr]
	(each [_ b (ipairs bpl.bts)]
		(when (and
									b.on
									(aabb
										(+ plr.x plr.ox)
										(+ plr.y plr.oy)
										plr.w plr.h
										(+ b.x b.ox)
										(+ b.y b.oy)
										b.w b.h))
	 	(when (not b.plr?)
				(when b.dbp? (dec! b.hp))
				(when (<= plr.invc 0)
					(dec! plr.hp)
					(set plr.invc 25))))))

(var inp
 {:up false
		:down false
		:left false
		:right false
		:shoot false 
  :bomb  false})
(fn new-plr []
	{:x 32
  :y 64
		:ox 3
		:oy 3
		:w 2
		:h 2
		:hp 3 ; start with 3 lives, max 6
		:bmb 3 ; start with 3 bombs, max 6
		:btm 15 ;bomb time
		:bt 0 ; bomb timer
		:invc 0 ; i-frame timer
		:gun ((. gun 1))
		:drw
			(fn [slf]
				(var s 257)
				(if (> slf.hp 0)
					(do
					 (when inp.up (set s 321))
						(when inp.down (set s 305))
						(when (> slf.invc 0)
							(poke4 (+ (* 0x3FF0 2) 15) 6))
						(spr
						 (+ s (tm t 30 15)) slf.x slf.y 0)
						(when (> slf.invc 0)
							(poke4 (+ (* 0x3FF0 2) 15) 15))
						(spr
						 (+ 272 (tm t 30 15)) (- slf.x 8) slf.y 0)
						(when inp.shoot (spr
						 (+ 259 (tm t 16 8)) (+ slf.x 8) slf.y 0)))
					(do
						(set s (+ 278 (tm t 16 8)))
							(spr s slf.x slf.y 0))
					))
		:upd
			(fn [slf]
				(slf.gun:upd)
				(when inp.up (set slf.y (clmp-y (- slf.y 1))))
				(when inp.down (set slf.y (clmp-y (+ slf.y 1))))
			 (when inp.left (set slf.x (clmp-x (- slf.x 1))))
			 (when inp.right (set slf.x (clmp-x (+ slf.x 1))))
				(when (and inp.bomb (> slf.bmb 0))
					(set slf.bt slf.btm)
					(set can-shoot? false)
					(dec! slf.bmb);(set slf.bmb (- slf.bmb 1))
					(bpl:dmgall))
				(when (> slf.bt 0)
					(dec! slf.bt);(set slf.bt (- slf.bt 1))
					(for [i 2 15]
						(var x (math.max (- i (- slf.btm slf.bt) 1)))
						(when (<= slf.bt 0)
							(set x i)
							(set can-shoot? true))
						(poke4 (+ (* 0x3FF0 2) i) x)))
				(when inp.shoot
					(slf.gun:fire (+ slf.x 6) slf.y 0 true))
				(plr-cl slf)
				(when (> slf.invc 0) (dec! slf.invc))
				(when (<= slf.hp 0) (set game 2)))
	})
(var plr (new-plr))

(fn input [] ; update input
	(set inp.shoot (btn 4))
	(set inp.bomb (btnp 5))
	(set inp.up (btn 0))
	(set inp.down (btn 1))
	(set inp.left (btn 2))
	(set inp.right (btn 3)))

(fn clr-inp []
	(each [k _ (pairs inp)]
		(tset inp k false)))

(fn enm-mov [e md p]
	(local d
		(let [v (/ p 2)]
			(if (or (> e.x (+ md v)) (< e.x (- md v)))
				1
				0.01)))
	(set e.x (- e.x d))
	(when (< e.x -8)
		(set e.on false)))

(fn pick-w [wvs n]
	(if (not (. wvs n))
		n
		(do
			(let [nn (if (>= n (# wvs)) 1 (+ n 1))]
				(pick-w wvs nn)))))

(var spawner
	{:t 1
		:fst true
		:e1 (fn [mx]
			(new-enemy 261 0 0 8 8 (. gun 3) 5
				(fn [slf]
					(when (= 0 (% t 2)) (slf.gun:upd))
					(enm-mov slf mx 3.2)
					;(set slf.x (math.max mx (- slf.x 1)))
					(slf.gun:fire slf.x slf.y 0 false)) cl-check))
		:e2 (fn [mx]
			(new-enemy 263 0 0 8 8 (. gun 2) 3
				(fn [slf]
					(when (= 0 (% t 2)) (slf.gun:upd))
					(enm-mov slf mx 2)
					;(set slf.x (math.max mx (- slf.x 1)))
					(let [r (angle slf.x slf.y plr.x plr.y)]
						(slf.gun:fire slf.x slf.y r false))) cl-check))
		:e3 (fn [md]
			(new-enemy 265 0 0 8 8 (. gun 4) 5
				(fn [slf]
					(when (= 0 (% t 7)) (slf.gun:upd))
					(enm-mov slf md 4)
					(slf.gun:fire slf.x slf.y math.pi false)) cl-check))
		:waves [
			(fn [slf]
				((slf.e1 200) 250 32)
				((slf.e2 170) 250 64)
				((slf.e1 200) 250 96))
			(fn [slf]
				((slf.e2 180) 250 25)
				((slf.e2 180) 250 103)
				((slf.e1 190) 250 64))
			(fn [slf]
				((slf.e1 195) 250 32)
				((slf.e1 160) 260 54)
				((slf.e1 195) 250 96)
				((slf.e1 160) 260 70))
			(fn [slf]
				((slf.e1 210) 300 30)
				((slf.e1 210) 250 64)
				((slf.e1 210) 300 98)
				((slf.e2 150) 260 47)
				((slf.e2 150) 260 81))
			(fn [slf]
				((slf.e3 200) 250 64)
				((slf.e2 145) 248 32)
				((slf.e2 145) 248 96))
			(fn [slf]
				((slf.e2 145) 250 54)
				((slf.e2 145) 250 74)
				((slf.e3 210) 248 22)
				((slf.e3 210) 248 106))
			]
		:wvs []
		:ld (fn [slf]
			(for [i 1 (# slf.waves)] (table.insert slf.wvs false)))
		:rst (fn [slf]
			(set slf.fst false)
			(set slf.t 1)
			(each [i _ (ipairs slf.wvs)]
				(tset slf.wvs i false)))
		:upd (fn [slf]
			(var df (math.max 1 (// mod 10)))
			(when (= 0 (% slf.t (/ 600 df))) ; 150 or 200
				(let [w (pick-w
												 slf.wvs
													(math.random 1 (# slf.waves)))
										f (. slf.waves w)]
					(tset slf.wvs w true)
					;(trace w)
					(f slf)))
			(inc! slf.t)
			(when (> slf.t 600)
				(slf:rst)
				(inc! mod)
				(set plr.gun ((. gun (math.random 1 (# gun)))))))
	})
(spawner:ld)


(fn menuTic []
	(when (btnp 5)
		(set game 1)
		(set can-shoot? true)
		;(spawner:wave-4)
		;(spawner:wave-1)
		;(spawner:wave-2)
		;(spawner:wave-3)
		(set t 0))
	(cls 0)
	(map 0 17 30 16 0 0 0)
	(print TITLE 86 42 15 true 2)
	(when  (= 0 (tm t 120 60))
		(print "PRESS X to START" 72 100 15 true)))

(fn drw-game []
	(cls 2)
		(map 0 0 46 17 (neg (% t 128)) 0 0)
  (plr:drw)
		(bpl:drw)
		(drw-co:drw)
	 ; draw ui bar
		(rect 0 128 240 8 0)
		(for [i 0 (- plr.hp 1)]
			(spr 288 (* i 7) 128 0))
		(for [i 0 (- plr.bmb 1)]
			(spr 289 (+ 49 (* i 7)) 128 0))
		(when spawner.fst
			(print "Get Ready..." 56 42 15 true))
		(print
			(string.format "%08d" score)
			191 130 15 true))

(global TIC
 (fn []
		(inc! t);(set t (+ t 1))
		(match game
			0 (menuTic)
			1 (do
				  (input)
						(when (= 0 (% t 60))
							(inc! score))
						(plr:upd)
						(bpl:upd)
						(spawner:upd)
						(drw-game)
						(bpl:ltupd))
			2 (do
						(clr-inp)
						(when (btnp 5)
							(set game 0)
							(set score 0)
							(set mod 0)
							(bpl:rst)
							(spawner:rst)
							(set spawner.fst true)
							(set plr nil)
							(set plr (new-plr))
							(collectgarbage)
							(collectgarbage)
							)
						(drw-game)
						(print "GAME\nOVER!" 96 42 15 true 2)
						(print "Press X to Reset" 72 100 15 true)
						))))

(assert (= me "Chad") "unreachable error")
;; <TILES>
;; 058:0000000000000000000000000000000000000077000007880000788800078888
;; 059:0000000000000000000007000000787000007870700788707007888787788888
;; 060:0000000000000000000000000000000000000000000000000000000070000000
;; 069:0000000000000000000000000000000000000700000078700007887000078877
;; 070:0000000000000000000070000007870000078800007888707788187011111187
;; 073:0000000000000000000000000000000000000000000000070000000700000071
;; 074:0078888800788811078811110711111171111111111111111111111111111111
;; 075:8888818888811188181111181111111111111111111111111111111111111111
;; 076:7000000087000000870000001870000011170000111170001111170011111700
;; 077:0000000000000000000000000000000000000000000000000700000071700000
;; 083:0000000000000000000000000000000000000007000000070000000700000071
;; 084:0770000078870000788700007888700088188700811117001111117711111177
;; 085:0007888700781187071111180711111171111111711111111111111111111111
;; 086:1111111111111111711111111711111117111111117111111117111111171144
;; 087:7000000070000000170000001170000011170000111170001111170044444444
;; 088:0000000000000000000000000000000000000000000044440444444444444444
;; 089:0000007100000711000077110007111144444444444444444444444444444444
;; 090:1111111111111111111111111111111141111111444111114444444444444444
;; 091:1111111111111111111111111111111111111111111111114444111144444444
;; 092:1111117711111171111111111111111111111111111111111111111144444444
;; 093:1170000011170000111170001111170011111170111111171111111144111111
;; 094:0000000000000000000000000000000000000000000000007000000070000000
;; 096:0000000000000000444000004444444444444444444444444444444444444444
;; 097:0000444400444444444444444444444444444444444444444444444444444444
;; 098:4444000044444444444444444444444444444444444444444444444444444444
;; 099:0000007140000711444071114444444444444444444444444444444444444444
;; 100:1111117111111771111117114444444444444444444444444444444444444444
;; 101:1111111111111111111111444444444444444444444444444444444444444444
;; 102:1111744414444444444444444444444444444444444444444444444444444444
;; 103:4444444444444444444444444444444444444444444444444444444444444444
;; 109:4441111144444111444444114444444444444444444444444444444444444444
;; 110:1700000017000000117000001117000044444444444444444444444444444444
;; 111:0000000000000000000000040044444444444444444444444444444444444444
;; 136:777770007788877000788887000778880000078800006977000099b300069b77
;; 137:0000000000000000700000008770000088877000888877777788877f7f788887
;; 138:000000000000000000000000000000070000007777700788ff7777777fffffff
;; 139:0000000000000000000000007777000088887000888887008888870078888700
;; 152:00669b3300069b33000099b70000699900000660000006000000000000000000
;; 153:3ff777773ffaaaaa73aaaaaa037777aa0000077700007ffa0007ffff007fffff
;; 154:877fffff77777fffaaaaffffafffffff7affafffa7ffaaffaa7faa7faa7aa777
;; 155:f7887000ff777000f7eee700f7eeee70f7eeee70ff7eee70ff7eee77fff7ee77
;; 168:000000000000077700007fff0007ffff777fffff07ffffaa07fffaa707fffa70
;; 169:007ffffa77ffffaafffffaa7ffffaa70fffaaa7077aa77000777700000000000
;; 170:a7aa7aaa7777ffaa0007fffa0007ffff0007ffff007fffff07ffffff7ffffffa
;; 171:7fff77a7a7faaa70aa777700aa700000fa700000ff700000aa70000077000000
;; 184:0777770007707700070070000000000000000000000000000000000000000000
;; 186:07fffaa707ffaaa707ffaaa707ffaaa707ffaaa707fff7a707fff77700777770
;; 187:0000000000000000000000000000000000000000700000007700000077000000
;; 192:777770007788877000788887000778880000078800006977000099b300069b77
;; 193:0000000000000000700000008770000088877000888877777788877f7f788887
;; 194:000000000000000000000000000000070000007777700788ff7777777fffffff
;; 195:0000000000000000000000007777000088887000888887008888870078888700
;; 200:777770007788877000788887000778880000078800006977000099b300069b77
;; 201:0000000000000000700000008770000088877000888877777788877f7f788887
;; 202:000000000000000000000000000000000000000077770007ff7777777fffffff
;; 203:0000000000000000000000000000000007777000788887778888888778888887
;; 204:777770007788877000788887000778880000078800006977000099b300069b77
;; 205:0000000000000000700000008770000088877000888877777788877f7f788887
;; 206:000000000000000000000000000000000000000077770007ff7777777fffffff
;; 207:0000000000000000000000000000000007777000788887778888888778888887
;; 208:00669b3300069b33000099b70000699900000660000006000000000000000000
;; 209:3ff777773ffaaaaa73aaaaaa037777aa0000077700007ffa0007ffff007fffff
;; 210:877fffff77777fffaaaaffffafffffff7affafffa7ffaaffaa7faa7faa7aa777
;; 211:f7887000ff777000f7eee700f7eeee70f7eeee70ff7eee70ff7eee77fff7ee77
;; 216:00669b3300069b33000099b70000699900000660000006000000000000000000
;; 217:3ff777773ffaaaaa73aaaaaa037777aa0000077700007ffa0007ffff007fffff
;; 218:877fffff77777fffaaaaffffafffffff7affafffa7ffaaffaa7faa7faa7aa777
;; 219:f7888887ff777870f7eee700f7eeee70f7eeee70ff7eee70ff7eee77fff7ee77
;; 220:00669b3300069b33000099b70000699900000660000006000000000000000000
;; 221:3ff777773ffaaaaa73aaaaaa037777aa0000077700007ffa0007ffff007fffff
;; 222:877fffff77777fffaaaaffffafffffff7affafffa7ffaaffaa7faa7faa7aa777
;; 223:f7888887ff777870f7eee700f7eeee70f7eeee70ff7eee70ff7eee77fff7ee77
;; 224:000000000000077700007fff0007ffff777fffff07ffffaa07fffaa707fffa70
;; 225:007ffffa77ffffaafffffaa7ffffaa70fffaaa7077aa77000777700000000000
;; 226:a7aa7aaa7777ffaa0007fffa0007ffff0007ffff007fffff07ffffff7ffffffa
;; 227:7fff77a7a7faaa70aa777700aa700000fa700000ff700000aa70000077000000
;; 232:000000000000077700007fff0007ffff777fffff07ffffaa07fffaa707fffa70
;; 233:007ffffa77ffffaafffffaa7ffffaa70fffaaa7077aa77000777700000000000
;; 234:a7aa7aaa7777ffaa0007fffa0007ffff0007ffff007fffff07ffffff7ffffffa
;; 235:7fff77a7a7faaa70aa777700aa700000fa700000ff700000aa70000077000000
;; 236:000000000000077700007fff0007ffff777fffff07ffffaa07fffaa707fffa70
;; 237:007ffffa77ffffaafffffaa7ffffaa70fffaaa7077aa77000777700000000000
;; 238:a7aa7aaa7777ffaa0007fffa0007ffff0007ffff007fffff07ffffff7ffffffa
;; 239:7fff77a7a7faaa70aa777700aa700000fa700000ff700000aa70000077000000
;; 240:0777770007707700070070000000000000000000000000000000000000000000
;; 242:07fffaa707ffaaa707ffaaa707ffaaa707ffaaa707fff7a707fff77700777770
;; 243:0000000000000000000000000000000000000000700000007700000077000000
;; 248:0777770007707700070070000000000000000000000000000000000000000000
;; 250:07fffaa707ffaaa707ffaaa707ffaaa707ffaaa707fff7a707fff77700777770
;; 251:0000000000000000000000000000000000000000700000007700000077000000
;; 252:0777770007707700070070000000000000000000000000000000000000000000
;; 254:07fffaa707ffaaa707ffaaa707ffaaa707ffaaa707fff7a707fff77700777777
;; 255:0000000000000000000000000000000000000000700000007700000077000000
;; </TILES>

;; <SPRITES>
;; 001:0077000000777f000ff777f033fffffe7300ffaa0000f00000ff00000f000000
;; 002:0077000000777f000ff777f073fffffe3300ffaa0000f00000ff00000f000000
;; 003:00000000000000000000000060000000b6000000600000000000000000000000
;; 004:00000000000000006000000090000000b9600000900000006000000000000000
;; 005:000370000307307000a8a80037877a3773a77873008a8a000703703000073000
;; 006:0007300007037030008a8a0073a7787337877a3700a8a8000307307000037000
;; 007:0000000000000070000007700ee3aa360e33aa3b8a8777700000770000000700
;; 008:0000000000000070000007700ee3aa3b0e33aa36a8a777700000770000000700
;; 009:0000000007770000007ffa870af77fa30af77f87007ff8a30777000000000000
;; 010:0000000007770000007ff8a30af77f870af77fa3007ffa870777000000000000
;; 016:0000000000000000000000000000069b0000069b000000000000000000000000
;; 017:0000000000000000000000090000699b0000699b000000090000000000000000
;; 018:00000000006666000699996069bbbb9669bbbb96069999600066660000000000
;; 019:0000000000699600069bb96099bbbbb66bbbbb99069bb9600069960000000000
;; 020:000000000006600000099000069bb960069bb960000990000006600000000000
;; 021:000000000000600000699600069bb900009bb960006996000006000000000000
;; 022:006b009090960b00060000960000b06bb60f00006900006000b069090900b600
;; 023:0900b60000b0690969000060b60f00000000b06b0600009690960b00006b0090
;; 024:0000000000000000000000000dbdbdbddbdbdbd0000000000000000000000000
;; 025:000000000000000000000000dbdbdbd00dbdbdbd000000000000000000000000
;; 032:000000000aaaaaa00a8fffa00affffa00affffa000affa00000aa00000000000
;; 033:0000000000055500005cc55005cffc5005cffc50055cc5000055500000000000
;; 036:00000000000dd000000880000d8ff8d00d8ff8d000088000000dd00000000000
;; 037:000000000000d00000d88d000d8ff800008ff8d000d88d00000d000000000000
;; 049:000007000077ff700f777ff033f777fe7300ffaa00fff0000f00a000000a0000
;; 050:000007000077ff700f777ff073f777fe3300ffaa00fff0000f00a000000a0000
;; 065:00077000000777000fff777033fffffe7300ffaa00aaf0000a0ff00000f00000
;; 066:00077000000777000fff777073fffffe3300ffaa00aaf0000a0ff00000f00000
;; </SPRITES>

;; <MAP>
;; 000:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c22d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000500002000000100002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 002:000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 003:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000050
;; 004:0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ea
;; 005:000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 006:000000000000000000000000000000000000000000000818283848580000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 007:000000000000000818283848586800000000182838480919293949596900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 008:00102030405060708090a0b0c0d0e0f000102030405060708090a0b0c0d0e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 009:01112131415161718191a1b1c1d1e1f101112131415161718191a1b1c1d1e1f100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003383000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 010:02122232425262728292a2b2c2d2e2f202122232425262728292a2b2c2d2e2f20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e23c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 011:03132333435363738393a3b3c3d3e3f303132333435363738393a3b3c3d3e3f303132333435363738393a3b3c3d3e3f303132333435363738393a3b3c3d3e3000000000000000000000000000000000000000000000000007783000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 012:04142434445464748494a4b4c4d4e4f404142434445464748494a4b4c4d4e4f404142434445464748494a4b4c4d4e4f404142434445464748494a4b4c4d4e400000000000000000000000000000000000000000000000000344700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008300c100a80100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 013:05152535455565758595a5b5c5d5e5f505152535455565758595a5b5c5d5e5f505152535455565758595a5b5c5d5e5f505152535455565758595a5b5c5d5e500000000000000000000000000000000000000000000000000ba8300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002c000000004700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 014:06162636465666767676767676d6e6f606162636465666767676767676d6e6f606162636465666767676767676d6e6f606162636465666767676767676d6e600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008300b200980800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 015:7676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676760000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ab0a6074011600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 016:767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 017:000000000000000000000000000000000000000000004f5f6f7f009f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 018:0000000000000000000000000000000000000000000000000000000000008d130000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044000000a600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 019:000000000000000000000000000000000000000000000000000000000000099500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 020:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 021:0000000000000c1c2c3c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044000000e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 022:0000000000000d1d2d3d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000085c764018100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 023:0000000000000e1e2e3e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 024:0000000000000f1f2f3f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 030:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006fcf008f00000000000000000000000000000000000000000000016400
;; 031:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008100000000000000000000000000000000000000000000010000
;; 032:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022953500440000000000000083c37401000000006400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008600000000000000000000000000000000000000000000016400
;; 033:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007bfcf00859f64012295350044000000000000000c4d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008100000000000000000000000000000000000000000000004400
;; 034:0000000000000000000000000000000000000000000000000000000000004400000000000000000000000065540164000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008a1c64018f5274016400000007bfcf000c9b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002c6963700000000000000000000000000000000000000000000471626
;; 035:c600000000000000000000000000000000000000000000000000000000000202020200f6270000000207000000000000001696270000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020202020296660282f5f566e6c6f576c6f62616c6f5f5370000000000000000000000000000000000000000000000000000000096e6768207164792929202478656e6a002020202000000000000000000000000000000000000000000000000000000000000000000000000000000000000004602275600000000000000000000000000000000000000000000f63796
;; 036:4700000000000000000000000000000000000000000000000000000000002696e64696000037000000000000000000b582b602b2000000000000000000000000000000000000000000000000000000000000e637562747822696e64696e67637c202b7c6963747823797d682723756c65636477292c202b60000000000000000000000000000000000000000000000000000000057e6071636b67292c2023797d68272471626c656e257e6071636b6729292c2026716c692000000000000000000000000000000000000000000000000000000272202d3000000000000000000000000000000000000000000000247f6
;; 037:370000000000000000000000000000000000000000000000000000000000e6a0020202020202020202022756475727e602e696c6a0020202020202020256c63756a002020202020202020202c6f63616c6023757266716c602d302c6963747823797d68272e27292c2026716c6c202b692a00202020202020000000000000000000000000000000000000000000000000000000096e64696e6763702d302d616473686f5071647475627e682b73757266716c6d7c2020700000000000000000000000000000000000000000000000000000002471626c6000000000000000000000000000000000000000000002636f6
;; 038:e6000000000000000000000000000000000000000000000000000000000002960716962737823757262696e64696e67637920246f6a0020202020202020202020202471626c656e296e637562747822696e64696e67637c2022692000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0020202020202f573f58292a00202020256e646a0020202022756475727e60236f6e6000000000000000000000000000000000000000000000000000000005000880000000000000000000000000000000000000000000000000000
;; 039:000000000000000000000000000000000000000000000000000000000000440000000000000000000000000000000000000000000000000000000000000000000000000000008f73740171c63500640000008d6364018953640122000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007bfcf008300000000000000000000000000000000000000000000000000
;; 040:0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004b7401830000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 041:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006401894374000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 043:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 045:050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ef7000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 046:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001fffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 047:e40000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; 050:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000440000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; </MAP>

;; <TRACKS>
;; 000:100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
;; </TRACKS>

;; <PALETTE>
;; 000:140c1c3014201f27484e4a4e1465089d616dff553475716185a1baffae818595a1fff65dd2aa994c89bed2c65edeeed6
;; </PALETTE>