Megalextoria
Retro computing and gaming, sci-fi books, tv and movies and other geeky stuff.

Home » Archive » net.micro.atari » sketch program
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
sketch program [message #10594] Wed, 08 August 2012 00:54
Anonymous
Karma:
Originally posted by: utzoo!decvax!harpo!ihnp4!ihlpb!bryan

<pre>Article-I.D.: ihlpb.243
Posted: Mon Jan 17 12:29:11 1983
Received: Wed Jan 19 06:32:26 1983
Reply-To: bryan@ihlpb.UUCP (Bryan K. DeLaney)


This sketch program uses paddles to sketch on the
screen. The buttons on the paddles control erasing,
filling, and the lifting of the "pen"; when the pen
is up (off the screen), the other button controls the
fill. when the "pen" is down (on the screen), the other
button will erase the screen. To change the color, retype
line 50, substituting any number between 0 and 15 for 1.

ihlpb!bryan

1 REM PLUG PADDLES INTO PORT 2
5 DIM A(2000),B(2000)
10 GRAPHICS 7+16
20 SETCOLOR 4,0,11:COLOR 0
30 X=INT((PADDLE(2)/228)*159)
40 Y=INT((PADDLE(3)/228)*95)
50 INK=1
60 SETCOLOR 0,INK,4:COLOR 1:PLOTX,Y
70 DRAWTO X,Y
80 X=INT((PADDLE(2)/228)*159)
90 Y=INT((PADDLE(3)/228)*95)
100 IF PTRIG(2)=0 THEN 10
110 IF PTRIG(3)=0 THEN FOR I=0 TO 150:NEXT I:COLOR 1:GOTO 200
120 GOTO 70
200 LOCATE X,Y,K
210 X1=INT((PADDLE(2)/228)*159)
220 Y1=INT((PADDLE(3)/228)*95)
225 IF X1=X and Y1=Y THEN BK=1-BK:COLOR BK:PLOT X1,Y1:GOTO 250
230 COLOR K:PLOT X,Y
250 IF PTRIG(3)=0 THEN FOR I=0 TO 150:NEXT I:COLOR 1:GOTO 120
240 X=X1:Y=Y1:GOTO 200
260 IF PTRIG(2)=0 THEN COLOR K:PLOT X,Y:GOSUB 300:GOTO 200
270 GOTO 210
300 P=1:A(P)=X:B(P)=Y:COLOR 1
310 GOSUB 350:IF P THEN 310
320 RETURN
350 A=A(P):B=B(P):IF A<0 OR A>159 OR B<0 OR B>95 THEN P=P-A:RETURN
355 LOCATE A,B,KK:IF KK=1 THEN P=P-1:RETURN
360 PLOT A,B:A(P)=A:B(P)=B+1:A(P+1)=A-1:B(P+1)=B:A(P+2)=A+1:B(P+2)=B
361 A(P+3)=A:B(P+3)=A:B(P+3)=B-1:P=P+3:RETURN
</pre>
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re:Atari cartridges
Next Topic: Re: re: atari cartridges
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Mar 28 21:37:52 EDT 2024

Total time taken to generate the page: 0.08298 seconds