-
Notifications
You must be signed in to change notification settings - Fork 0
/
PICTURE.BAS
3643 lines (3265 loc) · 94.7 KB
/
PICTURE.BAS
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
COMMON SHARED cursorx, cursory, tadd%, spread$, userobj$, imagex, imagey, option$(), optionx%(), cps$(), clrs(), return$, clr%, tools$, pens%, objs1$, hx1%, hy1%, th%, rad%, rat!, drawx%, drawy%, degr%, txt$, xc%, yc%, thk%, size%, cc%, sp%, rate%
'------------------------------Shared variables------------------------------
' cursorx - x position of cursor
' cursory - y position of cursor
' pens% - stores wteher pen up or pen down (0/1)
' spread$ - spreadline selected
' userobj$ - user object created in OBJ folder
' imagex - size x of an object stored (no main)
' imagey - size y of an object stored (no main)
' option$() - array of options stored for use in mainmenu
' optionx%() - array for options x positions for use in mainmenu
' cps$() - array for storing comments on options for mainmenu
' clrs() - double array for storing palette values
' return$ - stores any return value of a subroutine
' clr% - current colour selected
' tools$ - stores the tool name selected
' objs1% - stores the object name selected
' tadd% - stores time constant
'============================================================================
'===============================Declarations=================================
DECLARE FUNCTION position (add, x, y, ysize)
DECLARE SUB save (f$, io%)
DECLARE SUB load (f$, io%, x%, y%)
DECLARE SUB nullify ()
DECLARE SUB obj1 ()
DECLARE SUB obj1p (s AS STRING, x AS SINGLE, y AS SINGLE)
DECLARE SUB obj2 ()
DECLARE SUB obj2d (f$, x AS SINGLE, y AS SINGLE, rx AS SINGLE, ry AS SINGLE)
DECLARE SUB objimgsize (f$)
DECLARE SUB obj2p (f$, x AS SINGLE, y AS SINGLE)
DECLARE SUB savedot (x, y, c%)
DECLARE FUNCTION drawmenu$ ()
DECLARE SUB text ()
DECLARE SUB sprdlns ()
DECLARE FUNCTION nospc$ (s AS STRING)
DECLARE SUB tool ()
DECLARE SUB tlbrush ()
DECLARE SUB tlline ()
DECLARE SUB tlrectangle ()
DECLARE SUB tlcircle (o%)
DECLARE SUB tlspray ()
DECLARE SUB tlsprdln ()
DECLARE SUB getit (x1 AS SINGLE, y1 AS SINGLE, x2 AS SINGLE, y2 AS SINGLE)
DECLARE SUB cursor (x AS SINGLE, y AS SINGLE, c%, a%)
DECLARE SUB intensity (r%, G%, b%)
DECLARE SUB colour ()
DECLARE SUB status (s AS STRING, c%)
DECLARE SUB ld ()
DECLARE SUB win (h$, c%)
DECLARE FUNCTION randnum (s1 AS SINGLE, s2 AS SINGLE)
DECLARE SUB pnt (x1 AS INTEGER, y1 AS INTEGER, x2 AS INTEGER, y2 AS INTEGER, c%)
DECLARE FUNCTION realx (x AS SINGLE)
DECLARE FUNCTION realy (y AS SINGLE)
DECLARE FUNCTION mainmenu% (h$, hc%, u%, os%, oc%, bx1%, by1%, bx2%, by2%, bc%, bt%)
DECLARE FUNCTION menu$ (s$, x1%, y1%, x2%, y2%, t$, b$, f%, tt%, c%, BF%, ib%)
DECLARE SUB rub (x1 AS INTEGER, y1 AS INTEGER, x2 AS INTEGER, y2 AS INTEGER)
DECLARE SUB linez (x1 AS SINGLE, y1 AS SINGLE, x2 AS SINGLE, y2 AS SINGLE, t AS SINGLE, c AS INTEGER)
DECLARE SUB char (s AS STRING, x, y, t, p, c AS INTEGER)
DECLARE SUB word (s AS STRING, x AS INTEGER, y AS INTEGER, t1 AS INTEGER, p1 AS INTEGER, c AS INTEGER, p AS INTEGER, f AS INTEGER, t AS DOUBLE)
DECLARE SUB expand (s AS STRING, x AS INTEGER, y AS INTEGER, t1 AS INTEGER, p1 AS INTEGER, c AS INTEGER, p AS INTEGER, f AS INTEGER, t AS DOUBLE)
DECLARE SUB linex (x1 AS SINGLE, y1 AS SINGLE, x2 AS SINGLE, y2 AS SINGLE, t AS SINGLE, c AS INTEGER)
DECLARE SUB liney (x1 AS SINGLE, y1 AS SINGLE, x2 AS SINGLE, y2 AS SINGLE, t AS SINGLE, c AS INTEGER)
DECLARE SUB click1 ()
DECLARE SUB click2 ()
DECLARE SUB click3 ()
DECLARE FUNCTION currdir$ ()
DECLARE FUNCTION volname$ ()
DECLARE FUNCTION volsnum$ ()
DECLARE FUNCTION numfiles (s AS STRING)
DECLARE FUNCTION numdirs ()
DECLARE FUNCTION dirs$ (s AS STRING)
DECLARE FUNCTION fzl$ (a AS STRING, s AS STRING)
DECLARE FUNCTION files$ (a AS STRING, s AS STRING)
DECLARE FUNCTION fileName$ (file$)
DECLARE FUNCTION fullFileName$ (file$, ext$)
DECLARE FUNCTION indexOf% (s$, f$)
'============================================================================
'variable types
DEFINT A-B, D-H, J-Z
DEFSNG C
DEFLNG I
DEFDBL T
'handle errors
ON ERROR GOTO errs
'prepare memory
CLEAR 2100000000
iii = SETMEM(2100000000)
'============================Declaring Keys==================================
CONST backspc = 8, enter = 13, htab = 9
CONST left = 75, right = 77, up = 72, down = 80
CONST uplt = 71, uprt = 73, dnlt = 79, dnrt = 81
CONST insert = 82, home = 73, pageup = 71, del = 83, endk = 81, pagedn = 79
CONST kf1 = 59, kf2 = 60, kf3 = 61, kf4 = 62, kf5 = 63, kf6 = 64, kf7 = 65, kf8 = 66, kf9 = 67, kf10 = 68, kf11 = 133, kf12 = 134
'-----------------------------Keys declared---------------------------------
'============================Defining Screen areas==========================
DIM iarea1(6200), iarea2(10070), iarea3(10070), iarea4(10070), iarea5(10070), iarea6(3900)
'-----------------------------Screen areas defined--------------------------
CLS
SCREEN 12
GOSUB getscreen
'starting common things
return$ = ""
clr% = 0
REM $DYNAMIC
DIM clrs(16, 3)
inst = 0
'===============================Getting timer================================
aaaa: sec1 = VAL(RIGHT$(TIME$, 2))
IF sec1 > 58 THEN GOTO aaaa
DO UNTIL (VAL(RIGHT$(TIME$, 2)) = sec1 + 1)
inst = inst + 1
LOOP
tadd% = FIX((inst / 29102) + .5)
IF tadd% <= 1 THEN tadd% = 1
IF tadd% = 3 THEN tadd% = 4
IF tadd% > 5 AND tadd% <= 7 THEN tadd% = 5
IF tadd% > 7 AND tadd% < 10 THEN tadd% = 10
IF tadd% > 10 AND tadd% <= 15 THEN tadd% = 10
IF tadd% > 15 THEN tadd% = 20
'----------------------------------------------------------------------------
'GOTO adfg
'======================Analyse VGA Screen Mode===============================
1 : OPEN "B", #1, "log.log"
IF LOF(1) > 3 THEN GOTO main
t = .3
SEEK #1, 1
af$ = "afffff"
PUT #1, 1, af$
CLOSE #1
COLOR 15
acc$ = menu$("VGA", 150, 100, 390, 250, "YOUR VGA SCREEN MODE WILL NOW BE ANALYSED.", "OK.", 20000, .2, 1, 3, 0)
FOR i = 0 TO 500 STEP 16
FOR j = 0 TO 15
CIRCLE (320, 240), i + j, j
NEXT
NEXT
'time speed
FOR i = 0 TO 63 STEP 2
FOR j = 0 TO 15
PALETTE j, 65536 * 0 + 256 * 0 + i
SOUND 21000, t
NEXT
NEXT
FOR i = 0 TO 63 STEP 2
FOR j = 0 TO 15
PALETTE j, 65536 * 0 + 256 * i + 0
SOUND 21000, t
NEXT
NEXT
FOR i = 0 TO 63 STEP 2
FOR j = 0 TO 15
PALETTE j, 65536 * i + 256 * 0 + 0
SOUND 21000, t
NEXT
NEXT
CLS
COLOR 15
GOSUB setdefault
GOSUB setcolors
acc$ = menu$("VGA", 150, 100, 390, 250, "VGA SCREEN TEST COMPLETE.", "OK.", 20000, .2, 1, 3, 0)
click2
'--------------------------VGA Screen test complete--------------------------
'===============================Main Menu====================================
main: CLS
'///////////////////////////////Creating menu
GOSUB setdefault
GOSUB setcolors
CLS
PALETTE 9, 65536 * 63 + 256 * 32 + 32
DIM SHARED option$(5)
DIM SHARED optionx%(5)
option$(0) = "CREATE A PICTURE"
optionx%(0) = 200
option$(1) = "LOAD A PICTURE": optionx%(1) = 200
option$(2) = "HELP": optionx%(2) = 280
option$(3) = "CREDITS": optionx%(3) = 260
option$(4) = "EXIT": optionx%(4) = 280
DIM SHARED cps$(5)
cps$(0) = "OPTIONS FOR CREATING INDIVIDUAL PICTURE OR PROJECT FOR PICTURE OBJECTS"
cps$(1) = "OPTIONS FOR LOADING INDIVIDUAL PICTURE OR PROJECT FOR PICTURE OBJECTS"
cps$(2) = "PROVIDES HELP"
cps$(3) = "SUBHAJIT SAHU"
cps$(4) = "EXITS TO SYSTEM"
zx% = mainmenu%("PICTURE CREATOR", 9, 0, 200, 14, 0, 80, 115, 400, 7, 6)
ERASE option$, optionx%, cps$
IF zx% <> 5 THEN GOSUB sclear
IF zx% = 1 THEN GOTO opt1
IF zx% = 2 THEN GOTO opt2
IF zx% = 3 THEN GOTO opt3
IF zx% = 4 THEN GOTO opt4
IF zx% = 5 THEN GOTO opt5
'------------------------------Main Menu complete----------------------------
'================================Option 3 HELP===============================
opt3: expand "HELP", 25, 5, 5, 4, 11, 38, 21000, 0
frf = FREEFILE
OPEN "B", #frf, "help.hlp"
VIEW PRINT 5 TO 27
FOR i = 1 TO LOF(frf)
SEEK #frf, i
zz$ = INPUT$(1, #frf)
IF (zz$ = CHR$(9) OR zz$ = CHR$(10) OR zz$ = CHR$(13)) OR (ASC(zz$) > 31 AND ASC(zz$) < 127) THEN PRINT zz$;
NEXT
lns = 0
k$ = INPUT$(1)
CLOSE #frf
opt31: GOSUB sclear
ERASE cps$, option$, optionx
GOTO main
'----------------------------Option 3 complete-------------------------------
'=============================Option 4 CREDITS===============================
opt4: expand "CREDITS", 25, 5, 5, 4, 11, 38, 21000, 0
expand "WELCOME MY FRIENDS, I, SUBHAJIT SAHU INVITE YOU TO THE WORLD OF", 3, 100, 2, 1, 9, 9, 21000, 0
expand "DRAWING PICTURES IN MY NEW PICTURE CREATOR. HAVE FUN.", 3, 150, 2, 1, 9, 9, 21000, 0
k$ = INPUT$(1)
GOSUB sclear
ERASE cps$, option$, optionx
GOTO main
'-----------------------------Option 4 complete------------------------------
'==============================Option 5 EXIT=================================
opt5: acc$ = menu$("EXIT", 150, 100, 390, 250, "ARE YOU SURE YOU WANT TO EXIT TO SYSTEM ", "YES.NO.", 20000, .2, 1, 3, 0)
IF acc$ = "YES" THEN
SYSTEM
ELSE
ERASE cps$, option$, optionx
GOTO main
END IF
'------------------------------Option 5 complete-----------------------------
'=======================Option 1 Create a picture============================
opt1: ERASE cps$, option$, optionx
CLS
GOSUB setdefault
GOSUB setcolors
ERASE cps$
DIM SHARED cps$(3)
cps$(0) = "ALLOWS YOU TO CREATE AN IDIVIDUAL PICTURE"
cps$(1) = "ALLOWS YOU TO CREATE A PICTURE PROJECT FOR EACH AS PICTURE ELEMENTS"
cps$(2) = "GO BACK TO MAIN MENU"
PALETTE 9, 65536 * 32 + 256 * 63 + 32
ERASE option$, optionx%
DIM SHARED option$(3)
DIM SHARED optionx%(3)
option$(0) = "CREATE A PICTURE": optionx%(0) = 240
option$(1) = "CREATE A PICTURE PROJECT": optionx%(1) = 200
option$(2) = "BACK": optionx%(2) = 320
zx% = mainmenu%("CREATE A PICTURE", 9, 0, 200, 13, 0, 80, 115, 400, 7, 6)
IF (zx% = 3) THEN GOSUB sclear
ERASE option$, optionx%, cps$
IF zx% = 1 THEN GOTO opt11
IF zx% = 2 THEN GOTO opt12
IF zx% = 3 THEN GOTO main
opt11: file$ = menu$("FILE NAME", 50, 50, 400, 200, "WHAT IS THE FILE NAME#", "OK.", 21000, 0, 8, 13, 1)
IF file$ = "esc" THEN GOTO opt1
file$ = LEFT$(file$, LEN(file$) - 3)
file$ = fileName$(file$)
GOSUB setcolors
PALETTE 0, 65536 * 9 + 256 * 3 + 15
ld
adfg:
GOSUB setcolors
CLS
SCREEN 12
opte: cursorx = 280
cursory = 170
clr% = 1
nullify
rate% = 1
tools$ = "pencil:1"
win file$, 14
GOSUB cursors
cfff: k$ = INKEY$
insst = insst + tadd%
IF insst > 63000 THEN
VIEW SCREEN (545, 150)-(635, 350)
insst = 0
CLS
VIEW
END IF
IF (insst MOD 1000 = 0) THEN
VIEW SCREEN (545, 150)-(635, 350)
bi = randnum(1, 359)
ij = bi MOD 36
IF ij > 18 THEN iij = 18 - ij ELSE iij = ij
j = randnum(0, 30)
CIRCLE (590, 200), j, 10, , , ((iij / 18))
VIEW
END IF
SELECT CASE k$
CASE "+"
rate% = rate% + 1
IF rate% > 20 THEN rate% = 20
status "CURSOR MOVEMENT RATE : " + STR$(rate%), 15
CASE "-"
rate% = rate% - 1
IF rate% < 1 THEN rate% = 1
status "CURSOR MOVEMENT RATE : " + STR$(rate%), 15
CASE "\"
zz$ = tools$
status "Selecting cursor : " + STR$(((cur% + 1) MOD 10) + 1), 15
tools$ = nospc$("pencil:" + STR$((cur% + 1) MOD 10))
GOSUB cursors
tools$ = zz$
CASE CHR$(0) + CHR$(up)
GOSUB putscreen
cursory = cursory - rate%
IF cursory < 0 THEN cursory = 0
IF (etr% = 1 OR pens% = 1) THEN LINE (realx(cursorx), realy(cursory))-(realx(cursorx), realy(cursory) + rate%), clr%
GOSUB getscreen
GOSUB cursors
CASE CHR$(0) + CHR$(down)
GOSUB putscreen
cursory = cursory + rate%
IF cursory > 386 THEN cursory = 386
IF (etr% = 1 OR pens% = 1) THEN LINE (realx(cursorx), realy(cursory))-(realx(cursorx), realy(cursory) - rate%), clr%
GOSUB getscreen
GOSUB cursors
CASE CHR$(0) + CHR$(left)
GOSUB putscreen
cursorx = cursorx - rate%
IF cursorx < 0 THEN cursorx = 0
IF (etr% = 1 OR pens% = 1) THEN LINE (realx(cursorx), realy(cursory))-(realx(cursorx) + rate%, realy(cursory)), clr%
GOSUB getscreen
GOSUB cursors
CASE CHR$(0) + CHR$(right)
GOSUB putscreen
cursorx = cursorx + rate%
IF cursorx > 496 THEN cursorx = 496
IF (etr% = 1 OR pens% = 1) THEN LINE (realx(cursorx), realy(cursory))-(realx(cursorx) - rate%, realy(cursory)), clr%
GOSUB getscreen
GOSUB cursors
CASE CHR$(backspc)
pens% = (pens% + 1) MOD 2
IF pens% = 0 THEN status "PEN UP", 7 ELSE status "PEN DOWN", 7
CASE CHR$(enter)
GOSUB putscreen
IF tools$ <> "" THEN
tzs$ = LEFT$(tools$, 4)
str% = pens%
pens% = 1
SELECT CASE tzs$
CASE "penc"
LINE (realx(cursorx), realy(cursory))-(realx(cursorx), realy(cursory)), clr%
GOSUB getscreen
CASE "rubb"
rub realx(cursorx + 2), realy(cursory + 4), realx(cursorx + 18), realy(cursory + 12)
GOSUB getscreen
CASE "brus"
VIEW SCREEN (42, 52)-(538, 438)
tlbrush
VIEW
GOSUB getscreen
CASE "line"
tlline
GOSUB putscreen
VIEW SCREEN (42, 52)-(538, 438)
linez realx(cursorx), realy(cursory), realx(hx1% * 1!), realy(hy1% * 1!), th% * 1!, clr%
VIEW
GOSUB getscreen
CASE "rect"
tlrectangle
GOSUB putscreen
thk = VAL(RIGHT$(tools$, 1))
VIEW SCREEN (42, 52)-(538, 438)
IF (thk = 1) THEN LINE (realx(cursorx), realy(cursory))-(realx(hx1% * 1!), realy(hy1% * 1!)), clr%, B ELSE LINE (realx(cursorx), realy(cursory))-(realx(hx1% * 1!), realy(hy1% * 1!)), clr%, BF
VIEW
GOSUB getscreen
CASE "circ"
tlcircle (0)
GOSUB putscreen
VIEW SCREEN (42, 52)-(538, 438)
CIRCLE (realx(cursorx), realy(cursory)), rad% * 1!, clr%, , , rat!
VIEW
GOSUB getscreen
CASE "oval"
tlcircle (1)
GOSUB putscreen
VIEW SCREEN (42, 52)-(538, 438)
CIRCLE (realx(cursorx), realy(cursory)), rad% * 1!, clr%, , , rat!
VIEW
GOSUB getscreen
CASE "spra"
VIEW SCREEN (42, 52)-(538, 438)
tlspray
VIEW
GOSUB getscreen
CASE ELSE
END SELECT
pens% = str%
GOSUB cursors
END IF
IF (obj1s$ <> "") THEN
VIEW SCREEN (42, 52)-(538, 438)
obj1p obj1s$, realx(cursorx), realy(cursory)
VIEW
GOSUB getscreen
GOSUB cursors
ELSEIF (userobj$ <> "") THEN
VIEW SCREEN (42, 52)-(538, 438)
obj2d userobj$, realx(cursorx), realy(cursory), 1, 1
VIEW
GOSUB getscreen
GOSUB cursors
END IF
CASE CHR$(27)
acc$ = menu$("EXIT", 150, 100, 390, 250, "ARE YOU SURE YOU WANT TO EXIT TO MAIN MENU ", "YES.NO.", 20000, .2, 1, 3, 0)
IF acc$ = "YES" THEN
GOTO main
ELSE
GOSUB putscreen
END IF
CASE CHR$(0) + CHR$(kf1)
GOSUB putscreen
save fullFileName$(file$, ".pic"), 49
cursor cursorx, cursory, clr%, cur%
CASE CHR$(0) + CHR$(kf2)
colour
CASE CHR$(0) + CHR$(kf3)
intensity FIX(clrs(clr%, 0)), FIX(clrs(clr%, 1)), FIX(clrs(clr%, 2))
clrs(clr%, 0) = red%
clrs(clr%, 1) = green%
clrs(clr%, 2) = blue%
GOSUB setcolors
CASE CHR$(0) + CHR$(kf4)
tool
GOSUB cursors
CASE CHR$(0) + CHR$(kf5)
obj1
CASE CHR$(0) + CHR$(kf6)
obj2
CASE CHR$(0) + CHR$(kf7)
GOSUB putscreen
text
GOSUB putscreen
word txt$, xc%, yc%, thk%, size%, cc%, sp%, 21000, 0
GOSUB getscreen
cursor cursorx, cursory, clr%, cur%
CASE ELSE
END SELECT
GOTO cfff
cree:
opt12: acc$ = menu$("DEMO VERSION", 150, 100, 390, 250, "CREATING A PICTURE PROJECT IS UNAVAILABLE IN DEMO VERSION", "OK.", 20000, .2, 1, 3, 0)
CLS
GOTO opt1
'=========================Option 2 Load a picture============================
opt2: CLS
GOSUB setdefault
GOSUB setcolors
DIM SHARED cps$(3)
cps$(0) = "ALLOWS YOU TO LOAD AN IDIVIDUAL PICTURE"
cps$(1) = "ALLOWS YOU TO LOAD A PICTURE PROJECT FOR EACH AS PICTURE ELEMENTS"
cps$(2) = "GO BACK TO MAIN MENU"
PALETTE 9, 65536 * 32 + 256 * 32 + 63
DIM SHARED option$(3)
DIM SHARED optionx%(3)
option$(0) = "LOAD A PICTURE": optionx%(0) = 240
option$(1) = "LOAD A PICTURE PROJECT": optionx%(1) = 200
option$(2) = "BACK": optionx%(2) = 320
zx% = mainmenu%("LOAD A PICTURE", 9, 0, 200, 13, 0, 80, 115, 400, 7, 6)
IF (zx% = 3) THEN GOSUB sclear
ERASE option$, optionx%, cps$
IF zx% = 1 THEN GOTO opt21
IF zx% = 2 THEN GOTO opt22
IF zx% = 3 THEN GOTO main
opt21: acc$ = menu$("FILE NAME", 150, 100, 390, 250, "ENTER THE NAME OF FILE FILE WHICH YOU WANT TO LOAD", "OK.", 20000, .2, 1, 3, 1)
file$ = LEFT$(acc$, LEN(acc$) - 3)
file$ = fileName$(file$)
CLS
'GOSUB loadclrs
win file$, 14
GOSUB setcolors
load fullFileName$(file$, ".pic"), 49, 42, 52
GOSUB getscreen
GOTO opte
opt22: acc$ = menu$("DEMO VERSION", 150, 100, 390, 250, "LOADING A PICTURE PROJECT IS UNAVAILABLE IN DEMO VERSION", "OK.", 20000, .2, 1, 3, 0)
CLS
GOTO opt2
END
'==============================Colour restore================================
setdefault: ERASE clrs
DIM clrs(16, 3)
RESTORE
FOR i = 0 TO 15
FOR j = 0 TO 2
READ clv
clrs(i, j) = clv
NEXT
NEXT
RETURN
setcolors: RESTORE
FOR i = 0 TO 15
clv1 = clrs(i, 0): clv2 = clrs(i, 1): clv3 = clrs(i, 2)
PALETTE i, 65536 * clv3 + 256 * clv2 + clv1
NEXT
RETURN
sclear: FOR i = 1 TO 63
FOR j = 0 TO 15
clv1 = clrs(j, 0): clv2 = clrs(j, 1): clv3 = clrs(j, 2)
IF clv1 < i THEN clv1 = i
IF clv2 < i THEN clv2 = i
IF clv3 < i THEN clv3 = i
PALETTE j, 65536 * clv3 + 256 * clv2 + clv1
NEXT
SOUND i * 100, .5
NEXT
CLS
GOSUB setdefault
GOSUB setcolors
RETURN
getscreen: GET (42, 52)-(100, 438), iarea1
GET (101, 52)-(200, 438), iarea2
GET (201, 52)-(300, 438), iarea3
GET (301, 52)-(400, 438), iarea4
GET (401, 52)-(500, 438), iarea5
GET (501, 52)-(538, 438), iarea6
RETURN
putscreen: VIEW SCREEN (42, 52)-(538, 438)
CLS
PUT (42, 52), iarea1
PUT (101, 52), iarea2
PUT (201, 52), iarea3
PUT (301, 52), iarea4
PUT (401, 52), iarea5
PUT (501, 52), iarea6
VIEW
RETURN
cursors: IF LEFT$(tools$, 6) = "pencil" THEN
cur% = VAL(RIGHT$(tools$, 1))
IF cur% = 0 THEN cur% = 10
END IF
IF LEFT$(tools$, 6) = "rubber" THEN cur% = 11
cursor cursorx, cursory, clr%, cur%
RETURN
saveclrs: fr = FREEFILE '''fff$
ips = 1
OPEN "O", #fr, fff$
CLOSE #fr
OPEN "B", #fr, fff$
FOR i1 = 0 TO 15
FOR i2 = 0 TO 2
ad$ = CHR$(clrs(i1, i2))
SEEK #fr, ips
PUT #fr, ips, ad$
ips = ips + 1
NEXT
NEXT
CLOSE #fr
RETURN
loadclrs: fr = FREEFILE
ips = 1
OPEN "B", #fr, file$
FOR i1 = 0 TO 15
FOR i2 = 0 TO 2
SEEK #fr, ips
ad$ = INPUT$(1, #fr)
IF ad$ = "" THEN clrs(i1, i2) = 0 ELSE clrs(i1, i2) = ASC(ad$)
ips = ips + 1
NEXT
NEXT
CLOSE #fr
RETURN
errs: RESUME NEXT
DATA 0,0,0, 0,0,43, 0,43,0, 0,43,43, 43,0,0, 43,0,43, 43,43,0, 43,43,43, 10,10,10, 20,20,63, 20,63,20, 20,63,63, 63,20,20, 63,20,63, 63,63,20, 63,63,63
'============================================================================
REM $STATIC
DEFSNG A-B, D-Z
SUB char (s AS STRING, x, y, t, p, c AS INTEGER)
SELECT CASE s$
CASE "A"
linez x, y + 9 * p, x, y + 2 * p, t, c
linez x, y + 2 * p, x + 2 * p, y, t, c
linez x + 2 * p, y, x + 4 * p, y, t, c
linez x + 4 * p, y, x + 6 * p, y + 2 * p, t, c
linez x + 6 * p, y + 2 * p, x + 6 * p, y + 9 * p, t, c
linez x, y + 5 * p, x + 6 * p, y + 5 * p, t, c
CASE "B"
linez x, y, x, y + 9 * p, t, c
linez x, y, x + 6 * p, y, t, c
linez x + 6 * p, y, x + 6 * p, y + 6 * p, t, c
linez x, y + 4 * p, x + 6 * p, y + 4 * p, t, c
linez x + 6 * p, y + 5 * p, x + 6 * p, y + 9 * p, t, c
linez x + 6 * p, y + 9 * p, x, y + 9 * p, t, c
CASE "C"
linez x + 6 * p, y, x + 2 * p, y, t, c
linez x + 2 * p, y, x, y + 2 * p, t, c
linez x, y + 2 * p, x, y + 7 * p, t, c
linez x, y + 7 * p, x + 2 * p, y + 9 * p, t, c
linez x + 2 * p, y + 9 * p, x + 6 * p, y + 9 * p, t, c
CASE "D"
linez x, y, x + 4 * p, y, t, c
linez x + 4 * p, y, x + 6 * p, y + 2 * p, t, c
linez x + 6 * p, y + 2 * p, x + 6 * p, y + 7 * p, t, c
linez x + 6 * p, y + 7 * p, x + 4 * p, y + 9 * p, t, c
linez x + 4 * p, y + 9 * p, x, y + 9 * p, t, c
linez x, y + 9 * p, x, y, t, c
CASE "E"
linez x + 6 * p, y, x, y, t, c
linez x, y, x, y + 9 * p, t, c
linez x, y + 9 * p, x + 6 * p, y + 9 * p, t, c
linez x, y + 4 * p, x + 6 * p, y + 4 * p, t, c
CASE "F"
linez x + 6 * p, y, x, y, t, c
linez x, y, x, y + 9 * p, t, c
linez x, y + 4 * p, x + 6 * p, y + 4 * p, t, c
CASE "G"
linez x + 6 * p, y, x + 1 * p, y, t, c
linez x + 1 * p, y, x, y + 1 * p, t, c
linez x, y + 1 * p, x, y + 8 * p, t, c
linez x, y + 8 * p, x + 1 * p, y + 9 * p, t, c
linez x + 1 * p, y + 9 * p, x + 5 * p, y + 9 * p, t, c
linez x + 5 * p, y + 9 * p, x + 6 * p, y + 8 * p, t, c
linez x + 6 * p, y + 8 * p, x + 6 * p, y + 5 * p, t, c
linez x + 6 * p, y + 5 * p, x + 4 * p, y + 5 * p, t, c
linez x + 4 * p, y + 5 * p, x + 4 * p, y + 7 * p, t, c
CASE "H"
linez x, y, x, y + 9 * p, t, c
linez x + 6 * p, y, x + 6 * p, y + 9 * p, t, c
linez x, y + 4 * p, x + 6 * p, y + 4 * p, t, c
CASE "I"
linez x, y, x + 6 * p, y, t, c
linez x, y + 9 * p, x + 6 * p, y + 9 * p, t, c
linez x + 3 * p, y, x + 3 * p, y + 9 * p, t, c
CASE "J"
linez x, y, x + 6 * p, y, t, c
linez x + 4 * p, y, x + 4 * p, y + 8 * p, t, c
linez x + 4 * p, y + 8 * p, x + 3 * p, y + 9 * p, t, c
linez x + 3 * p, y + 9 * p, x + 1 * p, y + 9 * p, t, c
linez x + 1 * p, y + 9 * p, x, y + 8 * p, t, c
linez x, y + 8 * p, x, y + 6 * p, t, c
CASE "K"
linez x, y, x, y + 9 * p, t, c
linez x + 6 * p, y, x + 6 * p, y + 1 * p, t, c
linez x + 6 * p, y + 1 * p, x, y + 4 * p, t, c
linez x, y + 4 * p, x + 6 * p, y + 8 * p, t, c
linez x + 6 * p, y + 8 * p, x + 6 * p, y + 9 * p, t, c
CASE "L"
linez x, y, x, y + 9 * p, t, c
linez x, y + 9 * p, x + 6 * p, y + 9 * p, t, c
CASE "M"
linez x, y + 9 * p, x, y, t, c
linez x, y, x + 3 * p, y + 4 * p, t, c
linez x + 3 * p, y + 4 * p, x + 6 * p, y, t, c
linez x + 6 * p, y, x + 6 * p, y + 9 * p, t, c
CASE "N"
linez x, y + 9 * p, x, y, t, c
linez x, y, x + 6 * p, y + 9 * p, t, c
linez x + 6 * p, y + 9 * p, x + 6 * p, y, t, c
CASE "O"
linez x, y, x + 6 * p, y, t, c
linez x, y, x, y + 9 * p, t, c
linez x, y + 9 * p, x + 6 * p, y + 9 * p, t, c
linez x + 6 * p, y, x + 6 * p, y + 9 * p, t, c
CASE "P"
linez x, y + 5 * p, x + 6 * p, y + 5 * p, t, c
linez x + 6 * p, y, x + 6 * p, y + 5 * p, t, c
linez x, y, x + 6 * p, y, t, c
linez x, y, x, y + 9 * p, t, c
CASE "Q"
linez x, y, x + 4 * p, y, t, c
linez x, y, x, y + 9 * p, t, c
linez x + 4 * p, y, x + 4 * p, y + 9 * p, t, c
linez x, y + 9 * p, x + 4 * p, y + 9 * p, t, c
linez x + 3 * p, y + 5 * p, x + 3 * p, y + 6 * p, t, c
linez x + 3 * p, y + 6 * p, x + 6 * p, y + 9 * p, t, c
CASE "R"
linez x, y + 9 * p, x, y, t, c
linez x, y, x + 6 * p, y, t, c
linez x + 6 * p, y, x + 6 * p, y + 5 * p, t, c
linez x + 6 * p, y + 5 * p, x, y + 5 * p, t, c
linez x, y + 5 * p, x + 6 * p, y + 9 * p, t, c
CASE "S"
linez x, y, x + 6 * p, y, t, c
linez x, y, x, y + 4 * p, t, c
linez x, y + 4 * p, x + 6 * p, y + 4 * p, t, c
linez x + 6 * p, y + 4 * p, x + 6 * p, y + 9 * p, t, c
linez x, y + 9 * p, x + 6 * p, y + 9 * p, t, c
CASE "T"
linez x, y, x + 6 * p, y, t, c
linez x + 3 * p, y, x + 3 * p, y + 9 * p, t, c
CASE "U"
linez x, y, x, y + 9 * p, t, c
linez x, y + 9 * p, x + 6 * p, y + 9 * p, t, c
linez x + 6 * p, y, x + 6 * p, y + 9 * p, t, c
CASE "V"
linez x, y, x + 3 * p, y + 9 * p, t, c
linez x + 3 * p, y + 9 * p, x + 6 * p, y, t, c
CASE "W"
linez x, y, x, y + 9 * p, t, c
linez x, y + 9 * p, x + 3 * p, y + 5 * p, t, c
linez x + 3 * p, y + 5 * p, x + 6 * p, y + 9 * p, t, c
linez x + 6 * p, y + 9 * p, x + 6 * p, y, t, c
CASE "X"
linez x, y, x + 6 * p, y + 9 * p, t, c
linez x, y + 9 * p, x + 6 * p, y, t, c
CASE "Y"
linez x, y, x + 3 * p, y + 5 * p, t, c
linez x + 3 * p, y + 5 * p, x + 6 * p, y, t, c
linez x + 3 * p, y + 5 * p, x + 3 * p, y + 9 * p, t, c
CASE "Z"
linez x, y, x + 6 * p, y, t, c
linez x + 6 * p, y, x, y + 9 * p, t, c
linez x, y + 9 * p, x + 6 * p, y + 9 * p, t, c
CASE "."
linez x, y + 9 * p, x, y + 9 * p, t, c
CASE ","
linez x + 1 * p, y + 9 * p, x, y + 10 * p, t, c
CASE " "
CASE "1"
linez x + 1 * p, y + 1 * p, x + 2 * p, y, t, c
linez x + 2 * p, y, x + 2 * p, y + 9 * p, t, c
linez x, y + 9 * p, x + 6 * p, y + 9 * p, t, c
CASE "2"
linez x, y + 1 * p, x + 1 * p, y, t, c
linez x + 1 * p, y, x + 5 * p, y, t, c
linez x + 5 * p, y, x + 6 * p, y + 1 * p, t, c
linez x + 6 * p, y + 1 * p, x + 6 * p, y + 4 * p, t, c
linez x + 6 * p, y + 4 * p, x, y + 9 * p, t, c
linez x, y + 9 * p, x + 6 * p, y + 9 * p, t, c
CASE "3"
linez x, y + 1 * p, x + 1 * p, y, t, c
linez x + 1 * p, y, x + 5 * p, y, t, c
linez x + 5 * p, y, x + 6 * p, y + 1 * p, t, c
linez x + 6 * p, y + 1 * p, x + 6 * p, y + 8 * p, t, c
linez x + 1 * p, y + 4 * p, x + 6 * p, y + 4 * p, t, c
linez x + 1 * p, y + 9 * p, x + 5 * p, y + 9 * p, t, c
linez x + 5 * p, y + 9 * p, x + 6 * p, y + 9 * p, t, c
CASE "4"
linez x + 4 * p, y + 9 * p, x + 6 * p, y + 9 * p, t, c
linez x + 5 * p, y + 9 * p, x + 5 * p, y, t, c
linez x + 5 * p, y, x, y + 5 * p, t, c
linez x, y + 5 * p, x, y + 6 * p, t, c
linez x, y + 6 * p, x + 6 * p, y + 6 * p, t, c
CASE "5"
linez x, y, x + 6 * p, y, t, c
linez x, y, x, y + 3 * p, t, c
linez x, y + 3 * p, x + 5 * p, y + 3 * p, t, c
linez x + 5 * p, y + 3 * p, x + 6 * p, y + 4 * p, t, c
linez x + 6 * p, y + 4 * p, x + 6 * p, y + 9 * p, t, c
linez x + 1 * p, y + 9 * p, x + 6 * p, y + 9 * p, t, c
linez x, y + 8 * p, x + 1, y + 9 * p, t, c
CASE "6"
linez x + 6 * p, y + 1 * p, x + 5 * p, y, t, c
linez x + 5 * p, y, x + 1 * p, y, t, c
linez x + 1 * p, y, x, y + 1 * p, t, c
linez x, y + 1 * p, x, y + 8 * p, t, c
linez x, y + 8 * p, x + 1 * p, y + 9 * p, t, c
linez x + 1 * p, y + 9 * p, x + 5 * p, y + 9 * p, t, c
linez x + 5 * p, y + 9 * p, x + 6 * p, y + 8 * p, t, c
linez x + 6 * p, y + 8 * p, x + 6 * p, y + 5 * p, t, c
linez x + 6 * p, y + 5 * p, x + 5 * p, y + 4 * p, t, c
linez x + 5 * p, y + 4 * p, x, y + 4 * p, t, c
CASE "7"
linez x, y, x + 6 * p, y, t, c
linez x + 6 * p, y, x + 6 * p, y + 3 * p, t, c
linez x + 6 * p, y + 3 * p, x + 4 * p, y + 5 * p, t, c
linez x + 4 * p, y + 5 * p, x + 4 * p, y + 9 * p, t, c
CASE "8"
linez x + 1 * p, y, x + 5 * p, y, t, c
linez x + 5 * p, y, x + 6 * p, y + 1 * p, t, c
linez x + 6 * p, y + 1 * p, x + 6 * p, y + 3 * p, t, c
linez x + 6 * p, y + 3 * p, x + 5 * p, y + 4 * p, t, c
linez x + 5 * p, y + 4 * p, x + 1 * p, y + 4 * p, t, c
linez x + 1 * p, y + 4 * p, x, y + 3 * p, t, c
linez x, y + 3 * p, x, y + 1 * p, t, c
linez x, y + 1 * p, x + 1 * p, y, t, c
linez x, y + 5 * p, x + 1 * p, y + 4 * p, t, c
linez x + 5 * p, y + 4 * p, x + 6 * p, y + 5 * p, t, c
linez x, y + 5 * p, x, y + 8 * p, t, c
linez x + 6 * p, y + 5 * p, x + 6 * p, y + 8 * p, t, c
linez x, y + 8 * p, x + 1 * p, y + 9 * p, t, c
linez x + 5 * p, y + 9 * p, x + 6 * p, y + 8 * p, t, c
linez x + 1 * p, y + 9 * p, x + 5 * p, y + 9 * p, t, c
CASE "9"
linez x + 1 * p, y + 4 * p, x + 6 * p, y + 4 * p, t, c
linez x, y + 3 * p, x + 1, y + 4 * p, t, c
linez x, y + 1 * p, x, y + 3 * p, t, c
linez x, y + 1 * p, x + 1 * p, y, t, c
linez x + 1 * p, y, x + 5 * p, y, t, c
linez x + 5 * p, y, x + 6 * p, y + 1 * p, t, c
linez x + 6 * p, y + 1 * p, x + 6 * p, y + 8 * p, t, c
linez x + 6 * p, y + 8 * p, x + 5 * p, y + 9 * p, t, c
linez x + 5 * p, y + 9 * p, x + 1 * p, y + 9 * p, t, c
linez x, y + 8 * p, x + 1 * p, y + 9 * p, t, c
CASE "0"
linez x + 1 * p, y, x + 5 * p, y, t, c
linez x + 5 * p, y, x + 6 * p, y + 1 * p, t, c
linez x + 6 * p, y + 1 * p, x + 6 * p, y + 8 * p, t, c
linez x + 5 * p, y + 9 * p, x + 6 * p, y + 8 * p, t, c
linez x + 1 * p, y + 9 * p, x + 5 * p, y + 9 * p, t, c
linez x, y + 8 * p, x + 1 * p, y + 9 * p, t, c
linez x, y + 1 * p, x, y + 8 * p, t, c
linez x, y + 1 * p, x + 1 * p, y, t, c
CASE "["
linez x, y, x + 1 * p, y, t, c
linez x, y + 9 * p, x + 1 * p, y + 9 * p, t, c
linez x, y, x, y + 9 * p, t, c
CASE "]"
linez x, y, x + 1 * p, y, t, c
linez x, y + 9 * p, x + 1 * p, y + 9 * p, t, c
linez x + 1 * p, y, x + 1 * p, y + 9 * p, t, c
CASE "\"
linez x, y, x + 6 * p, y + 9 * p, t, c
CASE "/"
linez x, y + 9 * p, x + 6 * p, y, t, c
CASE "`"
linez x, y, x + 1 * p, y + 1 * p, t, c
CASE "-"
linez x, y + 4 * p, x + 6 * p, y + 4 * p, t, c
CASE "="
linez x, y + 3 * p, x + 6 * p, y + 3 * p, t, c
linez x, y + 5 * p, x + 6 * p, y + 5 * p, t, c
CASE "|"
linez x + 3 * p, y, x + 3 * p, y + 3 * p, t, c
linez x + 3 * p, y + 5 * p, x + 3 * p, y + 9 * p, t, c
CASE ":"
linez x + 3 * p, y + 3 * p, x + 3 * p, y + 3 * p, t, c
linez x + 3 * p, y + 5 * p, x + 3 * p, y + 5 * p, t, c
CASE "*"
linez x + 2 * p, y + 3 * p, x + 4 * p, y + 5 * p, t, c
linez x + 2 * p, y + 5 * p, x + 4 * p, y + 3 * p, t, c
linez x + 3 * p, y + 3 * p, x + 3 * p, y + 5 * p, t, c
CASE "+"
linez x + 3 * p, y + 3 * p, x + 3 * p, y + 5 * p, t, c
linez x + 2 * p, y + 4 * p, x + 4 * p, y + 4 * p, t, c
CASE "!"
linez x + 1 * p, y, x + 1 * p, y + 7 * p, t, c
linez x + 1 * p, y + 9 * p, x + 1 * p, y + 9 * p, t, c
CASE "@"
linez x + 5 * p, y + 9 * p, x + 1 * p, y + 9 * p, t, c
linez x + 1 * p, y + 9 * p, x, y + 8 * p, t, c
linez x, y + 8 * p, x, y + 1 * p, t, c
linez x, y + 1 * p, x + 1 * p, y, t, c
linez x + 1 * p, y, x + 5 * p, y, t, c
linez x + 5 * p, y, x + 6 * p, y + 1 * p, t, c
linez x + 6 * p, y + 1 * p, x + 6 * p, y + 7 * p, t, c
linez x + 6 * p, y + 7 * p, x + 2 * p, y + 7 * p, t, c
linez x + 2 * p, y + 7 * p, x + 2 * p, y + 2 * p, t, c
linez x + 2 * p, y + 2 * p, x + 5 * p, y + 2 * p, t, c
linez x + 5 * p, y + 2 * p, x + 6 * p, y + 3 * p, t, c
CASE "#"
linez x + 2 * p, y, x + 2 * p, y + 9 * p, t, c
linez x + 4 * p, y, x + 4 * p, y + 9 * p, t, c
linez x, y + 3 * p, x + 6 * p, y + 4 * p, t, c
linez x, y + 5 * p, x + 6 * p, y + 5 * p, t, c
CASE "$"
linez x + 6 * p, y + 1 * p, x + 5 * p, y, t, c
linez x + 5 * p, y, x + 1 * p, y, t, c
linez x + 1 * p, y, x, y + 1 * p, t, c
linez x, y + 1 * p, x + 6 * p, y + 8 * p, t, c
linez x + 6 * p, y + 8 * p, x + 5 * p, y + 9 * p, t, c
linez x + 5 * p, y + 9 * p, x + 1 * p, y + 9 * p, t, c
linez x + 1 * p, y + 9 * p, x, y + 8 * p, t, c
linez x + 3 * p, y, x + 3 * p, y + 9 * p, t, c
CASE "%"
linez x, y + 9 * p, x + 6 * p, y, t, c
linez x + 2 * p, y + 3 * p, x + 2 * p, y + 3 * p, t, c
linez x + 4 * p, y + 5 * p, x + 4 * p, y + 5 * p, t, c
CASE "^"
linez x + 1 * p, y + 2 * p, x + 3 * p, y, t, c
linez x + 3 * p, y, x + 5 * p, y + 2 * p, t, c
CASE "&"
linez x + 6 * p, y + 9 * p, x, y + 1 * p, t, c
linez x, y + 1 * p, x + 1 * p, y, t, c
linez x + 1 * p, y, x + 2 * p, y, t, c
linez x + 2 * p, y, x, y + 6 * p, t, c