-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtetris.ros
executable file
·4056 lines (3958 loc) · 116 KB
/
tetris.ros
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
$BUFSIZE 24
$MAXINT 511
$RANDMAX 63
$AVAIL_CHARS ABCDEF0123456789
$RAMSIZE 512
$NUM_KEYINPUT 5
$NUM_KEYINPUT_CALLS 4096
disp_start = 10
width = 24
height = 20
width_p1 = width + 1
max_int = 511
# 20 tall, 24 wide, 10 spare, dirty bit
# returns position of first char in ram
def int_to_string(value, min_char):
i = 0
while:
ram[i] = 0
i = i + 1
if ( i == 10 ):
break
work = value
i = 8
chars = 0
while:
div = work / 10
mod = work - div * 10
ram[i] = mod + '0'
chars = chars + 1
work = div
if ( work == 0 ):
if ( chars >= min_char ):
break
i = i - 1
return i
def print_int(value, off, min_char):
ram_pos = int_to_string(value, min_char)
while:
if ( ram[ram_pos] == 0 ):
return off
off = big_print(ram[ram_pos], off)
ram_pos = ram_pos + 1
def display():
save("buf_save")
if ( @buf_ram_10 == 1 ):
@buf_ram_10 = 0
load("buf_save")
buf[0] = @buf_ram_11
buf[1] = @buf_ram_12
buf[2] = @buf_ram_13
buf[3] = @buf_ram_14
buf[4] = @buf_ram_15
buf[5] = @buf_ram_16
buf[6] = @buf_ram_17
buf[7] = @buf_ram_18
buf[8] = @buf_ram_19
buf[9] = @buf_ram_20
buf[10] = @buf_ram_21
buf[11] = @buf_ram_22
buf[12] = @buf_ram_23
buf[13] = @buf_ram_24
buf[14] = @buf_ram_25
buf[15] = @buf_ram_26
buf[16] = @buf_ram_27
buf[17] = @buf_ram_28
buf[18] = @buf_ram_29
buf[19] = @buf_ram_30
buf[20] = @buf_ram_31
buf[21] = @buf_ram_32
buf[22] = @buf_ram_33
buf[23] = @buf_ram_34
save("display_0")
save("buf_save")
if ( @buf_ram_35 == 1 ):
@buf_ram_35 = 0
load("buf_save")
buf[0] = @buf_ram_36
buf[1] = @buf_ram_37
buf[2] = @buf_ram_38
buf[3] = @buf_ram_39
buf[4] = @buf_ram_40
buf[5] = @buf_ram_41
buf[6] = @buf_ram_42
buf[7] = @buf_ram_43
buf[8] = @buf_ram_44
buf[9] = @buf_ram_45
buf[10] = @buf_ram_46
buf[11] = @buf_ram_47
buf[12] = @buf_ram_48
buf[13] = @buf_ram_49
buf[14] = @buf_ram_50
buf[15] = @buf_ram_51
buf[16] = @buf_ram_52
buf[17] = @buf_ram_53
buf[18] = @buf_ram_54
buf[19] = @buf_ram_55
buf[20] = @buf_ram_56
buf[21] = @buf_ram_57
buf[22] = @buf_ram_58
buf[23] = @buf_ram_59
save("display_1")
save("buf_save")
if ( @buf_ram_60 == 1 ):
@buf_ram_60 = 0
load("buf_save")
buf[0] = @buf_ram_61
buf[1] = @buf_ram_62
buf[2] = @buf_ram_63
buf[3] = @buf_ram_64
buf[4] = @buf_ram_65
buf[5] = @buf_ram_66
buf[6] = @buf_ram_67
buf[7] = @buf_ram_68
buf[8] = @buf_ram_69
buf[9] = @buf_ram_70
buf[10] = @buf_ram_71
buf[11] = @buf_ram_72
buf[12] = @buf_ram_73
buf[13] = @buf_ram_74
buf[14] = @buf_ram_75
buf[15] = @buf_ram_76
buf[16] = @buf_ram_77
buf[17] = @buf_ram_78
buf[18] = @buf_ram_79
buf[19] = @buf_ram_80
buf[20] = @buf_ram_81
buf[21] = @buf_ram_82
buf[22] = @buf_ram_83
buf[23] = @buf_ram_84
save("display_2")
save("buf_save")
if ( @buf_ram_85 == 1 ):
@buf_ram_85 = 0
load("buf_save")
buf[0] = @buf_ram_86
buf[1] = @buf_ram_87
buf[2] = @buf_ram_88
buf[3] = @buf_ram_89
buf[4] = @buf_ram_90
buf[5] = @buf_ram_91
buf[6] = @buf_ram_92
buf[7] = @buf_ram_93
buf[8] = @buf_ram_94
buf[9] = @buf_ram_95
buf[10] = @buf_ram_96
buf[11] = @buf_ram_97
buf[12] = @buf_ram_98
buf[13] = @buf_ram_99
buf[14] = @buf_ram_100
buf[15] = @buf_ram_101
buf[16] = @buf_ram_102
buf[17] = @buf_ram_103
buf[18] = @buf_ram_104
buf[19] = @buf_ram_105
buf[20] = @buf_ram_106
buf[21] = @buf_ram_107
buf[22] = @buf_ram_108
buf[23] = @buf_ram_109
save("display_3")
save("buf_save")
if ( @buf_ram_110 == 1 ):
@buf_ram_110 = 0
load("buf_save")
buf[0] = @buf_ram_111
buf[1] = @buf_ram_112
buf[2] = @buf_ram_113
buf[3] = @buf_ram_114
buf[4] = @buf_ram_115
buf[5] = @buf_ram_116
buf[6] = @buf_ram_117
buf[7] = @buf_ram_118
buf[8] = @buf_ram_119
buf[9] = @buf_ram_120
buf[10] = @buf_ram_121
buf[11] = @buf_ram_122
buf[12] = @buf_ram_123
buf[13] = @buf_ram_124
buf[14] = @buf_ram_125
buf[15] = @buf_ram_126
buf[16] = @buf_ram_127
buf[17] = @buf_ram_128
buf[18] = @buf_ram_129
buf[19] = @buf_ram_130
buf[20] = @buf_ram_131
buf[21] = @buf_ram_132
buf[22] = @buf_ram_133
buf[23] = @buf_ram_134
save("display_4")
save("buf_save")
if ( @buf_ram_135 == 1 ):
@buf_ram_135 = 0
load("buf_save")
buf[0] = @buf_ram_136
buf[1] = @buf_ram_137
buf[2] = @buf_ram_138
buf[3] = @buf_ram_139
buf[4] = @buf_ram_140
buf[5] = @buf_ram_141
buf[6] = @buf_ram_142
buf[7] = @buf_ram_143
buf[8] = @buf_ram_144
buf[9] = @buf_ram_145
buf[10] = @buf_ram_146
buf[11] = @buf_ram_147
buf[12] = @buf_ram_148
buf[13] = @buf_ram_149
buf[14] = @buf_ram_150
buf[15] = @buf_ram_151
buf[16] = @buf_ram_152
buf[17] = @buf_ram_153
buf[18] = @buf_ram_154
buf[19] = @buf_ram_155
buf[20] = @buf_ram_156
buf[21] = @buf_ram_157
buf[22] = @buf_ram_158
buf[23] = @buf_ram_159
save("display_5")
save("buf_save")
if ( @buf_ram_160 == 1 ):
@buf_ram_160 = 0
load("buf_save")
buf[0] = @buf_ram_161
buf[1] = @buf_ram_162
buf[2] = @buf_ram_163
buf[3] = @buf_ram_164
buf[4] = @buf_ram_165
buf[5] = @buf_ram_166
buf[6] = @buf_ram_167
buf[7] = @buf_ram_168
buf[8] = @buf_ram_169
buf[9] = @buf_ram_170
buf[10] = @buf_ram_171
buf[11] = @buf_ram_172
buf[12] = @buf_ram_173
buf[13] = @buf_ram_174
buf[14] = @buf_ram_175
buf[15] = @buf_ram_176
buf[16] = @buf_ram_177
buf[17] = @buf_ram_178
buf[18] = @buf_ram_179
buf[19] = @buf_ram_180
buf[20] = @buf_ram_181
buf[21] = @buf_ram_182
buf[22] = @buf_ram_183
buf[23] = @buf_ram_184
save("display_6")
save("buf_save")
if ( @buf_ram_185 == 1 ):
@buf_ram_185 = 0
load("buf_save")
buf[0] = @buf_ram_186
buf[1] = @buf_ram_187
buf[2] = @buf_ram_188
buf[3] = @buf_ram_189
buf[4] = @buf_ram_190
buf[5] = @buf_ram_191
buf[6] = @buf_ram_192
buf[7] = @buf_ram_193
buf[8] = @buf_ram_194
buf[9] = @buf_ram_195
buf[10] = @buf_ram_196
buf[11] = @buf_ram_197
buf[12] = @buf_ram_198
buf[13] = @buf_ram_199
buf[14] = @buf_ram_200
buf[15] = @buf_ram_201
buf[16] = @buf_ram_202
buf[17] = @buf_ram_203
buf[18] = @buf_ram_204
buf[19] = @buf_ram_205
buf[20] = @buf_ram_206
buf[21] = @buf_ram_207
buf[22] = @buf_ram_208
buf[23] = @buf_ram_209
save("display_7")
save("buf_save")
if ( @buf_ram_210 == 1 ):
@buf_ram_210 = 0
load("buf_save")
buf[0] = @buf_ram_211
buf[1] = @buf_ram_212
buf[2] = @buf_ram_213
buf[3] = @buf_ram_214
buf[4] = @buf_ram_215
buf[5] = @buf_ram_216
buf[6] = @buf_ram_217
buf[7] = @buf_ram_218
buf[8] = @buf_ram_219
buf[9] = @buf_ram_220
buf[10] = @buf_ram_221
buf[11] = @buf_ram_222
buf[12] = @buf_ram_223
buf[13] = @buf_ram_224
buf[14] = @buf_ram_225
buf[15] = @buf_ram_226
buf[16] = @buf_ram_227
buf[17] = @buf_ram_228
buf[18] = @buf_ram_229
buf[19] = @buf_ram_230
buf[20] = @buf_ram_231
buf[21] = @buf_ram_232
buf[22] = @buf_ram_233
buf[23] = @buf_ram_234
save("display_8")
save("buf_save")
if ( @buf_ram_235 == 1 ):
@buf_ram_235 = 0
load("buf_save")
buf[0] = @buf_ram_236
buf[1] = @buf_ram_237
buf[2] = @buf_ram_238
buf[3] = @buf_ram_239
buf[4] = @buf_ram_240
buf[5] = @buf_ram_241
buf[6] = @buf_ram_242
buf[7] = @buf_ram_243
buf[8] = @buf_ram_244
buf[9] = @buf_ram_245
buf[10] = @buf_ram_246
buf[11] = @buf_ram_247
buf[12] = @buf_ram_248
buf[13] = @buf_ram_249
buf[14] = @buf_ram_250
buf[15] = @buf_ram_251
buf[16] = @buf_ram_252
buf[17] = @buf_ram_253
buf[18] = @buf_ram_254
buf[19] = @buf_ram_255
buf[20] = @buf_ram_256
buf[21] = @buf_ram_257
buf[22] = @buf_ram_258
buf[23] = @buf_ram_259
save("display_9")
save("buf_save")
if ( @buf_ram_260 == 1 ):
@buf_ram_260 = 0
load("buf_save")
buf[0] = @buf_ram_261
buf[1] = @buf_ram_262
buf[2] = @buf_ram_263
buf[3] = @buf_ram_264
buf[4] = @buf_ram_265
buf[5] = @buf_ram_266
buf[6] = @buf_ram_267
buf[7] = @buf_ram_268
buf[8] = @buf_ram_269
buf[9] = @buf_ram_270
buf[10] = @buf_ram_271
buf[11] = @buf_ram_272
buf[12] = @buf_ram_273
buf[13] = @buf_ram_274
buf[14] = @buf_ram_275
buf[15] = @buf_ram_276
buf[16] = @buf_ram_277
buf[17] = @buf_ram_278
buf[18] = @buf_ram_279
buf[19] = @buf_ram_280
buf[20] = @buf_ram_281
buf[21] = @buf_ram_282
buf[22] = @buf_ram_283
buf[23] = @buf_ram_284
save("display_10")
save("buf_save")
if ( @buf_ram_285 == 1 ):
@buf_ram_285 = 0
load("buf_save")
buf[0] = @buf_ram_286
buf[1] = @buf_ram_287
buf[2] = @buf_ram_288
buf[3] = @buf_ram_289
buf[4] = @buf_ram_290
buf[5] = @buf_ram_291
buf[6] = @buf_ram_292
buf[7] = @buf_ram_293
buf[8] = @buf_ram_294
buf[9] = @buf_ram_295
buf[10] = @buf_ram_296
buf[11] = @buf_ram_297
buf[12] = @buf_ram_298
buf[13] = @buf_ram_299
buf[14] = @buf_ram_300
buf[15] = @buf_ram_301
buf[16] = @buf_ram_302
buf[17] = @buf_ram_303
buf[18] = @buf_ram_304
buf[19] = @buf_ram_305
buf[20] = @buf_ram_306
buf[21] = @buf_ram_307
buf[22] = @buf_ram_308
buf[23] = @buf_ram_309
save("display_11")
save("buf_save")
if ( @buf_ram_310 == 1 ):
@buf_ram_310 = 0
load("buf_save")
buf[0] = @buf_ram_311
buf[1] = @buf_ram_312
buf[2] = @buf_ram_313
buf[3] = @buf_ram_314
buf[4] = @buf_ram_315
buf[5] = @buf_ram_316
buf[6] = @buf_ram_317
buf[7] = @buf_ram_318
buf[8] = @buf_ram_319
buf[9] = @buf_ram_320
buf[10] = @buf_ram_321
buf[11] = @buf_ram_322
buf[12] = @buf_ram_323
buf[13] = @buf_ram_324
buf[14] = @buf_ram_325
buf[15] = @buf_ram_326
buf[16] = @buf_ram_327
buf[17] = @buf_ram_328
buf[18] = @buf_ram_329
buf[19] = @buf_ram_330
buf[20] = @buf_ram_331
buf[21] = @buf_ram_332
buf[22] = @buf_ram_333
buf[23] = @buf_ram_334
save("display_12")
save("buf_save")
if ( @buf_ram_335 == 1 ):
@buf_ram_335 = 0
load("buf_save")
buf[0] = @buf_ram_336
buf[1] = @buf_ram_337
buf[2] = @buf_ram_338
buf[3] = @buf_ram_339
buf[4] = @buf_ram_340
buf[5] = @buf_ram_341
buf[6] = @buf_ram_342
buf[7] = @buf_ram_343
buf[8] = @buf_ram_344
buf[9] = @buf_ram_345
buf[10] = @buf_ram_346
buf[11] = @buf_ram_347
buf[12] = @buf_ram_348
buf[13] = @buf_ram_349
buf[14] = @buf_ram_350
buf[15] = @buf_ram_351
buf[16] = @buf_ram_352
buf[17] = @buf_ram_353
buf[18] = @buf_ram_354
buf[19] = @buf_ram_355
buf[20] = @buf_ram_356
buf[21] = @buf_ram_357
buf[22] = @buf_ram_358
buf[23] = @buf_ram_359
save("display_13")
save("buf_save")
if ( @buf_ram_360 == 1 ):
@buf_ram_360 = 0
load("buf_save")
buf[0] = @buf_ram_361
buf[1] = @buf_ram_362
buf[2] = @buf_ram_363
buf[3] = @buf_ram_364
buf[4] = @buf_ram_365
buf[5] = @buf_ram_366
buf[6] = @buf_ram_367
buf[7] = @buf_ram_368
buf[8] = @buf_ram_369
buf[9] = @buf_ram_370
buf[10] = @buf_ram_371
buf[11] = @buf_ram_372
buf[12] = @buf_ram_373
buf[13] = @buf_ram_374
buf[14] = @buf_ram_375
buf[15] = @buf_ram_376
buf[16] = @buf_ram_377
buf[17] = @buf_ram_378
buf[18] = @buf_ram_379
buf[19] = @buf_ram_380
buf[20] = @buf_ram_381
buf[21] = @buf_ram_382
buf[22] = @buf_ram_383
buf[23] = @buf_ram_384
save("display_14")
save("buf_save")
if ( @buf_ram_385 == 1 ):
@buf_ram_385 = 0
load("buf_save")
buf[0] = @buf_ram_386
buf[1] = @buf_ram_387
buf[2] = @buf_ram_388
buf[3] = @buf_ram_389
buf[4] = @buf_ram_390
buf[5] = @buf_ram_391
buf[6] = @buf_ram_392
buf[7] = @buf_ram_393
buf[8] = @buf_ram_394
buf[9] = @buf_ram_395
buf[10] = @buf_ram_396
buf[11] = @buf_ram_397
buf[12] = @buf_ram_398
buf[13] = @buf_ram_399
buf[14] = @buf_ram_400
buf[15] = @buf_ram_401
buf[16] = @buf_ram_402
buf[17] = @buf_ram_403
buf[18] = @buf_ram_404
buf[19] = @buf_ram_405
buf[20] = @buf_ram_406
buf[21] = @buf_ram_407
buf[22] = @buf_ram_408
buf[23] = @buf_ram_409
save("display_15")
save("buf_save")
if ( @buf_ram_410 == 1 ):
@buf_ram_410 = 0
load("buf_save")
buf[0] = @buf_ram_411
buf[1] = @buf_ram_412
buf[2] = @buf_ram_413
buf[3] = @buf_ram_414
buf[4] = @buf_ram_415
buf[5] = @buf_ram_416
buf[6] = @buf_ram_417
buf[7] = @buf_ram_418
buf[8] = @buf_ram_419
buf[9] = @buf_ram_420
buf[10] = @buf_ram_421
buf[11] = @buf_ram_422
buf[12] = @buf_ram_423
buf[13] = @buf_ram_424
buf[14] = @buf_ram_425
buf[15] = @buf_ram_426
buf[16] = @buf_ram_427
buf[17] = @buf_ram_428
buf[18] = @buf_ram_429
buf[19] = @buf_ram_430
buf[20] = @buf_ram_431
buf[21] = @buf_ram_432
buf[22] = @buf_ram_433
buf[23] = @buf_ram_434
save("display_16")
save("buf_save")
if ( @buf_ram_435 == 1 ):
@buf_ram_435 = 0
load("buf_save")
buf[0] = @buf_ram_436
buf[1] = @buf_ram_437
buf[2] = @buf_ram_438
buf[3] = @buf_ram_439
buf[4] = @buf_ram_440
buf[5] = @buf_ram_441
buf[6] = @buf_ram_442
buf[7] = @buf_ram_443
buf[8] = @buf_ram_444
buf[9] = @buf_ram_445
buf[10] = @buf_ram_446
buf[11] = @buf_ram_447
buf[12] = @buf_ram_448
buf[13] = @buf_ram_449
buf[14] = @buf_ram_450
buf[15] = @buf_ram_451
buf[16] = @buf_ram_452
buf[17] = @buf_ram_453
buf[18] = @buf_ram_454
buf[19] = @buf_ram_455
buf[20] = @buf_ram_456
buf[21] = @buf_ram_457
buf[22] = @buf_ram_458
buf[23] = @buf_ram_459
save("display_17")
save("buf_save")
if ( @buf_ram_460 == 1 ):
@buf_ram_460 = 0
load("buf_save")
buf[0] = @buf_ram_461
buf[1] = @buf_ram_462
buf[2] = @buf_ram_463
buf[3] = @buf_ram_464
buf[4] = @buf_ram_465
buf[5] = @buf_ram_466
buf[6] = @buf_ram_467
buf[7] = @buf_ram_468
buf[8] = @buf_ram_469
buf[9] = @buf_ram_470
buf[10] = @buf_ram_471
buf[11] = @buf_ram_472
buf[12] = @buf_ram_473
buf[13] = @buf_ram_474
buf[14] = @buf_ram_475
buf[15] = @buf_ram_476
buf[16] = @buf_ram_477
buf[17] = @buf_ram_478
buf[18] = @buf_ram_479
buf[19] = @buf_ram_480
buf[20] = @buf_ram_481
buf[21] = @buf_ram_482
buf[22] = @buf_ram_483
buf[23] = @buf_ram_484
save("display_18")
save("buf_save")
if ( @buf_ram_485 == 1 ):
@buf_ram_485 = 0
load("buf_save")
buf[0] = @buf_ram_486
buf[1] = @buf_ram_487
buf[2] = @buf_ram_488
buf[3] = @buf_ram_489
buf[4] = @buf_ram_490
buf[5] = @buf_ram_491
buf[6] = @buf_ram_492
buf[7] = @buf_ram_493
buf[8] = @buf_ram_494
buf[9] = @buf_ram_495
buf[10] = @buf_ram_496
buf[11] = @buf_ram_497
buf[12] = @buf_ram_498
buf[13] = @buf_ram_499
buf[14] = @buf_ram_500
buf[15] = @buf_ram_501
buf[16] = @buf_ram_502
buf[17] = @buf_ram_503
buf[18] = @buf_ram_504
buf[19] = @buf_ram_505
buf[20] = @buf_ram_506
buf[21] = @buf_ram_507
buf[22] = @buf_ram_508
buf[23] = @buf_ram_509
save("display_19")
save("buf_save")
load("display_0")
print()
load("display_1")
print()
load("display_2")
print()
load("display_3")
print()
load("display_4")
print()
load("display_5")
print()
load("display_6")
print()
load("display_7")
print()
load("display_8")
print()
load("display_9")
print()
load("display_10")
print()
load("display_11")
print()
load("display_12")
print()
load("display_13")
print()
load("display_14")
print()
load("display_15")
print()
load("display_16")
print()
load("display_17")
print()
load("display_18")
print()
load("display_19")
print()
load("buf_save")
def write_shape_0(x, y, val):
ram[(y+0)*@__script__width_p1+@__script__disp_start] = 1
ram[(y+0)*@__script__width_p1+x+-11+@__script__disp_start] = val
ram[(y+0)*@__script__width_p1+x+-10+@__script__disp_start] = val
ram[(y+0)*@__script__width_p1+x+-9+@__script__disp_start] = val
ram[(y+0)*@__script__width_p1+x+-8+@__script__disp_start] = val
def check_shape_0(x, y):
to_ret = 'aaI'
off = (y+0)*@__script__width_p1+x+-11+@__script__disp_start
val = ram[off]
if ( val == 'aaI' ):
pass
else:
if ( val == 'aaV'):
return 'aaV'
if ( val == 'aaY'):
return 'aaY'
if ( val == 'aaW'):
to_ret = 'aaW'
off = (y+0)*@__script__width_p1+x+-10+@__script__disp_start
val = ram[off]
if ( val == 'aaI' ):
pass
else:
if ( val == 'aaV'):
return 'aaV'
if ( val == 'aaY'):
return 'aaY'
if ( val == 'aaW'):
to_ret = 'aaW'
off = (y+0)*@__script__width_p1+x+-9+@__script__disp_start
val = ram[off]
if ( val == 'aaI' ):
pass
else:
if ( val == 'aaV'):
return 'aaV'
if ( val == 'aaY'):
return 'aaY'
if ( val == 'aaW'):
to_ret = 'aaW'
off = (y+0)*@__script__width_p1+x+-8+@__script__disp_start
val = ram[off]
if ( val == 'aaI' ):
pass
else:
if ( val == 'aaV'):
return 'aaV'
if ( val == 'aaY'):
return 'aaY'
if ( val == 'aaW'):
to_ret = 'aaW'
return to_ret
def write_shape_1(x, y, val):
ram[(y+-1)*@__script__width_p1+@__script__disp_start] = 1
ram[(y+0)*@__script__width_p1+@__script__disp_start] = 1
ram[(y+1)*@__script__width_p1+@__script__disp_start] = 1
ram[(y+2)*@__script__width_p1+@__script__disp_start] = 1
ram[(y+-1)*@__script__width_p1+x+-9+@__script__disp_start] = val
ram[(y+0)*@__script__width_p1+x+-9+@__script__disp_start] = val
ram[(y+1)*@__script__width_p1+x+-9+@__script__disp_start] = val
ram[(y+2)*@__script__width_p1+x+-9+@__script__disp_start] = val
def check_shape_1(x, y):
to_ret = 'aaI'
off = (y+-1)*@__script__width_p1+x+-9+@__script__disp_start
val = ram[off]
if ( val == 'aaI' ):
pass
else:
if ( val == 'aaV'):
return 'aaV'
if ( val == 'aaY'):
return 'aaY'
if ( val == 'aaW'):
to_ret = 'aaW'
off = (y+0)*@__script__width_p1+x+-9+@__script__disp_start
val = ram[off]
if ( val == 'aaI' ):
pass
else:
if ( val == 'aaV'):
return 'aaV'
if ( val == 'aaY'):
return 'aaY'
if ( val == 'aaW'):
to_ret = 'aaW'
off = (y+1)*@__script__width_p1+x+-9+@__script__disp_start
val = ram[off]
if ( val == 'aaI' ):
pass
else:
if ( val == 'aaV'):
return 'aaV'
if ( val == 'aaY'):
return 'aaY'
if ( val == 'aaW'):
to_ret = 'aaW'
off = (y+2)*@__script__width_p1+x+-9+@__script__disp_start
val = ram[off]
if ( val == 'aaI' ):
pass
else:
if ( val == 'aaV'):
return 'aaV'
if ( val == 'aaY'):
return 'aaY'
if ( val == 'aaW'):
to_ret = 'aaW'
return to_ret
def write_shape_2(x, y, val):
ram[(y+1)*@__script__width_p1+@__script__disp_start] = 1
ram[(y+1)*@__script__width_p1+x+-11+@__script__disp_start] = val
ram[(y+1)*@__script__width_p1+x+-10+@__script__disp_start] = val
ram[(y+1)*@__script__width_p1+x+-9+@__script__disp_start] = val
ram[(y+1)*@__script__width_p1+x+-8+@__script__disp_start] = val
def check_shape_2(x, y):
to_ret = 'aaI'
off = (y+1)*@__script__width_p1+x+-11+@__script__disp_start
val = ram[off]
if ( val == 'aaI' ):
pass
else:
if ( val == 'aaV'):
return 'aaV'
if ( val == 'aaY'):
return 'aaY'
if ( val == 'aaW'):
to_ret = 'aaW'
off = (y+1)*@__script__width_p1+x+-10+@__script__disp_start
val = ram[off]
if ( val == 'aaI' ):
pass
else:
if ( val == 'aaV'):
return 'aaV'
if ( val == 'aaY'):
return 'aaY'
if ( val == 'aaW'):
to_ret = 'aaW'
off = (y+1)*@__script__width_p1+x+-9+@__script__disp_start
val = ram[off]
if ( val == 'aaI' ):
pass
else:
if ( val == 'aaV'):
return 'aaV'
if ( val == 'aaY'):
return 'aaY'
if ( val == 'aaW'):
to_ret = 'aaW'
off = (y+1)*@__script__width_p1+x+-8+@__script__disp_start
val = ram[off]
if ( val == 'aaI' ):
pass
else:
if ( val == 'aaV'):
return 'aaV'
if ( val == 'aaY'):
return 'aaY'
if ( val == 'aaW'):
to_ret = 'aaW'
return to_ret
def write_shape_3(x, y, val):
ram[(y+-1)*@__script__width_p1+@__script__disp_start] = 1
ram[(y+0)*@__script__width_p1+@__script__disp_start] = 1
ram[(y+1)*@__script__width_p1+@__script__disp_start] = 1
ram[(y+2)*@__script__width_p1+@__script__disp_start] = 1
ram[(y+-1)*@__script__width_p1+x+-10+@__script__disp_start] = val
ram[(y+0)*@__script__width_p1+x+-10+@__script__disp_start] = val
ram[(y+1)*@__script__width_p1+x+-10+@__script__disp_start] = val
ram[(y+2)*@__script__width_p1+x+-10+@__script__disp_start] = val
def check_shape_3(x, y):
to_ret = 'aaI'
off = (y+-1)*@__script__width_p1+x+-10+@__script__disp_start
val = ram[off]
if ( val == 'aaI' ):
pass
else:
if ( val == 'aaV'):
return 'aaV'
if ( val == 'aaY'):
return 'aaY'
if ( val == 'aaW'):
to_ret = 'aaW'
off = (y+0)*@__script__width_p1+x+-10+@__script__disp_start
val = ram[off]
if ( val == 'aaI' ):
pass
else:
if ( val == 'aaV'):
return 'aaV'
if ( val == 'aaY'):
return 'aaY'
if ( val == 'aaW'):
to_ret = 'aaW'
off = (y+1)*@__script__width_p1+x+-10+@__script__disp_start
val = ram[off]
if ( val == 'aaI' ):
pass
else:
if ( val == 'aaV'):
return 'aaV'
if ( val == 'aaY'):
return 'aaY'
if ( val == 'aaW'):
to_ret = 'aaW'
off = (y+2)*@__script__width_p1+x+-10+@__script__disp_start
val = ram[off]
if ( val == 'aaI' ):
pass
else:
if ( val == 'aaV'):
return 'aaV'
if ( val == 'aaY'):
return 'aaY'
if ( val == 'aaW'):
to_ret = 'aaW'
return to_ret
def write_shape_4(x, y, val):
ram[(y+0)*@__script__width_p1+@__script__disp_start] = 1
ram[(y+1)*@__script__width_p1+@__script__disp_start] = 1
ram[(y+0)*@__script__width_p1+x+-11+@__script__disp_start] = val
ram[(y+0)*@__script__width_p1+x+-10+@__script__disp_start] = val
ram[(y+1)*@__script__width_p1+x+-10+@__script__disp_start] = val
ram[(y+1)*@__script__width_p1+x+-9+@__script__disp_start] = val
def check_shape_4(x, y):
to_ret = 'aaI'
off = (y+0)*@__script__width_p1+x+-11+@__script__disp_start
val = ram[off]
if ( val == 'aaI' ):
pass
else:
if ( val == 'aaV'):
return 'aaV'
if ( val == 'aaY'):
return 'aaY'
if ( val == 'aaW'):
to_ret = 'aaW'
off = (y+0)*@__script__width_p1+x+-10+@__script__disp_start
val = ram[off]
if ( val == 'aaI' ):
pass
else:
if ( val == 'aaV'):
return 'aaV'
if ( val == 'aaY'):
return 'aaY'
if ( val == 'aaW'):
to_ret = 'aaW'
off = (y+1)*@__script__width_p1+x+-10+@__script__disp_start
val = ram[off]
if ( val == 'aaI' ):
pass
else:
if ( val == 'aaV'):
return 'aaV'
if ( val == 'aaY'):
return 'aaY'
if ( val == 'aaW'):
to_ret = 'aaW'
off = (y+1)*@__script__width_p1+x+-9+@__script__disp_start
val = ram[off]
if ( val == 'aaI' ):
pass
else:
if ( val == 'aaV'):
return 'aaV'
if ( val == 'aaY'):
return 'aaY'
if ( val == 'aaW'):
to_ret = 'aaW'
return to_ret
def write_shape_5(x, y, val):
ram[(y+0)*@__script__width_p1+@__script__disp_start] = 1
ram[(y+1)*@__script__width_p1+@__script__disp_start] = 1
ram[(y+2)*@__script__width_p1+@__script__disp_start] = 1
ram[(y+0)*@__script__width_p1+x+-9+@__script__disp_start] = val
ram[(y+1)*@__script__width_p1+x+-10+@__script__disp_start] = val
ram[(y+1)*@__script__width_p1+x+-9+@__script__disp_start] = val
ram[(y+2)*@__script__width_p1+x+-10+@__script__disp_start] = val
def check_shape_5(x, y):
to_ret = 'aaI'
off = (y+0)*@__script__width_p1+x+-9+@__script__disp_start
val = ram[off]
if ( val == 'aaI' ):
pass
else:
if ( val == 'aaV'):
return 'aaV'
if ( val == 'aaY'):
return 'aaY'
if ( val == 'aaW'):
to_ret = 'aaW'
off = (y+1)*@__script__width_p1+x+-10+@__script__disp_start
val = ram[off]
if ( val == 'aaI' ):
pass
else:
if ( val == 'aaV'):
return 'aaV'
if ( val == 'aaY'):
return 'aaY'
if ( val == 'aaW'):
to_ret = 'aaW'
off = (y+1)*@__script__width_p1+x+-9+@__script__disp_start
val = ram[off]
if ( val == 'aaI' ):
pass
else:
if ( val == 'aaV'):
return 'aaV'
if ( val == 'aaY'):
return 'aaY'
if ( val == 'aaW'):
to_ret = 'aaW'
off = (y+2)*@__script__width_p1+x+-10+@__script__disp_start
val = ram[off]
if ( val == 'aaI' ):
pass
else:
if ( val == 'aaV'):
return 'aaV'