This repository has been archived by the owner on Nov 16, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
barrelforce1_3.lk12
1273 lines (1057 loc) · 85.7 KB
/
barrelforce1_3.lk12
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
LK12;OSData;DiskOS;DiskGame;V3;192x128;C:none;CLvl:0;
___luacode___
-- heli sound
--ply fall on lost
--THEN
--sparkle on map regenerate
-- heli pickup on restore lvl
-- sparkle on restore lvl
-- restore msg
--todo falling jewel
-- falling exploding crate
--60 secs limit
--boundaries
--chain crates explosion before fall
--ennemies just destructible with
--crates ?
--fall with rotation when dead
--explosion when timer 0 ?
-- non interactive player state when
--death spin or helico
function onemininit()
time=60000
msg="1 MIN GO FOR IT!"
currentlvl=initlvlnum
levels[currentlvl]()
end
function relaxinit()
time=600000
msg="let's do this relax"
currentlvl=initlvlnum
levels[currentlvl]()
end
nbtf=2
titlefuncs={
{
label="relax mode",
func=relaxinit
},
{
label="1 min fc jam 3",
func=onemininit
}
}
titcursor=1
audiotimer=0
function bulletaudio()
Audio.generate(5,800,1)
audiotimer=8
end
function blastaudio()
Audio.generate(5,200,1)
audiotimer=8
end
blastkills=true
maxjump=24
atimer=0
animstep=1
athreshold=12
rheli={10,11}
lply={73,74}
rply={1,49}
msg="dbg"
time=600000
mx=0
my=0
px=20
py=20
pr=0 --rotation for lose anim
fireinhib=0
facing="r"
maxlvl=6
initlvlnum=1
currentlvl=1
xhel=-1
yhel=-1
--global lvl ref
tw=14
th=14
lvlwdth=112
function copymap()
for j=0,th-1
do
for i=0,tw-1
do
TileMap:cell(i,j,
TileMap:cell(mx+i,my+j)
)
end
end
end
function globinit()
bullets={}
activeobjects={}
-- time=60000
fireinhib=0
facing="r"
copymap()
genply()
genexit()
xhel=0
yhel=py
dropfinished=false
plyfunc=plydrop
pr=0
end
function inilvl1()
mx=14
my=0
-- crossplosion(8,8)
-- crossplosion(4,4)
globinit()
end
function inilvl2()
mx=14
my=14
globinit()
end
function inilvl3()
mx=28
my=0
globinit()
end
function inilvl4()
mx=0
my=14
globinit()
end
function inilvl5()
mx=28
my=14
globinit()
end
function inilvl6()
mx=42
my=0
globinit()
end
levels={
inilvl1,
inilvl2,
inilvl3,
inilvl4,
inilvl5,
inilvl6
}
-- levels[currentlvl]()
--global lvl ref
--tw=14
--th=14
--lvlwdth=128
function genexit()
for i=0,14 do
for j=0,14 do
if TileMap:cell(i,j)==radio.tile then
createradio(i*8,j*8)
TileMap:cell(i,j,0)
end
end
end
end
function genply()
for i=0,14 do
for j=0,14 do
if TileMap:cell(i,j)==1 then
--createradio(
px=i*8
py=j*8
TileMap:cell(i,j,0)
end
end
end
end
reffireinhib=16
--print(TileMap:cell(1,7))
--true if wall coll
function lefttile(x,y)
for i=0,7
do
local tlx=math.floor(x/8)
local tly=math.floor((y+i)/8)
if TileMap:cell(tlx,tly)~=0 then
return true
end
end
return false
end
--returns true if not 0 tile
--below ply foot
function foottile(x,y)
pfy=y+8
for i=0,7
do
tlx=math.floor((x+i)/8)
tly=math.floor(pfy/8)
tln = TileMap:cell(tlx,tly)
if tln~=0 then
return true
end
end
return false
end
--returns true if not 0 tile
--above ply head
function headtile(x,y)
pfy=y-1
for i=0,7
do
tlx=math.floor((x+i)/8)
tly=math.floor(pfy/8)
tln = TileMap:cell(tlx,tly)
if tln~=0 then
return true
end
end
return false
end
bullets={}
function createbullet(x,y)
b={}
b.x=x
b.y=y
if facing=="r" then
b.vx=1
end
if facing=="l" then
b.vx=-1
end
table.insert(bullets,b)
end
function movebullets()
for i,b in ipairs(bullets)
do
b.x=b.x+b.vx
if b.x>lvlwdth or b.x<0 then
table.remove(bullets,i)
end
--check tile coll
local tlx,tly,tln
tlx=math.floor(b.x/8)
tly=math.floor(b.y/8)
tln=TileMap:cell(tlx,tly)
-- msg=tln
if tln~=0 then
TileMap:cell(tlx,tly,0)
table.remove(bullets,i)
--if active tile, trigger
--(crates);;
if tln == crate.tile then
crossplosion(tlx,tly)
end
end
end
end
--for all states
function handlefire()
if (btn(5) ) and fireinhib==0 then
createbullet(px,py)
fireinhib=reffireinhib
bulletaudio()
end
if btn(7) then
--resetting level
stopaudio()
levels[currentlvl]()
return
end
end
function plywalk()
handlefire()
--if bottom of square not on tile;
--fall
if foottile(px,py) then
--ok
else
plyfunc=plyfall
end
tx=px
ty=py
if btn(2) then
facing="r"
tx=tx+1
end
if btn(1) then
facing="l"
tx=tx-1
end
if btn(6) then
--todo instant validation and state trans
-- py=py-16
-- plyfunc=plyfall
jumptimer=maxjump
plyfunc=plyjump
return
end
-- py=ty
-- px=tx
--if side collides, no further
if lefttile(tx,ty) or lefttile(tx+7,ty) then
return
end
py=ty
px=tx
--if jump; in hte air then fall
end
function coll88(x1,y1,x2,y2)
return collwh(x1,y1,1,x2,y2,1)
end
function collwh(x1,y1,wh1,x2,y2,wh2)
if
(
((x2<=x1+wh1*8)and(x2>=x1))
or
((x1<=x2+wh2*8)and(x1>=x2))
)
and
(
((y2<=y1+wh1*8)and(y2>=y1))
or
((y1<=y2+wh2*8)and(y1>=y2))
)
then
return true
end
return false
end
function plyjump()
handlefire()
jumptimer=jumptimer-1
if jumptimer<=0 then
plyfunc=plyfall
return
end
if headtile(px,py) then
plyfunc=plyfall
return
end
tx=px
ty=py
--you can left right if side allows
ty=ty-1
py=ty
--we can go up;
--now test sidemove
if btn(2) then
facing="r"
tx=tx+1
end
if btn(1) then
facing="l"
tx=tx-1
end
--if side collides, no further
if lefttile(tx,py) or lefttile(tx+7,py) then
return
end
--if here side move was possible
px=tx
end
function plyfall()
handlefire()
if foottile(px,py) then
plyfunc=plywalk
return
end
tx=px
ty=py
--you can left right if side allows
ty=ty+1
--if touch ground go to wqlk
py=ty
--we can fall;
--now test sidemove
if btn(2) then
facing="r"
tx=tx+1
end
if btn(1) then
facing="l"
tx=tx-1
end
--if side collides, no further
if lefttile(tx,py) or lefttile(tx+7,py) then
return
end
--if here side move was possible
px=tx
end
--heli is init on the row
--x+ until ply reached
function plypickup()
xhel=xhel+3
if xhel>=px then
px=-10
end
if xhel>128 then
pickupfinished=true
end
if(pickupfinished) then
nextlevel()
end
end
function plydrop()
xhel=xhel+3
if xhel>px then
dropfinished=true
msg="dbg d f "
end
if(dropfinished) then
plyfunc=plywalk
createstraj(xhel,yhel,1,-1,rheli)
yhel=-10
xhel=-10
end
end
function plylost()
pr=pr+math.pi/10
py=py+2
if py>128 then
levels[currentlvl]()
end
end
plyfunc=plywalk
--simple traj event,
--TODO pb how to replace pic call
-- by function
function bstraj(idx,ao)
ao.x=ao.x+ao.vx
ao.y=ao.y+ao.vy
if ao.x<0 or ao.x>128 then
table.remove(activeobjects,idx)
end
if ao.y<0 or ao.y>128 then
table.remove(activeobjects,idx)
end
end
function createstraj(x,y,vx,vy,pics)
ao={}
ao.x=x
ao.y=y
ao.vx=vx
ao.vy=vy
ao.pics=pics
ao.pic=pics[animstep]
ao.behavior=bstraj
table.insert(activeobjects,ao)
end
--when certain tiles have nothing
--below we transition them to active
--objects, that have behavior
--when they touch below
function bcrate(idx,ao)
--TODO behavior of falling crate !
if foottile(ao.x,ao.y) then
--boom
crossplosion(
math.floor(ao.x/8),
math.floor(ao.y/8)
)
table.remove(activeobjects,idx)
return
end
-- we continue falling
ao.y=ao.y+1
end
function crossplosion(tx,ty)
-- msg="cross "..tx.." "..ty --..timer
--we set tile numbers to 0
--chqin reaction
--preseting tile sett to avoid
--stack overflow
if TileMap:cell(tx+1,ty)==crate.tile then
TileMap:cell(tx+1,ty,0)
crossplosion(tx+1,ty)
-- TileMap:cell(mx+tx+1,my+ty,0)
end
if TileMap:cell(tx-1,ty)==crate.tile then
TileMap:cell(tx-1,ty,0)
crossplosion(tx-1,ty)
-- TileMap:cell(mx+tx+1,my+ty,0)
end
if TileMap:cell(tx,ty+1)==crate.tile then
TileMap:cell(tx,ty+1,0)
crossplosion(tx,ty+1)
end
--we set tile numbers to 0
TileMap:cell(tx+1,ty,0)
TileMap:cell(tx-1,ty,0)
TileMap:cell(tx,ty+1,0)
--to do pretty qctive objects
--( that hurt player )
createblast(tx*8,ty*8)
createblast((tx+1)*8,ty*8)
createblast((tx-1)*8,ty*8)
createblast(tx*8,(ty+1)*8)
end
function createblast(x,y)
blastaudio()
-- msg="blast"
ao={}
ao.x=x
ao.y=y
ao.timer=30
ao.pic=blast.tile
ao.behavior=bblast
table.insert(activeobjects,ao)
end
function bblast(idx,ao)
-- msg="blast tick"
ao.timer=ao.timer-1
if ao.timer==0 then
table.remove(activeobjects,idx)
end
if blastkills and coll88(px,py,ao.x,ao.y) then
-- levels[currentlvl]()
plyfunc=plylost
msg="blasted!!"
stopaudio()
end
end
function createradio(x,y)
ao={}
ao.x=x
ao.y=y
ao.behavior=bradio
ao.pic=radio.tile
table.insert(activeobjects,ao)
end
--TODO small helicopter
function triggernxtlvlanim()
pickupfinished=false
xhel=0
yhel=py
--Todo refac trigger ply stqte change
--on end of heli anim we trigger next level
--helix
plyfunc=plypickup
end
function nextlevel()
currentlvl=currentlvl+1
msg="dbg"
if currentlvl>maxlvl then
updatefunc=updategameover
drawfunc=drawgameover
gopic=3
gomsg="WON "..math.floor(time).." secs left"
stopaudio()
return
end
levels[currentlvl]()
-- plyfunc=plywalk
end
function bradio(idx,ao)
if coll88(ao.x,ao.y,px,py)
and plyfunc~=plypickup then
msg="next level"
triggernxtlvlanim()
end
end
crate={
tile=4,
behavior=bcrate
}
--not sure necessary for blast
blast={
tile=26,
behavior=bblast
}
radio={
tile=5,
behavior=bradio
}
activetiles={crate}
activeobjects={}
function stopaudio()
Audio.generate()
end
function activateifpossible(tx,ty,tn)
local factory=nil
for i,at in ipairs(activetiles)
do
if at.tile==tn then
factory=at.behavior
break
end
end
if factory~=nil then
--todo spawn active
TileMap:cell(tx,ty,0)
ao={}
ao.x=tx*8
ao.y=ty*8
ao.behavior=factory
ao.pic=crate.tile
table.insert(activeobjects,ao)
end
end
function gravity()
--TODO cycle map
--if tile with nothing below,
--we create active object with behavior
for j=0,(th-1) do
for i=0,(tw-1) do
--if cell has nothing below,
-- it might fall
local tcur =TileMap:cell(i,j)
local tnxt =TileMap:cell(i,j+1)
-- local tnxt=
if tcur~=0 and tnxt==0 then
--we have a tile over some void
activateifpossible(i,j,tcur)
end
end
end
end
function tickactiveobjects()
-- make crates fall and explode
for i,a in ipairs(activeobjects)
do
-- Sprite(25,b.x,b.y)
a.behavior(i,a)
end
end
--todo put in level init
--genexit()
function updategame()
audiotimer = audiotimer-1
if audiotimer<=0 then
stopaudio()
end
if time<=0 then
gopic=26
gomsg="out of time! game over"
updatefunc=updategameover
drawfunc=drawgameover
stopaudio()
end
atimer=atimer+1
if atimer>=12 then
atimer =0
if animstep==1 then
animstep=2
else
animstep=1
end
end
time=time-17
if fireinhib>0 then
fireinhib=fireinhib-1
end
gravity()
tickactiveobjects()
movebullets()
plyfunc()
end
function drawgame()
clear()
map(0,0,0,0,tw,th)
if facing=="r" then
Sprite(rply[animstep],px,py,pr)
else
Sprite(lply[animstep],px,py,pr)
end
for i,b in ipairs(bullets)
do
Sprite(25,b.x,b.y)
end
--heli
if xhel>0 and yhel>0 then
Sprite(rheli[animstep],xhel,yhel)
end
for i,b in ipairs(activeobjects)
do
Sprite(b.pic,b.x,b.y)
end
color(8)
print("Barrel Force",120,8)
color(6)
Sprite(6,120,24,0,2,2)
print(time,140,32)
print(msg,128,64)
end
function drawtitle()
clear()
Sprite(1,16,0,0,4,4)
Sprite(25,96,0,0,4,4)
Sprite(26,128,0,0,4,4)
Sprite(4,160,0,0,4,4)
color(8)
print("Barrel Force",
0,40,false,false,0,3,3)
print(titlefuncs[titcursor].label,48 ,64 )
color(6)
print("go to the radio",16,80)
print("firing on barrels explodes",16,96)
print("down resets level",16,112)
end
function updatetitle()
if btn(5) or btn(6) then
titlefuncs[titcursor].func()
drawfunc=drawgame
updatefunc=updategame
end
if btn(4) then
titcursor=titcursor+1
if titcursor>nbtf then
titcursor=1
end
end
end
gomsg="gomsg"
function updategameover()
if btn(4) then
updatefunc=updatetitle
drawfunc=drawtitle
return
end
end
gopic=1
function drawgameover()
clear()
Sprite(gopic,96,32,0,3,3)
print(gomsg,64,64)
end
drawfunc=drawtitle
updatefunc=updatetitle
function _update()
updatefunc()
end
function _draw()
drawfunc()
end
___spritesheet___
LK12;GPUIMG;192x128;
00000000888888880000000077766661000007000000000A000003000000000000BB3300777777770066660000000000000000000000000000000000000000000000000000000000006660000000000000000000000000000000000000000000
0055500099989998000000009988888800000600000000603333333000BB330000333300000300000003000000000000000000000000000000000000000000000000000000000000060000000066660000600000006660000066660000060000
0055F00099989998000000009777778800DD11100009E6060000333000333300008383000663BBBB0663BBBB00000000000000000000000000000000000000000000000000000000060000000060000000606000000006000060060000660000
00FFF0068888888800BBBB009707078E00DB331000988E000BBBBBB0008383003055550366C3350066C3350000000000000000000000000000000000000000000000000000000000066660000060000000606000000006000060060006060000
88888777899989990BABBAB09777778E00D3331009888E0A0C1C1C1000555500030B30306CC350006CC3500000000000000000000000000000000000000000000000000000000000060006000006660000066600006660000000600000060000
F08888F08999899903BAAB30887878EE00D111109888E00017F7F7FC030B303000033000CC335000CC33500000000000000000000000000000000000000000000000000000000000060006000000060000006000000006000006000000060000
00CCC0608888888800BBBB00888888EE001D1D10998E00A0CFFFFFF13003300300055000035500000355000000000000000000000000000000000000000000000000000000000000060006000000060000006000000006000066660000666000
0C000C009998999800033000766661110011011099E0000001C1C1C00050050000055000B000B000B000B00000000000000000444444000000000000000000000000000000000000006660000066600000000000006660000000000000000000
000000000999099009000000000000000000000000000000000000000000000000000000000000000000000000000000000004444444000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000009AAA9AA99A900000090000000000000000000000000000000000000000000000000000000000000000000000000044444444000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0009A0009AAAAAA9090009009A900090000000000000000000000000000000000000000000000000000000000000000000004444444F000060000000000000000000000000000000000000000000000000000000000000000000000000000000
0097AA000AAAAAA900009A90090009A900000000000000000000000000000000000000000000000000000000000000000000444FFFFF000660000000000000000000000000000000000000000000000000000000000000000000000000000000
000AA0000AAAAAA0000009000009009000000000000000000000000000000000000000000000000000000000000000000000444FFFFF000666000000000000000000000000000000000000000000000000000000000000000000000000000000
000000009AAAAA9000900000009A90000000000000000000000000000000000000000000000000000000000000000000000044FFFFF0777777000000666666000000000000000000000000000000000000000000000000000000000000000000
000000009AA9AAA009A90000000900000000000000000000000000000000000000000000000000000000000000000000000088888887777770000066666666600000000000000000000000000000000000000000000000000000000000000000
0000000099009A900090000000000000000000000000000000000000000000000000000000000000000000000000000000088888888FFFF000000088888888800000000000000000000000000000000000000000000000000000000000000000
00555000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000088888888FFFF000000088888888800000000000000000000000000000000000000000000000000000000000000000
0055F000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000088888888FF00000000087777778800000000000000000000000000000000000000000000000000000000000000000
00FFF0060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000888888880000000000077777778800000000000000000000000000000000000000000000000000000000000000000
088887770000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000888888880000000000077877878800000000000000000000000000000000000000000000000000000000000000000
088888F00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000888888880000000000067677676800000000000000000000000000000000000000000000000000000000000000000
0FCCC0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000888888880000000000087777778800000000000000000000000000000000000000000000000000000000000000000
00C0C0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000CCCCCCCC0000000000087777788800000000000000000000000000000000000000000000000000000000000000000
00C0C0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000CCCCCCCC0000000000087777788800000000000000000000000000000000000000000000000000000000000000000
000000000005550000000000000000000000000000000000000000000000000000000000000000000000000000000000000CCCCCCCC0000000000088777788800000000000000000000000000000000000000000000000000000000000000000
00055500000F55000000000000000000000000000000000000000000000000000000000000000000000000000000000000CCCCCCCCC0000000000088777788800000000000000000000000000000000000000000000000000000000000000000
000F5500600FFF000000000000000000000000000000000000000000000000000000000000000000000000000000000000CCCC0CCCCC000000000066666666600000000000000000000000000000000000000000000000000000000000000000
600FFF00777888800000000000000000000000000000000000000000000000000000000000000000000000000000000000CCC000CCCC000000000066666666000000000000000000000000000000000000000000000000000000000000000000
777888880F888880000000000000000000000000000000000000000000000000000000000000000000000000000000000CCC0000CCCC000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0F88880F000CCCF0000000000000000000000000000000000000000000000000000000000000000000000000000000000CCC00000CCC000000000000000000000000000000000000000000000000000000000000000000000000000000000000
060CCC00000C0C000000000000000000000000000000000000000000000000000000000000000000000000000000000000CC000000C0000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00C000C0000C0C0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000