💾 Archived View for mirrors.apple2.org.za › archive › ground.icaen.uiowa.edu › upl2000 › Jan › CLRDR… captured on 2023-01-29 at 11:28:01.

View Raw

More Information

-=-=-=-=-=-=-

 5 CL = 7
 7 QA = 160
 20  TEXT : HOME 
 30  PRINT "Color Hires Drawing with Pix^2 vers. 2": PRINT 
 50  PRINT : PRINT "Press Any Key To Continue...": GET A$
 51  GOSUB 20000
 52  GOSUB 40888
 54  GOSUB 50000
 55  HTAB 1: VTAB 24: PRINT "Press (?) for a list of commands.";
 60  HGR : HTAB 1: VTAB 21: POKE 35,23: GOSUB 10000
 70  IF IR = 1 THEN  GOSUB 20100
 72  IF IR = 2 THEN  GOSUB 20200
 74  IF IR = 3 THEN  GOSUB 20300
 76  IF IR = 4 THEN  GOSUB 20400
 85 B9 = ( PEEK (112) * 256) +  PEEK (111): IF B9 < 20480 THEN B9 =  FRE 
     (0)
 95 K =  PEEK ( - 16384) - 128: POKE  - 16384,0: POKE  - 16368,0:K$ = "":
      IF K > 0 THEN K$ =  CHR$ (K)
 100  IF K$ = "N" THEN  HGR 
 101  IF K$ = "O" THEN  INPUT "FILE NAME: ";F$: PRINT  CHR$ (4);"BLOAD "F
     $",A8192"
 102  IF K$ = "P" THEN  INPUT "DIRECTORY NAME: ";F$: PRINT  CHR$ (4);"PRE
     FIX "F$
 103  IF K$ = "S" THEN  INPUT "FILE NAME: ";F$: PRINT  CHR$ (4);"BSAVE "F
     $",A8192,L8192"
 104  IF K$ = "Q" THEN  TEXT : END 
 125  IF K$ = "I" THEN  GOSUB 10100
 127  IF K$ = "C" THEN  GOSUB 10200
 129  HCOLOR= CL
 130  IF P > 127 THEN XX = H:YY = V:ZZ = CL: GOSUB 63999
 135  IF K$ = "D" THEN  GOSUB 30000
 137  IF K$ = "M" THEN CR = CR + 1: IF CR = 6 THEN CR = 1
 138  IF K$ = "?" THEN  GOSUB 50100
 139  IF K$ = "F" THEN  GOSUB 50200
 140  IF CR = 1 THEN  GOSUB 40100
 141  IF CR = 2 THEN  GOSUB 40200
 142  IF CR = 3 THEN  GOSUB 40300
 143  IF CR = 4 THEN  GOSUB 40400
 144  IF CR = 5 THEN  GOSUB 40500
 150  GOTO 70
 10000 L = 16384
 10010  PRINT  CHR$ (4);"BLOAD COLOR.DRAW.SHP,A"L
 10030  POKE 232,0: POKE 233,64
 10040  RETURN 
 10100  ROT= 0: SCALE= 192
 10110  FOR X = 0 TO 279: XDRAW 1 AT X,0: NEXT X
 10120  RETURN 
 10200 PCL = CL
 10210 PCL = PCL + 1
 10220  IF PCL = 8 THEN PCL = 0
 10230 CL = PCL
 10240  HTAB 38: VTAB 24: PRINT  MID$ ("KGPWkobw",CL + 1,1);
 10250  HTAB 1: VTAB 21
 10260  RETURN 
 20000  HOME : PRINT "Please select the input device:": PRINT 
 20005  PRINT " 1) Paddle / Koalapad"
 20006  PRINT " 2) Joystick"
 20007  PRINT " 3) Apple IIgs ADB Mouse"
 20008  PRINT " 4) Keyboard"
 20010  PRINT : GET R$
 20015 IR =  VAL (R$)
 20020  IF IR < 1 OR IR > 4 THEN  GOTO 20000
 20025  IF IR = 2 OR IR = 4 THEN  GOSUB 22000
 20030  IF IR = 3 THEN  GOSUB 23000
 20040  RETURN 
 20100 H =  INT (( PDL (0) / 255) * 139):V =  INT (( PDL (1) / 255) * (QA
      - 1)):P =  PEEK (49249): RETURN 
 20200 TH =  PDL (0):TV =  PDL (1)
 20205  IF TH < 100 THEN H = H - 1
 20210  IF TH > 160 THEN H = H + 1
 20215  IF TV < 100 THEN V = V - 1
 20220  IF TV > 160 THEN V = V + 1
 20225  IF H < 0 THEN H = 0
 20230  IF V < 0 THEN V = 0
 20235  IF H > 139 THEN H = 139
 20240  IF V > (QA - 1) THEN V = (QA - 1)
 20245 P =  PEEK (49249): RETURN 
 20300  PRINT  CHR$ (4);"IN#4": INPUT "";H,V,P: PRINT  CHR$ (4);"IN#0"
 20305  IF P = 1 THEN P = 255
 20310  IF H < 0 THEN H = 0
 20315  IF V < 0 THEN V = 0
 20320  IF H > 139 THEN H = 139
 20325  IF V > (QA - 1) THEN V = (QA - 1)
 20330  RETURN 
 20400 TK =  PEEK ( - 16384) - 128
 20405  IF TK = 13 THEN V = V + 1
 20410  IF TK = 11 THEN H = H + 1
 20415  IF TK = 10 THEN H = H - 1
 20420  IF TK = 9 THEN V = V - 1
 20425  IF H < 0 THEN H = 0
 20430  IF H > 139 THEN H = 139
 20435  IF V < 0 THEN V = 0
 20440  IF V > (QA - 1) THEN V = (QA - 1)
 20445 P =  PEEK (49249): RETURN 
 22000 H = 70:V = 80: RETURN 
 23000  PRINT  CHR$ (4);"PR#4": PRINT  CHR$ (1): PRINT  CHR$ (4);"PR#0": RETURN 

 30000  PRINT : PRINT "Drawing Commands:"
 30010  PRINT "<P>lot <R>ect <L>ine P<o>lygon"
 30015  PRINT "<F>illrect <I>nvrect"
 30020  INPUT "Choice?";C$
 30030  IF C$ = "" OR  MID$ (C$,1,1) = " " THEN  RETURN 
 30040  IF C$ = "P" THEN  INPUT "Coordinate? (X,Y)";XX,YY:ZZ = CL: GOSUB 
     63999
 30045  IF C$ = "p" THEN C$ = "P": GOTO 30040
 30050  IF C$ = "R" OR C$ = "r" THEN  INPUT "Starting Coordinate? (X,Y)";
     RX,RY: INPUT "Ending Coordinate? (X,Y)";RH,RW: HPLOT (RX * 2),RY TO 
     (RH * 2),RY TO (RH * 2),RW TO (RX * 2),RW TO (RX * 2),RY
 30051  IF C$ = "R" OR C$ = "r" THEN  HPLOT (RX * 2) + 1,RY TO (RX * 2) + 
     1,RW: HPLOT (RW * 2) + 1,RY TO (RW * 2) + 1,RW
 30060  IF C$ = "L" OR C$ = "l" THEN  INPUT "Starting Coordinate? (X,Y)";
     RX,RY: INPUT "Ending Coordinate? (X,Y)";RH,RW: HPLOT (RX * 2),RY TO 
     (RH * 2),RW
 30062  IF C$ = "F" OR C$ = "f" THEN  INPUT "Starting Coordinate? (X,Y)";
     RX,RY: INPUT "Ending Coordinate? (X,Y)";RH,RV: FOR XS = RX * 2 TO RH
      * 2: HPLOT XS,RY TO XS,RV: NEXT XS
 30064  IF C$ = "I" OR C$ = "i" THEN  INPUT "Starting Coordinate? (X,Y)";
     RX,RY: INPUT "Ending Coordinate? (X,Y)";RH,RV: ROT= 0: SCALE= (RV - 
     RY) + 1: FOR XS = RX * 2 TO RH * 2: XDRAW 1 AT XS,RV: NEXT XS
 30070  IF C$ <  > "O" AND C$ <  > "o" THEN  GOTO 30000
 30080  INPUT "First Coordinate? (X,Y)";PX,PY: HPLOT (PX * 2),PY
 30090  INPUT "Next Coordinate? (X,Y)";PX,PY
 30100  IF PX = 0 OR PY = 0 THEN  GOTO 30000
 30110  HPLOT  TO (PX * 2),PY
 30120  GOTO 30090
 40100  ROT= 0: SCALE= 192: XDRAW 1 AT H * 2,0: XDRAW 1 AT H * 2,0: ROT= 
     48: SCALE= 140: XDRAW 1 AT 0,V: XDRAW 1 AT 140,V: XDRAW 1 AT 0,V: XDRAW 
     1 AT 140,V
 40150  RETURN 
 40200  ROT= 0: SCALE= 1: XDRAW 2 AT H * 2,V: FOR X = 1 TO 100: NEXT X: XDRAW 
     2 AT H * 2,V: RETURN 
 40300  ROT= 0: SCALE= 1: XDRAW 3 AT H * 2,V: FOR X = 1 TO 100: NEXT X: XDRAW 
     3 AT H * 2,V: RETURN 
 40400  ROT= 0: SCALE= 1: XDRAW 4 AT H * 2,V: FOR X = 1 TO 100: NEXT X: XDRAW 
     4 AT H * 2,V: RETURN 
 40500  ROT= 0: SCALE= 1: XDRAW 5 AT H * 2,V: FOR X = 1 TO 100: NEXT X: XDRAW 
     5 AT H * 2,V: RETURN 
 40888  HOME : PRINT "Please select your mouse cursor:": PRINT 
 40890  PRINT "1) No Pointer (Use Bars)"
 40900  PRINT "2) Arrow"
 40910  PRINT "3) Cross"
 40920  PRINT "4) Crosshair"
 40925  PRINT "5) Pencil"
 40930  PRINT : PRINT 
 40940  GET A$:CR =  VAL (A$)
 40950  IF CR < 1 OR CR > 5 THEN  GOTO 40888
 40960  HOME : RETURN 
 50000  HOME 
 50005  PRINT "Help:": PRINT 
 50010  PRINT " N - Clear the screen (New)"
 50015  PRINT " O - Load a file (Open)"
 50020  PRINT " S - Save a file"
 50025  PRINT " P - Change directories (Prefix)"
 50030  PRINT " C - Change the color"
 50035  PRINT " I - Invert the screen"
 50040  PRINT " D - Drawing commands"
 50045  PRINT " M - Change the mouse pointer"
 50047  PRINT " F - Turn on/off full screen graphics"
 50050  PRINT " ? - Bring up this help screen"
 50055  PRINT " Q - Exit the program (Quit)"
 50060  PRINT : PRINT "Press any key to continue."
 50062  POKE 34,20: REM  PROTECTS TEXT FROM BEING OVERWRITTEN
 50065  RETURN 
 50100  POKE 49233,0
 50110  WAIT  - 16384,128
 50120  POKE  - 16368,0: POKE  - 16384,0
 50130  POKE 49232,0
 50140  RETURN 
 50200  REM  FULL SCREEN TRICK
 50210  IF QA = 160 THEN QA = 192: POKE 49234,0: RETURN 
 50220 QA = 160: POKE 49235,0: RETURN 
 63999  HCOLOR= ZZ: HPLOT XX * 2,YY TO (XX * 2) + 1,YY: RETURN