home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Commodore Disk User Volume 1 #3
/
Commodore_Disk_User_Vol.1_3_1988_-.d64
/
balls
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
1KB
|
46 lines
100 poke53280,0:poke53281,0:print"[159][147]";
110 s=1024:dq=55296-s
120 pokes+dq,6:pokes,96:pokes+dq+39,6:pokes+39,96
130 pokes+dq+960,6:pokes+960,96:pokes+dq+999,6:pokes+999,96
140 fori=s+1tos+38:pokei+dq,6:pokei,100:next
150 fori=s+79tos+959step40:pokei+dq,6:pokei,101:next
160 fori=s+961tos+998:pokei+dq,6:pokei,99:next
170 fori=s+40tos+920step40:pokei+dq,6:pokei,103:next
190 deffnr(x)=int(peek(56324)*x/256)
200 dimx(20),y(20),xd(20),yd(20)
210 n=6
220 fori=1ton
230 x(i)=fnr(30)+5
240 y(i)=fnr(20)+2
241 ifpeek(s+x(i)+y(i)*40)<>32then230
250 xd(i)=fnr(3)-1
260 yd(i)=fnr(3)-1
261 ifxd(i)=0andyd(i)=0then260
270 next
300 nn=1
310 c=0
500 fori=1tonn
510 xx=x(i):yy=y(i)
520 x=xx+xd(i):y=yy+yd(i)
530 p=peek(s+x+40*y)
540 ifp=32then600
545 ifxd(i)andyd(i)andp=102then580
550 ifp=102thenj=xd(i):xd(i)=yd(i):yd(i)=-j:x=x+xd(i):y=y+yd(i):goto530
560 ifp=100orp=99thenyd(i)=-yd(i):goto520
565 ifp=103orp=101thenxd(i)=-xd(i):goto520
570 ifp=96thenxd(i)=-xd(i):yd(i)=-yd(i):goto520
580 xd(i)=fnr(3)-1
585 yd(i)=fnr(3)-1
587 ifxd(i)=0andyd(i)=0then580
590 goto520
600 pokes+xx+yy*40,32
610 pokes+x+y*40,81
615 x(i)=x:y(i)=y
620 nexti
621 c=c+1
622 ifc<100then630
623 c=0:nn=nn+1:ifnn>nthennn=n
624 p=s+164+fnr(32)+40*fnr(18)
626 ifpeek(p)=32thenpokep,160:pokep+dq,fnr(15)+1
630 goto500