home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Floppy Magazine 1986 #3
/
Floppy_Magazine_86-3_1986_Megasystems_Oy_fi.d64
/
castle
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2023-02-26
|
5KB
|
175 lines
10 rem castle 20.3.1986 v 223.0
20 rem by arttu suihkonen
30 rem
50 printchr$(8):poke895,0
80 poke900,10:poke910,0:poke890,3
85 poke913,0:poke914,0:poke808,232
90 poke53280,0:poke53281,0:poke908,0
105 ifa=0thena=1:load"super ork89",8,8
110 ifb=0thenb=1:load"4.ork2",8,8
115 ifc=0thenc=1:load"ca 37",8,8
120 ifd=0thend=1:load"msb 9",8,1
125 ife=0thene=1:load"game over",8,8
127 ifk=0thenk=1:load"music 21",8,8
128 iff=0thenf=1:load"pr. game*",8,8
130 ifi=0theni=1:load"se 5",8,8,8
135 gosub3100:sys51350:sys49400
139 fora=832to838:pokea,1:next:print"[147]"
140 poke203,64:goto350
150 sys51040
330 fort=0to2000:next:poke53269,0
332 print"[147]":poke913,0:poke914,0:return
350 poke53280,0:poke53281,0
370 poke56341,50:sys49710:print"[147]"
590 v=53248:print"":poke53269,0
600 poke890,3:gosub1680
620 ax=230:ac=231:lv=0:poke924,0:poke850,ax:poke851,ac:gosub1080:poke203,64
630 poke53264,0:sys49710:jh=0:ai=150
700 pokev+28,1:gosub920:poke53278,0:sys51418:poke53278,0
710 poke203,64:ifpeek(901)<>0then1570
715 ifpeek(203)=60then7000
720 ifpeek(203)=3then1680
730 ifpeek(910)<>0thensc=sc+peek(910)*100:poke910,0:gosub920
740 ifpeek(900)=0then1420
810 ai=ai-1:gosub920:goto710
920 poke646,k:print"time";ai;"[157] "
930 printtab(12)"[145][154]score";sc;" "
940 printtab(28)"[145][145]level[150]";lv;"[157] "
950 print"[156]lives";peek(890);"[157] ":ifpeek(890)=0then1410
955 ifsc=>hcthen hc=sc
960 printtab(12)"[154][145]hi-score[154]";hc;" "
970 ifai=0thensys49400:poke53269,1:poke53264,0:sys50615:goto1570
990 return
1080 lv=lv+1:iflv=10thenax=230:ac=231
1090 poke924,lv:lv=peek(924):iflv=20thengosub1890:gosub1500:goto1680
1110 gosub150:poke53269,0:poke53264,0
1122 ax=ax+2:ac=ac+2:r=int(9*rnd(1))
1125 poke850,ax:poke851,ac:poke900,10
1130 ai=150:iflv>1thensc=sc+lv*100
1200 iflv<04thenk=03:g=06:goto1252
1205 iflv<06thenk=06:g=13:goto1252
1210 iflv<08thenk=05:g=01:goto1252
1215 iflv<11thenk=02:g=10:goto1252
1220 iflv<13thenk=03:g=07:goto1252
1225 iflv<15thenk=08:g=04:goto1252
1230 iflv<17thenk=14:g=07:goto1252
1234 iflv<20thenk=02:g=06:goto1252
1252 iflv<05thenrt=15:goto1260
1255 rt=31:poke2040,215
1260 print"[147]":gosub920:poke898,k
1265 pokev+28,1:poke921,g:poke925,r
1330 poke920,peek(52000+lv-1):lk=lk+1
1380 sys51490:poke918,rt
1400 iflv=5orlv=10orlv=15thenpoke890,peek(890)+1:sys50315:goto1405
1403 fort=0to250:next
1405 poke56341,49:poke924,lv:return
1410 gosub1890:gosub1500:goto1680
1420 pokev+21,1
1425 fort=1toai:sc=sc+10:ai=ai-1
1445 ifsc=>hcthen hc=sc
1460 print"time";ai;"[157] "
1470 print"";tab(12)"[154]score";sc
1475 print"";tab(12)"[154]hi-score";hc
1480 nextt:fora=1to200:nexta
1490 gosub1080:goto630
1500 pokev+21,0:ifsc<=no(9)thenreturn
1509 ni$=" ":sys49400:gosub5400
1510 n$=in$:poke53269,0
1520 no(9)=sc:ni$(9)=n$:fori=9to1step-1
1530 ifno(i)<=no(i-1)thengy=1:goto1680
1540 no(i)=no(i-1):no(i-1)=sc
1550 ni$(i)=ni$(i-1):ni$(i-1)=n$:next
1560 gy=1:goto1680
1570 ai=150:poke53269,1:poke53278,0
1575 poke53264,0:poke908,0:sys49400
1660 ifpeek(890)=0thenpokev+21,rt-1:goto1410
1665 sys50488:poke901,0
1670 print"";tab(5)"";peek(890)" ":fora=0to100:next:goto630
1680 print"[147]":poke53276,0:poke53269,0
1690 poke890,3:poke53280,0:poke53281,0
1710 poke203,64:v=53248:pokev+21,0
1715 poke56341,50:hc=no(0):printchr$(8)
1720 pokev+28,0:sys49400:lk=lk+1
1740 print"[154] [201][202][193][194]89<=\[146] @a[146] [193][194] 89[146] \"
1750 print"[154] [203][204][195][196]:;>?^_bc[146] by [195][196].:;[146]uihkonen":poke895,0
1760 print"[156]hi-score table":poke53264,0
1780 print
1810 print"[159] fire to start game [159] f7 new game":poke1787,0
1812 print"[c] mcmlxxxvi helsinki"
1815 poke906,0:gosub6040
1820 ifgy=1thengy=0:gosub3200
1822 iflk=10thenlk=0:run135
1840 j2=peek(56320):sys50990:poke1787,0
1870 ifj2=111orpeek(203)=60thenpoke890,3:sc=0:poke53269,0:goto620
1875 ifpeek(203)=4thengosub6000
1877 ifpeek(203)=3thengosub8000
1880 goto1840
1890 sys50488:sys49710:poke53269,rt-1
1897 sys49386:print""peek(890)"[157] ":sys51120:sys51090:poke56341,50
1950 fori=0to76:sys51120:fort=0to150:next:next
1960 return
3100 rem *** scoren loudaus levylta ***
3102 poke54296,0:sys51400:open 1,8,15
3105 open2,8,2,"-high scores-,s,r"
3110 gosub3500:fori=0to9:input#2,ni$(i):input#2,no(i):next:close2:close1
3150 poke54296,15:sys49400:return
3200 rem *** scoren seivaus levylle ***
3201 poke54296,0:sys51400
3205 open2,8,2,"@0:-high scores-,s,w"
3210 fori=0to9:print#2,ni$(i):print#2,no(i):next:close2
3300 sys49400:poke54296,15:return
3500 rem ** disk error routine **
3501 poke53269,0:input#1,a$,b$,c$,d$
3502 ifval(a$)=0thenreturn
3505 poke53280,0:poke53281,11:print"[147]"
3510 print"disk error[146]: "b$
3520 close2:close1:print" insert disk to drive "
3600 print" and press any key."
3610 ifpeek(203)<>64thenrun135
3620 goto3610
5400 bl$=" ":poke53264,0:sys50532:le=15
5405 poke53280,0:poke53281,0:print"[147]"
5407 print""tab(14)"[163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]"
5410 cr$=chr$(13):de$=chr$(20):c=1
5420 v$=""
5425 msg$="[146]your name:":li=6:col=4
5430 y9=2:in$="":uc=0:ub$=left$(bl$,le):gosub 5530:ub$=" ":uc=3
5440 ut=ti
5450 geta$:ifa$=""then5510
5460 ifa$=cr$theny9=2:gosub5530:print "[157][157] ":return
5470 if a$=de$thenon-(len(in$)=0)goto 5510:in$=left$(in$,len(in$)-1):goto5510
5480 if (asc(a$)and127)<32 or a$=chr$(34) then 5510
5490 if le=len(in$) then 5510
5500 in$=in$+a$
5510 gosub 5530:if ti-ut<10 then 5450
5520 y9=3-y9:goto 5440
5530 print left$(v$,li)tab(col-1)mid$(msg$,y9)ub$in$mid$(" [146]",y9,uc)" ";:return
5999 rem nimi taulukoiden printtaus
6000 poke203,64:wq=peek(906):sys50990
6010 ifwq=0thenpoke906,5:goto6040
6020 ifwq=5thenpoke906,0:goto6040
6035 sys50990
6040 print"[144]";:sys20430
6062 wq=peek(906):fori=wqtowq+4
6065 sys50990:tq=6:ifi>8thentq=5
6070 ifno(i)<100thenni$(i)="floppy 1986
6071 [139]no(i)[179]1000000[167]tb[178]24
6072 [158]50990:[139]no(i)[179]100000[167]tb[178]25
6074 [139]no(i)[179]10000[167]tb[178]26
6076 [139]no(i)[179]1000[167]tb[178]27
6078 [158]50990:[139]no(i)[179]100[167]tb[178]29
6110 [153][163]tq)i[170]1"cmd. "ni$(i)
6111 [153]"on"[163]tb[170]2)no(i)
6120 [158]50990:[130]:[158]20415:[142]
7000 [143] pause -rutiini
7015 [153]""[163]28)"pause game"
7020 [158]49400:
7021 [139][194](203)[178]60[167]7021
7030 [139][194](203)[178]60[167]7040
7035 [137]7030
7040 [153]""[163]28)" ":[129]t[178]0[164]100:[130]:[151]203,0:[158]49386:[137]710
8000 [143] hi-score listan puhdistus
8005 [151]54296,0:[158]51400:[159]2,8,2,"@0:-high scores-,s,w":[129]i[178]0[164]9:no(i)[178]1000
8010 ni$(i)[178]"floppy 1986 ":[152]2,ni$(i):[152]2,no(i):[130]:[160]2
8020 [138]135