home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 45
/
045.d81
/
b
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
10KB
|
418 lines
1 q=q+1:onqgoto3,4,5
2 goto10
3 load"wb.fnt",8,1
4 load"utl",8,1
5 poke53281,14:print"[147]":ifpeek(53265)<>27thensys51459
10 ifa3=0thenpoke20480,0:poke20481,0
20 rb=256*peek(20480)+peek(20481)
30 ifa2thenrb=rb+1:goto2680
40 ifa1then1170
50 poke52,56:poke56,56:poke55,0:poke51,0
60 goto1080
62 print"":poke646,cl
63 printtab(26)"[176][192][192][192][192][192][192][192][174]"
64 printtab(26)"[221]w[146] o[146] r[146] d[146][221]"
65 printtab(26)"[221] [221]"
66 printtab(26)"[221]b[146] o[146] w[146] l[146][221]"
67 printtab(26)"[173][192][192][192][192][192][192][192][189]"
68 return
70 :
80 :rem ===ending===
90 :
100 print"[147][149]"spc(13)"do you want to:"
110 printspc(10)"p[151][146]lay another game?"
120 printspc(10)"r[151][146]eturn to first menu?"
130 printspc(10)"e[151][146]xit to loadstar?"
135 poke198,0
140 geta$
150 ifa$="p"then1170
160 ifa$="r"then2280
170 ifa$<>"e"then140
180 print"[147]"spc(10)"[149]returning to loadstar"
190 poke55,0:poke56,160:poke53272,21
200 load"hello connect",8
222 print"":fort=0to20:print:next
224 print" press any key to play another game "
226 print" [145]"
228 return
230 :
240 :rem ===screen===
250 :
260 ifd=0thenpp%(fr)=221:return
270 ifd=1thenpp%(fr)=220:return
280 pp%(fr)=48+(11-d):return
290 print"[144]":fori=1to19:print:next
300 printspc(15);:fori=1tor:print"-";:next:print:print
310 print" f1 [151]reveal a letter f3 [151]scores"
320 print" f7 [151]instructions f8 [151]new game/quit [145]"
325 cl=6:gosub62
330 return
340 :
350 :rem ===triangle===
360 :
370 fori=0tor-1:q%(i)=0:next
380 fori=0tor-1
390 f=int(rnd(1)*r)
400 ifq%(f)then390
410 f$(i)=mid$(g$(fr),f+1,1)
420 q%(f)=1
430 next:return
440 :
450 :rem ===score sheet===
460 :
470 print"";
480 print" [144][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175]"
490 print" [180] [219][146][180] [219][146][180] [219][146][180] [219][146][180] [219][146][180] [219][146][180] [219][146][180] [219][146][180] [219][146][180] [219][146][180] [170]"
500 print" [180] [180] [180] [180] [180] [180] [180] [180] [180] [180] [180] [170]"
510 print" [204][175][175][204][175][175][204][175][175][204][175][175][204][175][175][204][175][175][204][175][175][204][175][175][204][175][175][204][175][175][204][175][175][175][175][186][151]"
520 return
530 :
540 :rem ===get word===
550 :
560 fori=1to10:g$(i)="":cj=cj+1
570 ra=int(rnd(1)*rb):ifcj<rb-10thenifrq%(ra)then570
580 forj=0tor-1
590 g$(i)=g$(i)+chr$(peek(bf+j+ra*r))
600 ifcj<rb-10thenrq%(ra)=1
610 next:next
620 return
630 :
640 :rem ===load scores===
650 :
660 open15,8,15
665 open2,8,2,"0:sco,p,r"
670 fori=10to4step-1:forj=0to3
680 input#2,hs%(i,j)
690 input#2,na$(i,j)
700 next:next:close2
710 gosub792:return
720 :
730 :rem ===save scores===
740 :
750 open15,8,15
755 open2,8,2,"@0:sco,p,w"
760 fori=10to4step-1:forj=0to3
765 ifbqthenhs%(i,j)=10:na$(i,j)="------"
770 print#2,hs%(i,j)
780 print#2,na$(i,j)
790 next:next:close2:gosub792:return
792 input#15,er,er$
794 ifer$<>"ok"thenprint"[145][145]"er$
796 print#15,"i0"
800 close15:return
810 :
820 :rem ===show words===
830 :
840 cl=15:gosub62:print"":fori=1to10
850 l=25:ifi=10thenl=24
860 printtab(l)""i" [151]"g$(i)
870 next
880 ifflthenfl=0:return
885 poke198,0
890 geta$:ifa$=""then890
900 return
910 :
920 :rem ===big four===
930 :
940 sys828,4,64:sys828,216,68
950 pokecb,0:pokecb+1,0
960 print"[147]"tab(14)"the big[146] four"
970 fori=10to4step-1
975 print"[152] "r$(i)"pins[146]"
978 forj=0to3
980 print"[154]"tab(25-len(na$(i,j)))na$(i,j)
990 print"[145][159]"tab(28)hs%(i,j)
992 next
995 ifi<>7then1005
1000 print" [158]press any key for more scores[145]"
1002 poke198,0
1003 geta$:ifa$=""then1003
1004 print"[147]"tab(14)"the big[146] four"
1005 next
1010 print" [158]press any key to return to the game"
1015 poke198,0
1020 geta$:ifa$=""then1020
1030 pokecb,15:pokecb+1,15
1040 sys828,64:sys828,68,216:return
1050 :
1060 :rem ===initialization===
1070 :
1080 cb=53280:poke53272,31
1090 printchr$(8)
1100 dimrq%(308),m%(11),f$(11),g$(11),p%(11),pp%(13),y%(11),u%(11)
1105 dimhs%(11,4),na$(11,4),mh%(3)
1110 s=1024:c=54272:w=775:z=40:t=rnd(-ti):bf=20482:rb=0:a3=1
1115 mh%(0)=10:mh%(1)=2:mh%(2)=9
1118 sp$=" "
1120 fori=0to9:readm%(i):next
1130 fori=10to4step-1:readr$(i):next
1140 fori=1to10:p%(i)=s+121+i*3:u%(i)=p%(i)+39:next
1150 gosub660
1160 goto2280
1170 print"[147]"
1180 pokecb+1,15:pokecb,15
1190 fr=0:sc=0
1200 gosub560:gosub470
1210 fori=1to10:pokep%(i)+c,0:next
1220 fr=fr+1:qz=0:d=0
1230 fori=0tor-1:pokes+w+i,32:pokes+w+i+c,9:next
1240 gosub290:gosub370
1250 fori=0tor-1:pokes+m%(i),asc(f$(i))+64
1260 pokes+m%(i)+c,6:next
1270 print" ";
1280 fori=1to10
1290 ifi=frandfr=10thenprinti;"[157][157][157][157]>[146]"spc(2)"?[146]";:goto1320
1300 ifi=frthenprinti;"[157][157][157]>[146]"spc(1)"?[146]";:goto1320
1310 printi;"[157] ";
1320 next:print"total"
1330 k=0
1340 ifk<0thenk=0
1350 ifk>r-1thenk=r-1
1360 v2=peek(s+w+k+c)and15
1370 v=s+w+k:v1=peek(v):gosub260:pokeu%(fr),pp%(fr):pokeu%(fr)+c,1
1380 ifpp%(fr)=220thenpokeu%(fr)-z,100:pokeu%(fr)-z+c,1
1390 ifv1>128thenv1=v1-128:pokev+c,v2:goto1410
1400 ifv1<128thenv1=v1+128:pokev+c,1
1410 pokev,v1:pokes+825+c,15
1420 geta$:ifa$=""then1370
1430 ifv1>128thenv1=v1-128:pokev,v1:pokev+c,v2
1440 ifa$<>chr$(133)then1530
1450 ifv2<>1andv2<>9then1420
1460 pokev,asc(mid$(g$(fr),v-(s+w-1),1))-64:pokes+w-1+v-(s+w-1)+c,6:v2=6
1500 d=d+1:ifr-d<0thend=d-1
1510 pokeu%(fr),32:ifpeek(u%(fr)-z)=100thenpokeu%(fr)-z,32
1520 goto1420
1530 ifa$=chr$(13)then1710
1540 ifa$=chr$(140)then100
1550 ifa$=chr$(134)thengosub940:goto1420
1551 ifa$<>chr$(135)then1560
1552 sys828,4,64:sys828,216,68:print"":fori=0to21:print:next
1553 print"[145] [149]do you really want to clear the "
1554 print" high scores? y[151]es or n[151]o ":poke198,0
1555 geta$:ifa$<>"y"anda$<>"n"then1555
1556 ifa$="n"then1558
1557 bq=1:gosub750:bq=0
1558 sys828,64,4:sys828,68,216
1559 goto1420
1560 ifa$<>chr$(136)then1620
1580 gosub5000
1610 goto1420
1620 ifa$="[157]"thenpokev,v1:k=k-1:goto1340
1630 ifa$=""thenpokev,v1:k=k+1:goto1340
1640 ifa$=chr$(20)thenif(peek(v+c)and15)<>6thenpokev,32:k=k-1:goto1340
1650 ifa$=chr$(20)thenk=k-1:goto1340
1660 ifa$<"a"ora$>"z"then1420
1670 ifv1<>32andv2=6then1690
1680 pokev,asc(a$)-64
1690 k=k+1
1700 goto1340
1710 e$="":fori=0tor-1:ifpeek(s+w+i)>128thenpokes+w+i,peek(s+w+i)-128
1720 e$=e$+chr$(peek(s+w+i)+64):next
1730 pokeu%(fr),32:ifpeek(u%(fr)-z)=100thenpokeu%(fr)-z,32
1733 qw=0
1735 cl=1:gosub62:cl=6:gosub62:qw=qw+1:ifqw<3then1735
1740 ife$<>g$(fr)then1800
1750 pokep%(fr),pp%(fr)
1770 printspc(27)"[145][145][145][145] [157][157][157][157][157][157]right[157][157][157][157][157][157] "
1772 fort=1to2000:next:cl=6:gosub62
1780 iffr=10then1840
1790 goto1220
1800 d=d+1:ifr-d<0thend=d-1
1810 printspc(27)"[145][145][145][145] [157][157][157][157][157][157]sorry[157][157][157][157][157][157] "
1820 fort=1to2000:next:cl=6:gosub62
1830 goto1270
1840 sc=0:pp%(11)=221:pp%(12)=221
1850 fori=1to10
1860 ifpp%(i)<>221then1930
1870 ifpp%(i+1)<>221then1910
1880 ifpp%(i+2)=221thensc=sc+30:goto1980
1890 ifpp%(i+2)=220thensc=sc+29:goto1980
1900 sc=sc+20+pp%(i+2)-48:goto1980
1910 ifpp%(i+1)=220thensc=sc+20:goto1980
1920 sc=sc+10+pp%(i+1)-48:goto1980
1930 ifpp%(i)<>220then1970
1940 ifpp%(i+1)=221thensc=sc+20:goto1980
1950 ifpp%(i+1)=220thensc=sc+19:goto1980
1960 sc=sc+10+pp%(i+1)-48:goto1980
1970 sc=sc+pp%(i)-48
1980 next
1990 fl=1:gosub840
2000 fori=0to9:ifsc>hs%(r,i)then2020
2010 next
2015 gosub222:goto2247
2020 print"":fort=0to20:print:next
2030 print" [149]do you want to register your score? "
2040 print" y[151]es or n[151]o ":poke198,0
2080 print""tab(33)sc
2090 fort=1to50:next
2100 print"[149]"tab(33)sc
2110 fort=1to50:next
2120 geta$:ifa$=""then2080
2130 ifa$="y"t