home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
17 Bit Software 1: Collection A
/
17Bit_Collection_A.iso
/
files
/
36.dms
/
36.adf
/
crayons.bas
< prev
next >
Wrap
BASIC Source File
|
1988-05-22
|
4KB
|
110 lines
10 'CRAYONS! - Robert Sawdey - 10/21/85
20 ' title1
30 screen 0,4,0:scnclr:print " "
40 rgb 0,0,0,0:rgb 1,0,0,0:rgb 2,12,0,12:rgb 3,5,13,0:rgb 4,0,0,0:rgb 15,0,0,0
50 peno 4:box(68,6;240,166),0:print at (11,9);"Created exclusively";at (19,11);"for";at (12,13);"Slipped Disk Inc."
60 pena 0:box(14,14;153,40),1:print at (4,4);"C R A Y O N S !"
70 box(166,136;288,158),1:print at (23,19);"Robert Sawdey"
80 pena 2:paint(95,50),1:rgb 4,15,15,2:pena 3:paint(16,16),1:paint(170,140),1:sleep(1000000)*5
90 for j%=0 to 15:for i%=2 to 4:ask rgb i%,r%,g%,b%
100 if r%>0 then r%=r%-1
110 if g%>0 then g%=g%-1
120 if b%>0 then b%=b%-1
130 rgb i%,r%,g%,b%:sleep(12000):next i%:next j%
140 ' setup pallet
150 rgb 0,0,0,0:' screen color
160 rgb 1,15,15,15:' text color
170 rgb 2,0,0,15:' border
180 rgb 3,0,15,7
190 rgb 4,15,15,0
200 rgb 5,15,10,0
210 rgb 6,15,0,0
220 rgb 7,15,0,15
230 rgb 15,15,15,15
240 ' initialize
250 pena 1:penb 1:peno 1:scnclr:print" "
260 print at (12,5);"C R A Y O N S !"
270 print at (6,7);"Point & Press to Select Mode"
280 print at (11,9);"Select * to Quit"
290 print at (5,11);"Press & release Two Points for"
300 print at (8,13);"Lines, Boxes, and Circles":print at (1,1);"";
310 sleep(1000000)*5:mode%=1:scnclr:goto 400
320 if x%<300 then mode%=5
330 if x%<257 then mode%=4
340 if x%<201 then mode%=3
350 if x%<169 then mode%=2
360 if x%<129 then mode%=1
370 if x%<89 and x%>46 then gosub 500:mode%=save%:goto 410
380 if x%<41 and x%>14 then scnclr:mode%=save%:goto 410
390 if x%<9 then goto 1070
400 save%=mode%
410 print at (1,1);"*";inverse(1);" New Color Draw Line Box Circle Fill"
420 if mode%=1 then print at (13,1);"Draw"
430 if mode%=2 then print at (18,1);"Line"
440 if mode%=3 then print at (23,1);"Box"
450 if mode%=4 then print at (27,1);"Circle"
460 if mode%=5 then print at (34,1);"Fill"
470 print at (1,1);"";
480 on mode% gosub 670,720,820,920,1010
490 goto 320
500 drawmode 0:' COLOR
510 for i%=0 to 7
520 peno i%:pena i%:box(i%*37,0;i%*37+36,7),1
530 next
540 ask mouse x%,y%,b%:if b%<>0 then goto 540
550 ask mouse x%,y%,b%:if b%=0 then goto 550
560 if y%>9 then goto 550
570 if x%<295 then c%=7
580 if x%<258 then c%=6
590 if x%<221 then c%=5
600 if x%<184 then c%=4
610 if x%<147 then c%=3
620 if x%<110 then c%=2
630 if x%<73 then c%=1
640 if x%<36 then c%=0
650 pena c%:penb c%:peno c%
660 return
670 drawmode 0:' DRAW
680 ask mouse x%,y%,b%:if b%<>0 then goto 680
690 ask mouse x%,y%,b%:if b%=0 then goto 690
700 if y%<9 then return
710 draw(x%,y%):goto 690
720 drawmode 2:' RUBBER LINE
730 ask mouse x2%,y2%,b%:if b%<>0 then goto 730
740 ask mouse x1%,y1%,b%:if b%=0 then goto 740
750 ask mouse x1%,y1%,b%:if b%<>0 then goto 750
760 if y1%<9 then x%=x1%:y%=y1%:return
770 draw(x1%,y1%;x2%,y2%):draw(x1%,y1%;x2%,y2%)
780 ask mouse x2%,y2%,b%
790 if y2%<9 then goto 720
800 if b%=0 then goto 770
810 drawmode 0:draw(x1%,y1%;x2%,y2%):goto 720
820 drawmode 2:' RUBBER BOX
830 ask mouse x2%,y2%,b%:if b%<>0 then goto 830
840 ask mouse x1%,y1%,b%:if b%=0 then goto 840
850 ask mouse x1%,y1%,b%:if b%<>0 then goto 850
860 if y1%<9 then x%=x1%:y%=y1%:return
870 box(x1%,y1%;x2%,y2%):box(x1%,y1%;x2%,y2%)
880 ask mouse x2%,y2%,b%
890 if y2%<9 then goto 820
900 if b%=0 then goto 870
910 drawmode 0:box(x1%,y1%;x2%,y2%):goto 820
920 drawmode 2:' RUBBER CIRCLE
930 ask mouse x2%,y2%,b2%:if b2%<>0 then goto 930
940 ask mouse x1%,y1%,b1%:if b1%=0 then goto 940
950 if y1%<9 then x%=x1%:y%=y1%:return
960 circle(x1%,y1%),sqr((((x1%-x2%)^2)+((y1%-y2%)^2))),.9:circle(x1%,y1%),sqr((((x1%-x2%)^2)+((y1%-y2%)^2))),.9
970 ask mouse x2%,y2%,b2%
980 if y2%<9 then goto 920
990 if b2%=0 then goto 960
1000 drawmode 0:circle(x1%,y1%),sqr((((x1%-x2%)^2)+((y1%-y2%)^2))),.9:goto 920
1010 drawmode 0:' FILL
1020 ask mouse x%,y%,b%:if b%<>0 then goto 1020
1030 ask mouse x%,y%,b%:if b%=0 then goto 1030
1040 if y%<9 then return
1050 paint(x%,y%),1:goto 1020
1060 ' CLEAN UP & GO HOME
1070 rgb 0,6,9,15:rgb 1,0,0,0:rgb 2,15,15,15:rgb 3,15,9,10:rgb 4,14,3,0:rgb 5,15,11,0:rgb 6,15,15,2:rgb 7,11,15,0
1080 rgb 8,5,13,0:rgb 9,0,14,13:rgb 10,7,13,15:rgb 11,12,0,14:rgb 12,15,2,14:rgb 13,15,13,11:rgb 14,12,9,8:rgb 15,11,11,11
1090 scnclr:print" "