Light Gun Drawing Program (DRAWGUN.BAS)
Light Gun Drawing Program by Matthew Ratcliff, 8
Description
Light Gun Drawing Program by Matthew Ratcliff, 8
From the Antic disk of August 1988 (Vol. 7 No. 4) — disk A.
From the Antic Software Archive at atarimagazines.com. The program remains the property of its author and publisher.
What is in this file
Atari BASIC program · 896 bytes
- Dialect
- Atari BASIC
- Lines
- 21
- Variables
LPENH,LPENV,STRIG0,X,Y,A,XMAX,YMAX,CH,YMIN,XMIN
BASIC listing (21 lines)
10 REM DRAWGUN.BAS
20 REM BY MATTHEW RATCLIFF
30 REM (c)1988, ANTIC PUBLISHING
40 XMAX=0:YMAX=0:CH=764
60 LPENH=564:LPENV=565
80 GRAPHICS 8+16:POKE 709,0:POKE 710,10+7*16:POKE 712,12
90 X=PEEK(LPENH)
100 IF (X<=27) THEN X=227+X
110 X=X-86
120 REM SCALER -> (227-86+27)=168
130 X=319*X/168:REM 86 <= LPENH <= 227, PAST 227 THEN 0-27
140 IF X<0 THEN X=0
150 IF X>319 THEN X=319
160 Y=PEEK(LPENV)
170 Y=Y-17
180 REM SCALER -> (111-17)=94
190 Y=191*Y/94:REM 17 <= LPENH <= 111 IN MY TESTS
200 IF Y<0 THEN Y=0
210 IF Y>191 THEN Y=191
220 IF STICK(0)=14 THEN LOCATE X,Y,A:COLOR 0:PLOT X,Y:COLOR 1:PLOT X,Y:COLOR A:PLOT X,Y:GOTO 90
230 COLOR 1:PLOT X,Y:GOTO 90
