Painting Program - anonymous sharing (as requested) for iPhone/iPod Touch/iPad:
100 SCREEN 1
110 CLS
300 DEF FN PK(A)=PEEK(A)+PEEK(A+1)*256
400 XT=1030
500 YT=1032
600 POKE 1024,0
700 C=5
800 LSET 5,0
1000 P= PEEK(1024) + 1
1005 REM
1010 REM
1020 ON P GOSUB 2000, 3000, 4000, 5000
1030 GOTO 1000
2000 REM NO TOUCH
2999 RETURN
3000 REM TOUCH BEGAN
3010 X1 = FN PK(XT) : Y1 = FN PK(YT)
3020 XT=1030
3030 YT=1032
3035 PSET X1,Y1,C
3040 POKE 1024,0
3050 IF PEEK(1024) = 0 THEN GOTO 3050
3999 RETURN
4000 REM TOUCH MOVED
4010 X2 = FN PK(XT) : Y2 = FN PK(YT)
4020 LINE X1,Y1,X2,Y2,C
4030 X1=X2 : Y1=Y2
4999 RETURN
5000 REM TOUCH RELEASE
5010 X2 = FN PK(XT) : Y2 = FN PK(YT)
5020 LINE X1,Y1,X2,Y2,C
5100 POKE 1024,0
5999 RETURN
110 CLS
300 DEF FN PK(A)=PEEK(A)+PEEK(A+1)*256
400 XT=1030
500 YT=1032
600 POKE 1024,0
700 C=5
800 LSET 5,0
1000 P= PEEK(1024) + 1
1005 REM
1010 REM
1020 ON P GOSUB 2000, 3000, 4000, 5000
1030 GOTO 1000
2000 REM NO TOUCH
2999 RETURN
3000 REM TOUCH BEGAN
3010 X1 = FN PK(XT) : Y1 = FN PK(YT)
3020 XT=1030
3030 YT=1032
3035 PSET X1,Y1,C
3040 POKE 1024,0
3050 IF PEEK(1024) = 0 THEN GOTO 3050
3999 RETURN
4000 REM TOUCH MOVED
4010 X2 = FN PK(XT) : Y2 = FN PK(YT)
4020 LINE X1,Y1,X2,Y2,C
4030 X1=X2 : Y1=Y2
4999 RETURN
5000 REM TOUCH RELEASE
5010 X2 = FN PK(XT) : Y2 = FN PK(YT)
5020 LINE X1,Y1,X2,Y2,C
5100 POKE 1024,0
5999 RETURN
No comments:
Post a Comment