REDRAW stores pictures made with the QDRAW drawing program in a more compact form and redraws them from within your own programs, such as adventures. One call to BASIC_DRAW at line 11000 redraws a picture. You MERGE ADD_TO_REDRAW_bas with REDRAW_bas and then MERGE the result into your own program; EXAMPLE_bas shows how.
The routines are credited to A. Towers, 1985. The download includes REDRAW_doc, a Quill document describing them.
Potential Issues
EXAMPLE_basloads a picture file,PIC_dat, which was lost from the disk image, so the example stops with “not found”. QDRAW itself also did not survive complete.
It came from a QL owner’s floppy copies of QUANTA and IQLUG library material, imaged double-stepped so that only half of each disk survived; this file read back complete. The download holds the files exactly as recovered and a QL5A floppy image, REDRAW.img, with the same files and their QDOS headers. Mount the image as FLP1_ (drop it on the QLRun page, or use it as a floppy image in sQLux, QPC2 or Q-emuLator) and type lrun flp1_EXAMPLE_bas. In the image copies only, MDV1_ reads FLP1_ so the program finds its files on the floppy.
Not tested beyond loading, because the example picture is missing.
Source Code
11000 DEFine PROCedure BASIC_DRAW
11010 ro=0:col=0:CLS
11020 REPeat drw
11030 sort=BSTORE(ro,col)
11050 SELect ON sort
11060 =76:ADVANCE:DLIN
11062 =77:ADVANCE
11064 adds=BSTORE(ro,col)
11066 ADVANCE:POKE_DUMMY 2
11070 =82:ADVANCE:DRECTANGLE
11080 =67:ADVANCE:DCIRCLE
11085 =80:ADVANCE:DPOINT
11090 =83:ADVANCE:DSHAPE
11095 =68:ADVANCE:DDRAW
11100 =REMAINDER :EXIT drw
11110 END SELect
11120 END REPeat drw
11130 FILL 0
11140 END DEFine BASIC_DRAW
11150 :
11160 DEFine PROCedure DLIN
11170 FOR n=0 TO 5
11180 SELect ON n
11185 =0:ic=BSTORE(ro,col)
11190 =1:b=BSTORE(ro,col)
11200 =2:dx=BSTORE(ro,col)
11210 =3:dy=BSTORE(ro,col)
11220 =4:x=BSTORE(ro,col)
11230 =5:y=BSTORE(ro,col)
11240 END SELect
11250 ADVANCE
11260 NEXT n
11265 INK ic
11270 IF b=0 THEN
11280 LINE dx,dy TO x,y
11290 ELSE
11300 ARC dx,dy TO x,y,b
11310 END IF
11320 END DEFine DLINE
11330 :
11340 DEFine PROCedure DCIRCLE
11350 FOR n=0 TO 6
11360 SELect ON n
11370 =0:ic=BSTORE(ro,col)
11380 =1:fi=BSTORE(ro,col)
11390 =2:dx=BSTORE(ro,col)
11400 =3:dy=BSTORE(ro,col)
11410 =4:size=BSTORE(ro,col)
11420 =5:ec=BSTORE(ro,col)
11430 =6:ang=BSTORE(ro,col)
11440 END SELect
11450 ADVANCE
11460 NEXT n
11470 FILL fi:INK ic
11480 CIRCLE dx,dy,size,ec,ang
11485 FILL 0
11490 END DEFine DCIRCLE
11500 :
11510 DEFine PROCedure DRECTANGLE
11520 FOR n=0 TO 5
11530 SELect ON n
11540 =0:ic=BSTORE(ro,col)
11550 =1:fi=BSTORE(ro,col)
11560 =2:dx=BSTORE(ro,col)
11570 =3:dy=BSTORE(ro,col)
11580 =4:x=BSTORE(ro,col)
11590 =5:y=BSTORE(ro,col)
11600 END SELect
11610 ADVANCE
11620 NEXT n
11630 INK ic
11632 IF fi=1 THEN
11640 FILL fi:LINE x,y TO x,dy
11650 LINE dx,y TO dx,dy
11652 ELSE
11653 LINE dx,dy TO dx,y TO x,y TO x,dy TO dx,dy
11654 END IF
11655 FILL 0
11660 END DEFine DRECTANGLE
11670 :
11680 DEFine PROCedure DSHAPE
11690 FOR n=0 TO 2
11700 SELect ON n=0:ic=BSTORE(ro,col)
11710 SELect ON n=1:fi=BSTORE(ro,col):FILL fi
11715 SELect ON n=2:sc=BSTORE(ro,col)
11720 ADVANCE
11730 NEXT n
11731 INK ic
11732 n=INT(256/sc):SCALE n,0,0
11740 c=BSTORE(ro,col):ADVANCE
11750 sx=BSTORE(ro,col):ADVANCE
11760 sy=BSTORE(ro,col):ADVANCE
11790 LINE sx,sy
11800 FOR n=3 TO c+1 STEP 2
11802 xx=BSTORE(ro,col):ADVANCE
11804 yy=BSTORE(ro,col):ADVANCE
11810 LINE TO xx,yy
11820 NEXT n
11830 LINE TO sx,sy:FILL 0
11837 SCALE 256,0,0
11840 END DEFine DSHAPE
11850 :
11860 DEFine PROCedure DDRAW
11861 px=BSTORE(ro,col):ADVANCE
11862 py=BSTORE(ro,col):ADVANCE
11863 ic=BSTORE(ro,col)-900:INK ic:ADVANCE
11864 LINE px,py:PENDOWN:TURNTO 0
11870 REPeat loop
11880 n=BSTORE(ro,col):ADVANCE
11890 SELect ON n
11900 =900 TO 1155:INK n-900
11910 =500 TO 859:TURNTO n-500
11920 =880:EXIT loop
11930 =REMAINDER :MOVE n
11940 END SELect
11950 END REPeat loop
11955 PENUP
11960 END DEFine DDRAW
11970 :
11980 DEFine PROCedure DPOINT
11990 ic=BSTORE(ro,col):ADVANCE:INK ic
12000 x=BSTORE(ro,col):ADVANCE
12010 y=BSTORE(ro,col):ADVANCE
12020 POINT x,y:POINT x,y-1
12030 END DEFine DPOINTNote: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.