-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgrow.lua
1308 lines (1263 loc) Β· 128 KB
/
grow.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
-- title: Grow quickly
-- author: congusbongus
-- desc: Grow plants and collect fruit!
-- script: lua
-- license: MIT License
-- site: https://github.com/cxong/GrowQuickly
t=0
-- constants
W=240
H=128
T=16
-- sfx
sfxget=0
sfxwhistle=1
sfxwater=2
sfxcrow=3
sfxlaugh=4
sfxdig=5
sfxmg=6
-- action
Action={}
function Action:new(sprite,s,note)
local a=setmetatable({},{__index=Action})
a.sprite=sprite
a.s=s
a.note=note
a.count=0
return a
end
function Action:create(x,y)
a=Action:new(self.sprite,self.s,self.note)
a.count=0
a.x=x
a.y=y
sfx(a.s,a.note,-1,3)
return a
end
function Action:update()
self.count=self.count+1
if self.count>40 then
return nil
end
return self
end
function Action:draw(t)
spr(self.sprite,self.x,self.y+t%20/4-3,0,1,0,0,1,1)
end
actget=Action:new(511,sfxget,"C-4")
actwater=Action:new(510,sfxwater,"C-7")
actwhistle=Action:new(509,sfxwhistle,"C-8")
actplant=Action:new(508,sfxdig,"G-3")
actmg=Action:new(506,sfxmg,"E-5")
-- player
Player={}
function Player:new(x,y)
local p=setmetatable({},{__index=Player})
p.x=x
p.y=y
p.dir=1 -- up,down,left,right
p.movec=0
p.actions={}
return p
end
function Player:doaction()
if #self.actions>0 then return end
if self.movec>0 then return end
-- where the action is directed at
x=self.x
y=self.y
-- neighboring actions
dx=0
dy=0
if self.dir==0 then
y=y-1
dx=1
elseif self.dir==1 then
y=y+1
dx=1
elseif self.dir==2 then
x=x-1
dy=1
elseif self.dir==3 then
x=x+1
dy=1
end
-- draw actions centered
xa=self.x*T+4
ya=self.y*T+4
if self.dir==0 then ya=ya-8
elseif self.dir==1 then ya=ya+8
elseif self.dir==2 then xa=xa-8
elseif self.dir==3 then xa=xa+8
end
-- plant actions
for i=1,#ps do
if x==ps[i].x and y==ps[i].y then
if ps[i].fruit then
-- get
self.actions[#self.actions+1]=actget:create(xa,ya)
ps[i].fruit=nil
score=score+(ispeach and 20 or 10)
elseif ps[i].stage==-1 then
-- plant
self.actions[#self.actions+1]=actplant:create(xa,ya)
ps[i]:replant()
elseif ps[i].water<=0 then
-- water
local f=bigcan and 1 or 0
for ddx=-dx*f,dx*f do
for ddy=-dy*f,dy*f do
for ii=1,#ps do
if x+ddx==ps[ii].x and
y+ddy==ps[ii].y and
ps[ii].water<=0
then
self.actions[#self.actions+1]=
actwater:create(xa+ddx*T,ya+ddy*T)
ps[ii]:quench(10)
score=score+5
end
end
end
end
end
end
end
if #self.actions==0 then
local a=actwhistle
if ismg then
a=actmg
for i=1,#crows do
crows[i]:scare()
end
end
self.actions[#self.actions+1]=a:create(xa,ya)
end
end
function Player:update(dx,dy)
-- actions
for i=#self.actions,1,-1 do
if self.actions[i]:update()==nil then
table.remove(self.actions,i)
end
end
-- moving
self.movec=math.max(self.movec-1,0)
if self.movec==0 and (dx~=0 or dy~=0) then
-- turning
xnext=self.x+dx
ynext=self.y+dy
if self.y>ynext then self.dir=0
elseif self.y<ynext then self.dir=1
elseif self.x>xnext then self.dir=2
elseif self.x<xnext then self.dir=3
end
local canmove=true
-- check world bounds
if ynext<0 or ynext>=H/T or xnext<0 or xnext>=W/T then
canmove=false
elseif mget(xworld+xnext*2,yworld+ynext*2)==80 then
-- check water
canmove=false
else
-- check plants
for i=1,#ps do
if xnext==ps[i].x and ynext==ps[i].y then
canmove=false
break
end
end
-- check scarecrows
for i=1,#scarecrows do
if xnext==scarecrows[i].tx and
ynext==scarecrows[i].ty
then
canmove=false
break
end
end
end
if canmove then
self.movec=movec
self.x=xnext
self.y=ynext
end
end
end
function Player:draw(t)
flip=0
dx=0
dy=0
-- walking
if self.movec>0 or #self.actions>0 then
if self.dir==0 then
sprite=296
dy=1
elseif self.dir==1 then
sprite=264
dy=-1
else
sprite=288
if self.dir==2 then
dx=1
else
flip=1
dx=-1
end
end
dx=dx*self.movec*T/movec
dy=dy*self.movec*T/movec
sprite=sprite+t%20//5*2
else
if self.dir==0 then
sprite=296
elseif self.dir==1 then
sprite=256+t%60//30*2
else
sprite=290
if self.dir==3 then
flip=1
end
end
end
spr(sprite,self.x*T+dx,self.y*T+dy,5,1,flip,0,2,2)
for i=1,#self.actions do
self.actions[i]:draw(t)
end
end
-- plants
Bubble={}
function Bubble:new(sprite)
local b=setmetatable({},{__index=Bubble})
b.sprite=sprite
return b
end
function Bubble:draw(x,y,t)
spr(self.sprite,x,y-t%20/5-6,5,1,0,0,2,2)
end
PlantType={}
function PlantType:new(sprite,stagelen,water,quenchf,death)
local pt=setmetatable({},{__index=PlantType})
pt.sprite=sprite
pt.stagelen=stagelen
pt.water=water
pt.quenchf=quenchf
pt.death=death
return pt
end
function PlantType:getdeath()
local f=1
if drought then f=2 end
return self.death*f
end
tomato=PlantType:new(320,300,10,50,400)
peach=PlantType:new(384,280,5,40,300)
Fruit={}
function Fruit:new(type)
local f=setmetatable({},{__index=Fruit})
f.type=type
return f
end
function Fruit:draw(x,y,t)
sprite=self.type.sprite+3*4
spr(sprite+t%60//30*2,x,y,0,1,0,0,2,2)
end
Plant={}
function Plant:new(type,x,y)
local p=setmetatable({},{__index=Plant})
p.type=type
p.x=x
p.y=y
p:replant()
return p
end
function Plant:replant()
self.age=0
self.stage=0
self.fruit=nil
self.bubble=nil
self.water=0
self:quench(self.type.water)
end
function Plant:quench(water)
self.water=self.type.quenchf*water
end
function Plant:dead()
return self.stage==-1
end
function Plant:update()
-- don't age if has fruit
if self.fruit~=nil then return end
-- drink water
self.water=self.water-1
if self.water<=0 then
if self.water<-self.type:getdeath() then
self.stage=-1
self.bubble=nil
else
-- ask for water
if self.bubble==nil then
self.bubble=Bubble:new(430)
end
bspr=nil
if self.water>-self.type:getdeath()/3 then bspr=430
elseif self.water>-self.type:getdeath()*2/3 then bspr=428
else bspr=426
end
self.bubble.sprite=bspr
end
else
self.bubble=nil
self.age=self.age+1
if self.age>self.type.stagelen then
self.age=0
if self.stage<2 then
self.stage=self.stage+1
else
self.fruit=Fruit:new(self.type)
end
end
end
end
function Plant:draw(t)
sprite=self.type.sprite+self.stage*4
if self.stage==-1 then sprite=352
elseif self.stage==0 and drought then sprite=356
end
spr(sprite+t%60//30*2,self.x*T,self.y*T-3,8,1,0,0,2,2)
if self.fruit then
self.fruit:draw(self.x*T,self.y*T-3,t)
end
if self.bubble then
self.bubble:draw(self.x*T,self.y*T,t)
end
end
-- enemies
Crow={}
function Crow:new(tx,ty)
local c=setmetatable({},{__index=Crow})
c.tx=tx
c.ty=ty
angle=math.random()*math.pi*2
c.x=math.sin(angle)*W+W/2
c.y=-math.cos(angle)*H+H/2
local speed=1
c.dx=tx*T-c.x
c.dy=ty*T-c.y
mag=math.sqrt(c.dx*c.dx+c.dy*c.dy)
c.dx=c.dx*speed/mag
c.dy=c.dy*speed/mag
c.scared=false
c.fruit=nil
return c
end
function Crow:dead()
return self.scared and (
self.x<-T or
self.x>W or
self.y<-T or
self.y>H
)
end
function Crow:scare()
if self.scared then return end
self.scared=true
if self.fruit then
self.fruit=nil
score=score+5
end
self.dx=-self.dx*2
self.dy=-self.dy*2
sfx(sfxcrow,"E-6",-1,1)
end
function Crow:closeto(x,y)
return math.abs(x-self.x)+math.abs(y-self.y)<=T*1.5
end
function Crow:update()
-- check for players around
if not self.scared then
-- scared by player
if self:closeto(p.x*T,p.y*T) then
self:scare()
end
-- scared by scarecrows
for i=1,#scarecrows do
if self:closeto(scarecrows[i].tx*T,scarecrows[i].ty*T)
then
self:scare()
end
end
end
-- eat fruit
if math.abs(self.x-self.tx*T)<2 and
math.abs(self.y-self.ty*T)<2
then
for i=1,#ps do
if ps[i].x==self.tx and
ps[i].y==self.ty and
ps[i].fruit
then
self.fruit=ps[i].fruit
ps[i].fruit=nil
sfx(sfxlaugh,"C-6",-1,1)
end
end
end
self.x=self.x+self.dx
self.y=self.y+self.dy
end
function Crow:draw(t)
sprite=460
spr(sprite+t%20//10*2,self.x,self.y,5,1,0,0,2,2)
if self.fruit then
self.fruit:draw(self.x,self.y,t)
end
end
crowcounter=50
crows={}
-- scarecrow
Scarecrow={}
function Scarecrow:new(tx,ty)
local s=setmetatable({},{__index=Scarecrow})
s.tx=tx
s.ty=ty
return s
end
function Scarecrow:draw(t)
sprite=480
spr(sprite+t%60//30*2,self.tx*T,self.ty*T-4,8,1,0,0,2,2)
end
scarecrows={}
-- start
p=Player:new(7,3)
ps={}
score=0
movec=15
mode=nil
level=3
muslen=3696
levels={
{text={
"Press Z to start!",
"Arrow keys to walk"
},xworld=210,yworld=119,tend=-1},
{text={
"Well done!",
"Higher scores = bonus items!"
},xworld=180,yworld=119,tend=-1},
{text={
"Congratulations!",
"Enjoy the rest of your day!"
},xworld=150,yworld=119,tend=-1},
{text={
"Watch them grow!",
"Water the plants!",
"Pick the fruit!",
"Shoo the crows!"
},xworld=0,yworld=0,tend=muslen},
{text={
"Watch them grow!",
"Plants die without water...",
"Replant dead plants!"
},xworld=30,yworld=0,tend=muslen},
{text={
"Keep it up!",
"Don't sweat it!"
},xworld=60,yworld=0,tend=muslen},
{text={
"Fruit is good for you!",
"Fruit don't need watering!",
},xworld=90,yworld=0,tend=muslen},
{text={
"Are the crows winning?",
"You can't win 'em all!"
},xworld=120,yworld=0,tend=muslen},
{text={
"Help I'm stuck in this status bar"
},xworld=150,yworld=0,tend=muslen},
{text={
"Brush your teeth twice a day!",
"Steal fruit from crows!"
},xworld=180,yworld=0,tend=muslen},
{text={
"Isn't the weather great?",
"Let's get a milkshake!"
},xworld=210,yworld=0,tend=muslen},
}
text=nil
xworld=nil
yworld=nil
tend=nil
-- bonuses
bonussprite=nil
function addscarecrow()
nscarecrows=nscarecrows+1
scarecrows[#scarecrows+1]=Scarecrow:new(3,5)
end
function addshoes()
movec=10
bonussprite={sprite=507}
end
function addseeds()
drought=true
ps[#ps+1]=Plant:new(tomato,3,5)
end
function addbigcan()
bigcan=true
bonussprite={sprite=510}
end
function addpeach()
ispeach=true
local p=Plant:new(peach,3,5)
p.stage=3
p.fruit=Fruit:new(p.type)
ps[#ps+1]=p
end
function addmg()
ismg=true
bonussprite={sprite=506}
end
function drawbonus()
if bonussprite then
spr(bonussprite.sprite,50,84)
end
end
bonuses=nil
nscarecrows=0
bchecked=false
bonus=nil
function setlevel(i)
text=levels[i].text
xworld=levels[i].xworld
yworld=levels[i].yworld
tend=levels[i].tend
t=0
end
function putseeds()
-- put seeds at soil
ps={}
pt=ispeach and peach or tomato
for x=0,29,2 do
for y=0,15,2 do
if mget(x+xworld,y+yworld)==0 then
ps[#ps+1]=Plant:new(pt,x/2,y/2)
end
end
end
end
function putscarecrows()
-- put scarecrows at sand
scarecrows={}
tiles={}
for x=0,29,2 do
for y=0,15,2 do
if mget(x+xworld,y+yworld)==48 then
tiles[#tiles+1]={x=x/2,y=y/2}
end
end
end
-- shuffle
for i=#tiles,2,-1 do
local j=math.random(i)
tiles[i],tiles[j]=tiles[j],tiles[i]
end
for i=1,#tiles do
if i>nscarecrows then
break
end
scarecrows[#scarecrows+1]=
Scarecrow:new(tiles[i].x,tiles[i].y)
end
end
function smenu()
level=3
bonuses={
{
thresh=250,
text="You got a scarecrow!",
func=addscarecrow
},
{
thresh=650,
text="You got new shoes!",
func=addshoes
},
{
thresh=950,
text="You got drought tolerant!",
func=addseeds
},
{
thresh=1350,
text="You got a big can!",
func=addbigcan
},
{
thresh=1700,
text="You got a scarecrow!",
func=addscarecrow
},
{
thresh=2300,
text="You got peaches!",
func=addpeach
},
{
thresh=3000,
text="You got a machine gun!",
func=addmg
},
}
setlevel(1)
score=0
drought=false
bigcan=false
ispeach=false
ismg=false
movec=15
nscarecrows=0
bchecked=false
bonus=nil
mode="menu"
p=Player:new(9,3)
music(1,-1,-1,false)
-- manually put some plants
ps[#ps+1]=Plant:new(tomato,9,2)
ps[#ps+1]=Plant:new(tomato,2,4)
end
function scomplete()
setlevel(2)
bchecked=false
bonus=nil
bonussprite=nil
mode="complete"
music(1,-1,-1,false)
p=Player:new(11,1)
crows={}
putseeds()
putscarecrows()
end
function sgame()
if level>#levels then
send()
return
end
setlevel(level)
mode="game"
music(0)
p=Player:new(7,3)
putseeds()
putscarecrows()
end
function send()
setlevel(3)
mode="end"
music(3,-1,-1,false)
p=Player:new(11,1)
crows={}
putseeds()
putscarecrows()
end
smenu()
-- loop
function TIC()
if mode=="menu" then
menu()
elseif mode=="complete" then
complete()
elseif mode=="end" then
fend()
else
if tend>0 and t>=tend then
scomplete()
return
end
-- update
if btn(4) then
p:doaction()
end
dx=0
dy=0
if btn(2) then dx=-1
elseif btn(3) then dx=1
elseif btn(0) then dy=-1
elseif btn(1) then dy=1
end
p:update(dx,dy)
for i=#ps,1,-1 do
ps[i]:update()
end
crowcounter=crowcounter-1
if crowcounter<=0 then
if #ps>0 then
plant=ps[math.random(#ps)]
if plant.fruit then
crows[#crows+1]=
Crow:new(plant.x,plant.y)
end
end
crowcounter=ispeach and 30 or 50
end
for i=#crows,1,-1 do
crows[i]:update()
if crows[i]:dead() then
table.remove(crows,i)
end
end
end
-- draw
cls(4)
if t%60==0 then
for x=0,29 do
for y=0,15 do
local m=mget(x+xworld,y+yworld)
if m==80 then mset(x+xworld,y+yworld,81)
elseif m==81 then mset(x+xworld,y+yworld,80)
end
end
end
end
map(xworld,yworld)
p:draw(t)
for i=1,#ps do
ps[i]:draw(t)
end
for i=1,#scarecrows do
scarecrows[i]:draw(t)
end
for i=1,#crows do
crows[i]:draw(t)
end
print(text[t//400%#text+1],70,129)
print(string.format("SCORE: %d",score),1,129)
if bonus then
print(bonus.text, 84, 84)
drawbonus()
end
t=t+1
end
function menu()
for i=1,#ps do
ps[i]:update()
ps[i]:quench(1)
end
if btnp(4) then
level=level+1
sgame()
end
end
function complete()
local justchecked=false
if btnp(4) then
if not bchecked then
-- check for bonuses
bchecked=true
justchecked=true
for i=#bonuses,1,-1 do
b=bonuses[i]
if b.thresh<=score then
bonus=b
b.func()
table.remove(bonuses,i)
music(2,-1,-1,false)
break
end
end
end
if not (justchecked and bonus) then
bonus=nil
level=level+1
sgame()
end
end
end
function fend()
if btnp(4) then
smenu()
end
end
-- <TILES>
-- 000:4444441144441101441111114411111141110111411111111101111111111111
-- 001:1144444411114444101111441111114411110114111111141101111111111111
-- 002:1111111111111101401111114111111144110111441111114444111144444411
-- 003:1111111111111101101111141111110411110144111111441101444411444444
-- 016:4444444444444414414444444444444444441444444444444414444444444444
-- 017:8888884488884414884444448844444484441444844444444414444444444444
-- 018:4488888844448888414444884444448844441448444444484414444444444444
-- 019:4444444444444414814444448444444484441444884444448888444488888844
-- 020:4444444444444414414444484444444844441488444444884414888844888888
-- 032:9999999999999949949999999999999999994999999999999949999999999999
-- 048:444444ee4444ee9e44eeeeee44eeeeee4eee9eee4eeeeeeeee9eeeeeeeeeeeee
-- 049:ee444444eeee4444e9eeee44eeeeee44eeee9ee4eeeeeee4ee9eeeeeeeeeeeee
-- 064:eeeeeeeeeeeeee9e49eeeeee4eeeeeee44ee9eee44eeeeee4444eeee444444ee
-- 065:eeeeeeeeeeeeee9ee9eeeee4eeeeeee4eeee9e44eeeeee44ee9ee444ee444444
-- 080:888888888dd88888888888888888888888888dd8888888888888888888dd8888
-- 081:888888888888888888dd888888888888888888888888dd888dd8888888888888
-- 208:5bfbbbbb5bbbbbbb05bbbbbb005bbbbb005bbbbb05bbbbbb5bffbbbb5bfbbbbb
-- 209:bbbbbbb5bbbbbbb5bbbbbb50bbbbb500bbbbb500bbbbbb50bbbbbfb5bbbbbbb5
-- 210:0055550005bbbb505bffbbb55bfbbbb55bbbbbb55bbbbbb55bbbbbb55bfbbbb5
-- 211:0055555505bbbbbb5bffbbbf5bfbbbbb5bbbbbbb5bbbbbbb05bbbbbb00555555
-- 212:55555555bbbbbbbbffffffffbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb55555555
-- 213:55555500bbbbbb50fbbbbbb5bbbbbbb5bbbbbbb5bbbbbbb5bbbbbb5055555500
-- 224:0000055500055bbb005bbbbf05bffbbb05bfbbbb5bbbbbbb5bbbbbbb5bfbbbbb
-- 225:55500000bbb55000fbbbb500bbbbbb50bbbbbb50bbbbbbb5bbbbbbb5bbbbbbb5
-- 226:5bfbbbb55bfbbbb55bfbbbb55bfbbbb55bfbbbb55bfbbbb55bfbbbb55bfbbbb5
-- 227:55000055bb5005bbbbb55bffbbbbbbfbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
-- 240:5bfbbbbb5bbbbbbb5bbbbbbb05bbbbbb05bbbbbb005bbbbb00055bbb00000555
-- 241:bbbbbbb5bbbbbbb5bbbbbbb5bbbbbb50bbbbbb50bbbbb500bbb5500055500000
-- 242:5bfbbbb55bbbbbb55bbbbbb55bbbbbb55bbbbbb55bbbbbb505bbbb5000555500
-- 243:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb55bbbbb5005bb55000055
-- </TILES>
-- <SPRITES>
-- 000:555555fe5555ffee555feeee55feeeee9999999955144ccc5114cf0c140ccf0c
-- 001:e9555555ee995555eeee9555eeeee95599999999ccc44155c0fc4115c0fcc041
-- 002:555555fe5555ffee555feeee55feeeee9999999955144ccc5114cccc140cc11c
-- 003:e9555555ee995555eeee9555eeeee95599999999ccc44155cccc4115c11cc041
-- 006:5555555555555555555555555555555555555555555555555555555555555555
-- 007:5555555555555555555555555555555555555555555555555555555555555555
-- 008:555555fe5555ffee555feeee55feeeee9999999955144ccc5514cf0c550ccf0c
-- 009:e9555555ee995555eeee9555eeeee95599999999ccc44155c0fc4155c0fcc055
-- 010:55555555555555fe5555ffee555feeee55feeeee9999999951144ccc1414cf0c
-- 011:55555555e9555555ee995555eeee9555eeeee95599999999ccc44115c0fc4141
-- 012:555555fe5555ffee555feeee55feeeee9999999955144ccc5514cf0c550ccf0c
-- 013:e9555555ee995555eeee9555eeeee95599999999ccc44155c0fc4155c0fcc055
-- 014:55555555555555fe5555ffee555feeee55feeeee9999999951144ccc1414cf0c
-- 015:55555555e9555555ee995555eeee9555eeeee95599999999ccc44115c0fc4141
-- 016:1410cccc1000ff990ccfffffcccfffffcc00ffff005088885550888555022225
-- 017:cccc014199ff0001fffffcc0fffffcccffff00cc888805005888055552222055
-- 018:1410cccc1000ff990ccfffffcccfffffcc00ffff005088885550888555022225
-- 019:cccc014199ff0001fffffcc0fffffcccffff00cc888805005888055552222055
-- 022:5555555555555555555555555555555555555555555555555555555555555555
-- 023:5555555555555555555555555555555555555555555555555555555555555555
-- 024:5140cccc5000ff990ccfffffcccfffffcc00ffff005088885550888555022225
-- 025:cccc041599ff0005fffffcc0fffffcccffff00cc888805005888055552222055
-- 026:140ccf0c1410cccc5100ff9950cfffff50cf22ff550222285502222555502205
-- 027:c0fcc041cccc014199fff015fffccf05ffcccc0588ccc0555222055555555555
-- 028:5140cccc5000ff990ccfffffcccfffffcc00ffff005088885550888555022225
-- 029:cccc041599ff0005fffffcc0fffffcccffff00cc888805005888055552222055
-- 030:140ccf0c1410cccc510fff9950fccfff50ccccff550ccc885550222555555555
-- 031:c0fcc041cccc014199ff0015fffffc05ff22fc05822220555222205550220555
-- 032:55555555555555fe5555ffee555feeee55feeeee999999995514ccc4551c0fcc
-- 033:55555555e9555555ee995555eeee9555eeeee955999999994444415544444155
-- 034:555555fe5555ffee555feeee55feeeee999999995514ccc4551c0fcc51cc0fcc
-- 035:e9555555ee995555eeee9555eeeee955999999994444415544444155c4444055
-- 036:55555555555555fe5555ffee555feeee55feeeee999999995514ccc4551c0fcc
-- 037:55555555e9555555ee995555eeee9555eeeee955999999994444415544444155
-- 038:555555fe5555ffee555feeee55feeeee999999995514ccc4551c0fcc51cc0fcc
-- 039:e9555555ee995555eeee9555eeeee955999999994444415544444155c4444055
-- 040:555555fe5555ffee555feeee55feeeee99999999551444445514444455014444
-- 041:e9555555ee995555eeee9555eeeee95599999999144441551444415514441055
-- 042:55555555555555fe5555ffee555feeee55feeeee999999995114444414414444
-- 043:55555555e9555555ee995555eeee9555eeeee955999999991444411514441441
-- 044:555555fe5555ffee555feeee55feeeee99999999551444445514444455014444
-- 045:e9555555ee995555eeee9555eeeee95599999999144441551444415514441055
-- 046:55555555555555fe5555ffee555feeee55feeeee999999995114444414414444
-- 047:55555555e9555555ee995555eeee9555eeeee955999999991444411514441441
-- 048:51cc0fcc5550cccc555599ff5550cccf5500ccc9502228885502200855502550
-- 049:c4444055cc440415ffff01419ffff041fffff011888820558882205500222555
-- 050:5550cccc555599ff5550ffcc5550fccc5550fccc555550885555508855550222
-- 051:cc440415ffff0415f9fff4159ffff415ffff0115888805558800555522055555
-- 052:51cc0fcc5550cccc555599ff5550ffff5500fff9502288885502288855502000
-- 053:c4444055cc440415ff9f0141cccff041cccff0118cc220552222205555022555
-- 054:5550cccc555599ff5550ffcc5550fccc5550fccc555550885555508855550222
-- 055:cc440415ffff0415f9fff4159ffff415ffff0115888805558800555522055555
-- 056:5140c4445140ff99014fffffc1cfffffcc00ffff005088885550888555022225
-- 057:444c041599ff0415fffff410fffffc1cffff00cc888805005888055552222055
-- 058:144144441410c4445100ff9950cfffff50cf22ff550222285502222555502205
-- 059:14441441444c014199fff015fffccf05fffccc05888880555222055555555555
-- 060:5140c4445140ff99014fffffc1cfffffcc00ffff005088885550888555022225
-- 061:444c041599ff0415fffff410fffffc1cffff00cc888805005888055552222055
-- 062:144144441410c444510fff9950fccfff50cccfff550888885550222555555555
-- 063:14441441444c014199ff0015fffffc05ff22fc05822220555222205550220555
-- 064:8888888888888888888888888888888888888888888888888888888888888888
-- 065:8888888888888888888888888888888888888888888888888888888888888888
-- 066:8888888888888888888888888888888888888888888888888888888888888888
-- 067:8888888888888888888888888888888888888888888888888888888888888888
-- 068:8888888888888888888888888888888888888888888888888888888888888888
-- 069:8888888888888888888888888888888888888888888888888888888888888888
-- 070:8888888888888888888888888888888888888888888888888888888888888888
-- 071:8888888888888888888888888888888888888888888888888888888888888888
-- 072:88888b8888888bb8888888bb888888bb8888885b8888888b88bbb885885bbb85
-- 073:888888888888888888888888b8888888b8888888588888888888888888888888
-- 074:8888888b888888b5888888b5888888bb888888bb8888888b888bb88888bbbb88
-- 075:8888888888888888888888888888888858888888588888885888888858888888
-- 076:0000000000000000000000000000066500006c550006cc560006c66600066666
-- 077:0000000000000000000000005660000056660000656660006666600066646000
-- 078:00000000000000000000000000000fff0000fc55000fcc56000fc666000f6666
-- 079:000000000000000000000000fff00000566f00006566f0006666f0006664f000
-- 080:888888888888888888888fff88888fbb88888fe4888888ee888888f48888888f
-- 081:888888888888888888888888ff888888b4f88888e4f8888844f88888ff888888
-- 082:888888888888888888888bbb88888ebb88888ee4888888ee888888e48888888e
-- 083:888888888888888888888888bb888888b4b88888e44888884448888844888888
-- 084:88888888888bb888888bbb888888bbb888885bb5888885558888888588888888
-- 085:88888888888888888b588888b588888858888888888888888888888888888888
-- 086:8888888888888888888bb888888bbb888885bbb8888855558888888588888888
-- 087:888888888888888888b888888b588888b5888888588888888888888888888888
-- 088:8885bb8588885555888888558888888588888885888888858888855588888858
-- 089:888bbb8888bbb5888bb558885558888858888888888888885588888888588888
-- 090:8858558588888555888888858888888588888885888888858888855588888858
-- 091:58888888888bbb888bbbb5885555588858888888888888885588888888588888
-- 092:0006666600006666000006660000006600000000000000000000000000000000
-- 093:6664600066460000446000006600000000000000000000000000000000000000
-- 094:000f66660000f66600000f66000000ff00000000000000000000000000000000
-- 095:6664f000664f000044f00000ff00000000000000000000000000000000000000
-- 096:8888888888888888888888888888888888888888888888888888888888888888
-- 097:8888888888888888888888888888888888888888888888888888888888888888
-- 098:8888888888888888888888888888888888888888888888888888888888888888
-- 099:8888888888888888888888888888888888888888888888888888888888888888
-- 100:8888888888888888888888888888888888888888888888888888888888888888
-- 101:8888888888888888888888888888888888888888888888888888888888888888
-- 102:8888888888888888888888888888888888888888888888888888888888888888
-- 103:8888888888888888888888888888888888888888888888888888888888888888
-- 112:8888888888888888880088888880448888880000888880048880088888888888
-- 113:8888888888844088888400888840888880088888004888888000888880880088
-- 114:8888888888888888880088888880448888880000888880048880088888888888
-- 115:8888888888844088888400888840888880088888004888888000888880880088
-- 116:888888888888888888888fff88888f9988888fc6888888cc888888f68888888f
-- 117:888888888888888888888888ff88888896f88888c6f8888866f88888ff888888
-- 118:88888888888888888888899988888c9988888cc6888888cc888888c68888888c
-- 119:8888888888888888888888889988888896988888c66888886668888866888888
-- 132:8888888888888888888888888888888888888888888888888888888888888888
-- 133:8888888888888888888888888888888888888888888888888888888888888888
-- 134:8888888888888888888888888888888888888888888888888888888888888888
-- 135:8888888888888888888888888888888888888888888888888888888888888888
-- 136:8888888888888888888888b88888885b88888b8b88b8b5bb8c5b588988b5b88c
-- 137:888888888b888888b588888858888888cb8bb888b59c5b88b9bb88889885b888
-- 138:888888888888888888888b8b888885b58888b8bc88885bbb88b8889b8c5b88c9
-- 139:88888888b88888885888888888bb8888b9c5b8888bb88888998888888885bb88
-- 140:000000000000000000000b00000005bb000000550000cc99000cccc9000cccc9
-- 141:00000000000000000000000000000000500000005cc90000cccc9000cccc9000
-- 142:000000000000000000000f0000000fff000000f50000ff99000fccc9000fccc9
-- 143:00000000000000000000000000000000f00000005fff0000ccccf000ccccf000
-- 148:88888888888bb888888bbb888888bbb888885bb5888885558888888588888888
-- 149:88888888888888888b588888b588888858888888888888888888888888888888
-- 150:8888888888888888888bb888888bbb888885bbb8888855558888888588888888
-- 151:888888888888888888b888888b588888b5888888588888888888888888888888
-- 152:8b598889b58bbc9988b58b9988b88b8988888889888888898888899988888898
-- 153:8889c8888cb9bb888b5bb5b89b9b5b8898b58b88888888889988888888988888
-- 154:88b58889bb59bc998b588b9988888b8988888889888888898888899988888898
-- 155:888cb8588cbb5b88b5b5b888b9b8b8888b588888888888889988888888988888
-- 156:000ccccc000ccccc000ccccc00009ccc00000999000000660000000000000000
-- 157:cccc6000cccc6000ccc96000cc96000099600000660000000000000000000000
-- 158:000fcccc000fcccc000fcccc0000fccc00000f99000000ff0000000000000000
-- 159:ccccf000ccccf000ccc9f000cc9f000099f00000ff0000000000000000000000
-- 170:55555555555555555555500055550666555066665506666d5506666d550666dd
-- 171:55555555555555550000555566660555d6666055d6666605dd666605ddd66605
-- 172:55555555555555555555500055550999555099995509999d5509999d550999dd
-- 173:55555555555555550000555599990555d9999055d9999905dd999905ddd99905
-- 174:55555555555555555555500055550fff5550ffff550ffffd550ffffd550fffdd
-- 175:555555555555555500005555ffff0555dffff055dfffff05ddffff05dddfff05
-- 186:550666dd550666dd5550666d5555066655555066555550665555506055555505
-- 187:dfd66605ffd66605dd6660556666055560005555055555555555555555555555
-- 188:550999dd550999dd5550999d5555099955555099555550995555509055555505
-- 189:dfd99905ffd99905dd9990559999055590005555055555555555555555555555
-- 190:550fffdd550fffdd5550fffd55550fff555550ff555550ff555550f055555505
-- 191:dfdfff05ffdfff05ddfff055ffff0555f0005555055555555555555555555555
-- 204:5555555555555550555555005555550e55555500555555005550000055000000
-- 205:5555555500555555e00555550e005555e0555555005555550000055500000055
-- 206:555555555555555555555550555555005555550e500555000000050050000000
-- 207:555555555555555500555555e00555550e005555e05550050050000000000005
-- 220:5000000000055000005500000550505555550505555555555555555555555555
-- 221:0005000500555000005555005055555005055555555555555555555555555555
-- 222:5550000055550000555550005550000055555055555505055555555555555555