home *** CD-ROM | disk | FTP | other *** search
- 5 dv=peek(186):ifdv<8thendv=8
- 10 goto20
- 17
- 18 --- set up everything ---
- 19
- 20 poke53281,0:poke53280,0:print""chr$(142)tab(13)"loading"
- 24 printtab(21)"cf1":poke147,0:sys57812"cf1",dv,1:sys62631
- 25 printtab(21)"cf2":poke147,0:sys57812"cf2",dv,1:sys62631
- 26 printtab(21)"cf3":poke147,0:sys57812"cf3",dv,1:sys62631
- 27 printtab(21)"cf4":poke147,0:sys57812"cf4",dv,1:sys62631
- 28 poke53272,24
- 30 h=1:e=24:fl=0:d=2:dm=0:c=54272:v=53248
- 31 dimrq%(12),cm%(12)
- 32 x$(0)=" VVV "
- 33 x$(1)="W W W"
- 34 x=rnd(-ti):def fnra(x)=int(rnd(0)*x)
- 35 fori=0to3:readn%(i):next
- 36 fori=0to7:readrq%(i),cm%(i):next
- 37 fori=0to1:forj=0to7:readf%(i,j):next:next
- 38 fori=0to3:readr%(i):next
- 39 fori=0to3:forj=0to1:readw%(i,j),z%(i,j):next:next:rem carom pokes-directions
- 40 fori=0to3:forj=0to1:readrm%(i,j),zm%(i,j):next:next
- 41 fori=1to4:readro%(i),cl%(i):next
- 42 fori=0to1:readm1%(i),m2%(i):next
- 43 fori=1to4:reado%(i):next
- 45 fori=ctoc+21:pokei,0:next
- 48 pokec+5,4:pokec+6,4:pokec+24,15
- 49 gosub1500
- 50 gosub2000:print"":goto370
- 52
- 53 --- switch barriers ---
- 54
- 55 poke214,rq%(i):print:printtab(cm%(i))x$(f%(y,i)):return
- 57
- 58 --- sound subroutine ---
- 59
- 60 pokec+1,60:pokec+5,1:pokec+6,1:pokec+24,15:pokec+4,17
- 62 fort=0to40:next:pokec+4,16:return
- 67
- 68 --- ball hits something ---
- 69
- 70 pokec+4,17:fl=1:gosub80
- 71 ifbh<>86andbh<>87then73
- 72 pokec+1,80:p=p+w%(k,bh-86):k=z%(k,bh-86):return
- 73 ifbh<>90then76
- 74 pokec+1,100:p=p+r%(k):cn=cn+1:j=o%(pl)+cn:pokej,90:pokej+c,5:ifcn>3thenfl=2
- 75 return
- 76 pokec+1,60:p=p+rm%(k,dm):k=zm%(k,dm):return
- 77
- 78 --- font moving subroutine ---
- 79
- 80 poke53272,e
- 81 e=e+d
- 82 ife>30thene=24:return
- 84 ife<24thene=30
- 86 return
- 87
- 88 --- input subroutine ---
- 89
- 90 k$="":poke198,0:lx=0
- 91 gosub80:poke646,int(rnd(0)*15)+1:print" ";
- 92 geta$:ifa$=""or(a$=chr$(20)andlx=0)then91
- 93 ifa$=chr$(13)thenprint" ":return
- 94 ifa$=chr$(20)andlxthenlx=lx-1:k$=left$(k$,lx):goto98
- 95 lx=lx+1:iflx>5thenlx=5:goto91
- 96 ifa$<"a"ora$>"z"then91
- 97 k$=k$+a$
- 98 print""a$;:ifa$=chr$(20)thenprintchr$(148);
- 99 goto91
- 100 h=1:e=24:d=2:dm=0
- 101
- 102 --- the screen subroutine ---
- 103
- 104 h=1:e=24:d=2:dm=0
- 105 print"";
- 110 print"4555555555555555555555556455555555555556";
- 120 print"T{SHIFT-*}AAAAAAAAAAAAAAAAAAAAABVT{SHIFT-*}AAAAAAAAAAABV";
- 130 print"TC DVTCijklmnopqrsDV";
- 140 print"TC DVTC)*+,-./0123DV";
- 150 print"TC DVTCIJKLMNOPQRSDV";
- 160 print"TC DVTC{SHIFT-POUND}{CBM-N}{CBM-Q}{CBM-D}{CBM-Z}{CBM-S}{CBM-P}{CBM-A}{CBM-E}{CBM-R}{CBM-W}DV";
- 170 print"TC DVTEFFFFFFFFFFFGV";
- 180 print"TC DV{CBM-H}{CBM-J}{CBM-J}{CBM-J}{CBM-J}{CBM-J}{CBM-J}{CBM-J}{CBM-J}{CBM-J}{CBM-J}{CBM-J}{CBM-J}{CBM-J}{CBM-L}";
- 190 print"TC DV"
- 200 print"TC DV4555556 4555556";
- 210 print"TC DVTV TV";
- 220 print"TC DVTV TV";
- 230 print"TC DVTV TV";
- 240 print"TC DV{CBM-H}{CBM-J}{CBM-J}{CBM-J}{CBM-J}{CBM-J}{CBM-L} {CBM-H}{CBM-J}{CBM-J}{CBM-J}{CBM-J}{CBM-J}{CBM-L}";
- 250 print"TC DV4555556 4555556";
- 260 print"TC DVTV TV";
- 270 print"TC DVTV TV";
- 280 print"TC DVTV TV";
- 290 print"TC DV{CBM-H}{CBM-J}{CBM-J}{CBM-J}{CBM-J}{CBM-J}{CBM-L} {CBM-H}{CBM-J}{CBM-J}{CBM-J}{CBM-J}{CBM-J}{CBM-L}";
- 300 print"TC DV"
- 310 print"TC DV455555555555556";
- 320 print"TC DVT V";
- 330 print"TC DVT V";
- 340 print"TEFFFFFFFFFFFFFFFFFFFFFGVT V";
- 350 print"{CBM-H}{CBM-J}{CBM-J}{CBM-J}{CBM-J}{CBM-J}{CBM-J}{CBM-J}{CBM-J}{CBM-J}{CBM-J}{CBM-J}{CBM-J}{CBM-J}{CBM-J}{CBM-J}{CBM-J}{CBM-J}{CBM-J}{CBM-J}{CBM-J}{CBM-J}{CBM-J}{CBM-J}{CBM-L}{CBM-H}{CBM-J}{CBM-J}{CBM-J}{CBM-J}{CBM-J}{CBM-J}{CBM-J}{CBM-J}{CBM-J}{CBM-J}{CBM-J}{CBM-J}{CBM-J}";
- 360 poke2023,246:poke2023+c,5
- 362 fori=217to242:pokei,peek(i)or128:next
- 363 poke1516,160:poke1516+c,1
- 365 return
- 367
- 368 --- place objects on screen ---
- 369
- 370 gosub104:fori=0to7:gosub55:next:print""
- 372 fori=1tomp:poke214,ro%(i)-2:print:lg=len(na$(i))
- 373 printtab(cl%(i)-(lg<4)-(lg<2)-2)na$(i)
- 374 next
- 375 n=0:pl=0:bs=100
- 380 fori=0to1:n=n+1
- 382 j=fnra(7):k=fnra(4):l=m1%(i)+j+i*40:pokel,90:pokel+c,5:b%(n)=l:next
- 384 fori=0to1:n=n+1
- 386 j=fnra(4):k=fnra(7):l=m2%(i)+j+i*40:pokel,90:pokel+c,5:b%(n)=l:next
- 387 k=0:pl=pl+1:ifpl>mpthen700
- 388 fori=0to7:gosub55:next
- 390 poke53272,e
- 395 poken%(k),81:poken%(k)+c,3:goto400
- 397
- 398 --- choose initial direction ---
- 399
- 400 jv=peek(56320):geta$
- 405 ifa$=""andjv=31then440
- 410 ifa$=chr$(13)or((jvand16)=0)thenp=n%(k):goto500
- 420 ifa$=" "or(jv<>127)thengosub60:poken%(k),32:k=k+1:ifk>3thenk=0
- 440 gosub80
- 470 goto390
- 497
- 498 --- the main play loop ---
- 499
- 500 h=0:sc=0:cn=0:d=2:y=0:poke646,7
- 510 bh=peek(p+r%(k))
- 520 ifbh<>32thenpokep,32:gosub70:pokec+4,16:goto535
- 530 pokep,32:p=p+r%(k):pokep,81:pokep+c,3:goto550
- 535 sc%(pl)=sc%(pl)+1:ifsc%(pl)>99then600
- 540 poke214,ro%(pl):print:print""tab(cl%(pl)+(sc%(pl)>9))str$(sc%(pl))
- 550 gosub80
- 570 iffl=2then600
- 580 jv=peek(56320):geta$:ifjv=127anda$<>chr$(13)anda$<>chr$(32)then510
- 585 ifa$=chr$(13)orjv<112theny=y+1:y=yand1:fori=0to7:gosub55:next:goto510
- 590 dm=dm+1:dm=dmand1:d=-d
- 595 goto510
- 597
- 598 --- end of player's turn ---
- 599
- 600 ifsc%(pl)<bsthenbs=sc%(pl):bp=pl
- 610 gosub104
- 620 fori=1to4:pokeb%(i),90:pokeb%(i)+c,5:pokeo%(pl)+i,32:next
- 630 cn=0:fl=0
- 640 goto387
- 697
- 698 --- end of last player's turn ---
- 699
- 700 zx$=na$(bp)+" wins!"
- 705 cm=0:fori=1tomp:ifsc%(i)=bsthencm=cm+1
- 710 next:ifcm>1thenzx$="it's a tie!"
- 715 kk=0
- 720 poke214,21:print:printtab(27)zx$
- 730 kk=kk+1:ifkk<50thengosub80:print""tab(27)" ":goto720
- 740 poke214,20:print:printtab(27)"same players"
- 745 printtab(27)"new players"
- 747 printtab(27)"loadstar"
- 750 gosub80:geta$:ifa$<>"s"anda$<>"n"anda$<>"l"then750
- 755 fori=1to4:sc%(i)=0:next
- 760 ifa$="s"thenprint"":goto370
- 765 ifa$="n"then50
- 766 goto770
- 767
- 768 --- back to loadstar ---
- 769
- 770 goto60000
- 996
- 997 --- data statements ---
- 998
- 999 rem starting positions
- 1000 data1476,1517,1556,1515
- 1009 rem barrier positions
- 1010 data4,5,4,17,7,8,7,14,13,8,13,14,16,5,16,17
- 1019 rem barrier flags
- 1020 data1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0
- 1029 rem r%(k) directions 0=up 1=right
- 1030 data-40,1,40,-1
- 1039 rem carom directions
- 1040 data-39,1,-41,3,-39,0,41,2,39,3,41,1,39,2,-41,0
- 1050 data-1,2,1,2,-40,3,40,3,1,0,-1,0,40,1,-40,1
- 1059 rem score tabs
- 1060 data11,28,11,36,16,28,16,36
- 1070 data1153,1387,1753,1402
- 1080 data1490,1498,1690,1698
- 1197
- 1198 --- opening title screen ---
- 1199
- 1500 gosub104
- 1510 print""
- 1520 print"{SHIFT-*}AB {SHIFT-*}AB {SHIFT-*}AB {SHIFT-*}AB {SHIFT-*}B {SHIFT-*}B"
- 1530 print"C D C D C D C D CD CD"
- 1540 print"C CFD CHG C D CJAKD"
- 1550 print"C D C D CJB C D C D"
- 1560 print"EFG C D C D EFG C D"
- 1570 print"a loadstar production"
- 1580 print" (c) 1988 by"
- 1590 print" fender tucker"
- 1600 print" move the joystick"
- 1610 print" in any direction or"
- 1620 print" press any key to"
- 1630 print" toggle the border"
- 1640 print" direction. press"
- 1650 print" the firebutton or"
- 1660 print" the return key to"
- 1670 print" toggle the"
- 1680 print" barrier direction."
- 1690 print""tab(26)"press any key"
- 1700 printtab(26)"to start the"
- 1710 printtab(26)"ball rolling.":poke198,0
- 1750 gosub80:geta$:ifa$=""then1750
- 1760 return
- 1997
- 1998 --- get players' names ---
- 1999
- 2000 gosub104:mp=1:poke1516,32
- 2010 poke214,3:print:printtab(6)"players' names"
- 2020 poke214,19:print:printtab(7)"press return"
- 2025 printtab(8)"when done"
- 2030 poke214,4+mp*2:print:printtab(5)"player"mp": ";
- 2040 gosub90:ifk$=""thenmp=mp-1:return
- 2050 na$(mp)=k$
- 2060 mp=mp+1:ifmp=5thenmp=4:return
- 2070 goto2030
- 10000 open15,8,15,"s0:carom.v7":close15:save"carom.v7",8
- 60000 a$="hello connect":fori=8to29:ifi=14thennext
- 60005 close2:open2,i,2:close2:ifstthen60020
- 60010 close15:open15,i,15,"r0:"+a$+"="+a$:input#15,er:close15:ifer=63then60030
- 60020 next:print"":poke53272,23:poke186,8:end
- 60030 q$=chr$(34):poke646,peek(53281):print"":poke53272,23
- 60040 print"pO2048,0:pO44,8:pO43,1:pO56,160:pO55,0:clr:lO"q$a$q$","i
- 60050 print"run:":poke631,13:poke632,13:poke198,2:end
-