Compucolor.org – Virtual Media

Listing of file='DRAW2.BAS;01' on disk='vmedia/draw2-sector.ccvf'

1 REM  GET NAME FOR THIS PICTURE
2 PLOT 12:INPUT "NAME FOR THIS PIC? ";UN$:IF LEN (UN$)> 6THEN 2
4 REM  GET OLD PIC, IF THERE IS ONE
5 PLOT 12
6 INPUT "PIC TO EDIT? ";PC$
7 PLOT 12,27,24:IF PC$= "0"THEN 10
8 PLOT 27,4:PRINT "LOA "PC$:PLOT 27,27
10 REM  INITIALIZE
15 DATA 0,-129,-1,127,-128,0,128,-127,1,129
20 FOR X= 0TO 9:READ M(X):NEXT
30 XP= 0:YP= 0:CL= 2
35 PLOT 6,CL
40 NP= 0
45 POKE 33278,0
100 REM  GET USER INPUT (OR LAST CHAR) AND TRANSLATE TO NUMBER, STRING
104 OP= P
105 PLOT 3,0,31
106 IF CN= 0THEN POKE 33278,0
107 IF PEEK (33278)= 0THEN 107
108 P= PEEK (33278):N$= CHR$ (P)
109 N= VAL (N$)
110 IF N< 10AND N> 0THEN MV= M(N):GOTO 300
200 REM  IF NOT 1 THRU 8, SET COLOUR OR COMMAND
220 IF N$= "W"THEN CL= 7
221 IF N$= "Q"THEN CL= 1
222 IF N$= "R"THEN CL= 2
223 IF N$= "T"THEN CL= 4
224 IF N$= "S"THEN CL= 3
225 IF N$= "V"THEN CL= 6
226 IF N$= "U"THEN CL= 5
227 IF N$= "P"THEN CL= 0
228 IF N$= "X"THEN CN= 0
229 IF N$= "C"THEN CN= 1
230 IF N$= "M"THEN MD= 1
231 IF N$= "N"THEN MD= 0
235 IF N$= "K"THEN PLOT 27,4:PRINT "SAVE "UN$".DSP 7000 1000":PLOT 27,27
240 IF P= 29OR P= 30THEN PLOT 2,XP,YP,255
290 PLOT 6,CL
297 POKE 33278,OP
298 IF P= 13THEN PLOT 27,11:END
299 GOTO 400
300 REM  ELSE, PLOT NEW POINT
310 NP= NP+ MV
315 YP= NPAND 127
320 XP= INT (NP/ 128)
325 IF XP< 0OR YP< 0THEN 400
330 PLOT 2,XP,YP,255
335 IF MD= 1THEN PLOT 30,2,XP,YP,255,29
400 REM  DO IT AGAIN
410 GOTO 100