Thread View: net.micro.atari
1 messages
1 total messages
Started by utzoodecvaxharpoihnp4ihlpbbryan
Mon, 17 Jan 1983 12:29
sketch program
Author: utzoodecvaxharpoihnp4ihlpbbryan
Date: Mon, 17 Jan 1983 12:29
Date: Mon, 17 Jan 1983 12:29
41 lines
1781 bytes
1781 bytes
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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads