home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1984 May
/
1984-05.d64
/
props
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
11KB
|
310 lines
1 gosub1000:gosub80:gosub50:sys49152
2 pokew1,17:sys49408:c=peek(cx):ifcthend=peek(sp+a(c)):gosub10
3 ifpeek(hm)thengosub20
4 forj=rto20-dl:next:bz=bz+r:ifbz=mxthenbz=.:gosub50
5 ifsk>nthengosub7
6 pokeh1,(peek(251)/5+9):pokew1,16:goto2
7 kl=kl+r:ifkl>nthenkl=.:pokefast,int(rnd(r)*m):poke845,(.)
8 ifrnd(r)>pthenpokefast,v:poke845,(.)
9 return
10 pokebd,2:forj=rto40:pokesp+a(c),d:pokew1,129:sys49608:pokew1,128:next
11 sc=sc-sk:ifsc<rthensc=.
12 pokebd,.:pokecx,.:return
13 rem lines 7-9 = 'vary speed' rtn
14 rem lines 10-12 = 'hit prop' rtn
20 rem*** 'home'
21 sc=sc+sk+3:ifsc>199thengosub70:gosub80
22 pokesp+21,0:printsc$"[153]score:"sc
23 forj=100to1step-2:sys49608:pokew1,21:pokeh1,j:pokew1,20:next
24 printsc$" ":pokehm,0:pokecx,0
50 rem*** 'new coop'
51 pokesp+21,0:pokew3,21:pokeh3,peek(251):printsc$"[158]new coop":print"[153]";
52 forj=1to24:print"[218][218]":next
53 print"[218][218]":pokew1,16:pokew3,20
54 ifhf=0thenhf=1:goto58
55 hf=0:j=1062:fs=40*(int(rnd(1)*25))
56 hi=int((fs+j)/256):lo=(fs+j)-(hi*256):poke843,lo:poke844,hi
57 sys49615:pokej+fs+l1,10:printsc$" ":pokesp+21,255:gosub100:return
58 j=1025:fs=40*(int(rnd(1)*25))
59 hi=int((fs+j)/256):lo=(fs+j)-(hi*256):poke843,lo:poke844,hi
60 sys49615:pokej+fs+l1,10:printsc$" ":pokesp+21,255:gosub100:return
70 rem** next level
71 printchr$(142):forj=1to500:next:printchr$(14):pokesp+21,0:pokew2,21
72 pokew1,20:pokefv,3 :fork=5to115step2:pokew3,21:pokebd,k:poke646,k
73 pokeh1,k*1.4:printsc$"next level?":pokeh3,k/4:sys49608:pokew3,20:next
74 pokew1,20:pokefv,66:forj=1to3500:next:pokeh3,100:pokebd,0:pokew2,129:return
80 rem*** pick skill level
81 pokesp+21,0:pokefna(0),32:kz=0
82 printsc$"[158][157][157][157]pick skill level"
83 printsc$"[155](1 - 6)"
84 gosub200
85 ifkz<>1thensys49608:goto84
86 printsc$"[157][157][157] "
87 printsc$" "
88 sc=0:return
100 rem*** pause routine
101 iffnb(.)thenreturn
102 pokebd,13:printsc$"[158] pausing [146]"sc$"[155]score:"sc
103 printsc$"fire=play"sc$"zero=quit"
104 forj=1to1500:next:pokebd,0
105 sys49608:s=s+1:ifint(s/43)=s/43thenpokew3,20:pokeh3,peek(sp+1):pokew3,21
106 iffnb(.)=.then110
107 gosub200
108 ifsk>5thengosub7
109 goto105
110 printsc$" "sc$" "sc$" "
111 printsc$" "
112 pokew3,20:pokebd,2:pokebd,5:pokesp+31,0:pokebd,7:pokebd,3:pokebd,0:return
200 rem*** skill
201 g=peek(197)
203 ifg=35then300
204 ifg=56thensk=1:dl=1:pokefast,1:pokerot,4:poke829,0:poke845,0:kz=1:return
205 ifg=59thensk=2:dl=5:pokefast,2:pokerot,3:poke829,0:poke845,0:kz=1:return
206 ifg=8thensk=3:dl=10:pokefast,3:pokerot,2:poke829,0:poke845,0:kz=1:return
207 ifg=11thensk=4:dl=15:pokefast,4:pokerot,1:poke829,0:poke845,0:kz=1:return
208 ifg=16thensk=5:dl=19:pokefast,5:pokerot,0:poke829,0:poke845,0:kz=1:return
209 ifg=19thensk=6:dl=19:pokefast,6:pokerot,0:poke829,0:poke845,0:kz=1:return
210 return
300 rem*** quit
301 poke49221,2:poke49228,0:poke829,0:poke845,0:poke646,7
302 forj=sp+1tosp+15step2:pokej,123:next:poke214,24:print:forj=1to24
303 print:fork=1to20:nextk,j:pokew3,20
304 pokew3,21:printsc$"bye bye . . .":forj=1to2400:next:pokesp+21,0
305 forj=l1tovm+3:pokej,0:next:sys64738
1000 rem*** initialize
1001 rem**ml rtns: spritemove=49152:birdmove=49408:flapwing=49608:putmate=49615
1002 poke54296,47:poke54295,66 :poke53272,21:poke53281,0:bd=53280:pokebd,0
1004 gosub10000:gosub12000:fast=49221:rot=49228:r=1:n=5:m=7:p=(.98):v=28:mx=200
1006 rem*** set up sprites
1008 poke53275,255:sp=53248:cx=sp+31:pokecx,0
1012 forj=2040to2047:pokej,221:next
1014 b=80:forj=sp+1tosp+15step2:pokej,b:b=b+20:next
1016 pokesp+23,0:pokesp+29,24
1018 pokesp,40:pokesp+2,70:pokesp+4,100:pokesp+6,130:pokesp+8,188:pokesp+10,245
1020 pokesp+12,20:pokesp+14,48:pokesp+16,192
1022 pokesp+39,7:pokesp+40,3:pokesp+41,4:pokesp+42,13
1024 pokesp+43,7:pokesp+44,3:pokesp+45,13:pokesp+46,4
1025 rem ml varbls, etc in caset bufr
1026 poke828,221:rem start sprite pntrs
1028 poke829,1:rem sprite rotate countr
1030 poke830,40:poke831,0:rem line val
1032 poke832,0:rem r/l jystk flag
1034 poke833,0:rem u/d jystk flag
1036 poke834,91:rem bird char val
1038 poke835,1:poke836,4:rem up limit
1040 poke837,230:poke838,6:rem dn limit
1042 poke841,1:rem sprite move countr
1044 hm=842:pokehm,0:rem 'home' flag
1046 poke843,95:poke844,5:rem mate's first location
1048 poke251,144:poke252,4:rem first bird location - zero page
1049 poke845,0:rem filter cut countr
1050 dima(129):a(1)=1:a(2)=3:a(4)=5:a(8)=7:a(16)=9:a(32)=11:a(64)=13:a(128)=15
1052 hf=0:bz=0
1054 deffna(x)=((peek(252)*256)+peek(251))
1056 deffnb(x)=(peek(56320)and16)
1058 sc$=""
1060 rem*** sound vrbls
1064 l1=54272:h1=l1+1:w1=l1+4:w2=l1+11
1068 l3=l1+14:h3=l1+15:w3=l1+18
1070 fh=l1+22:fv=l1+23:vm=l1+24
1074 rem*** setup sounds
1076 pokel1+5,64:pokel1+12,15:pokel1+19,12
1078 pokel1+7,255:pokel1+8,255
1082 pokel1+6,0:pokel1+13,240:pokel1+20,12
1084 pokefh,90
1100 gosub11000
3000 rem*** draw coops
3004 forj=1984to1024step-40:pokej+l1,10:pokej,90:pokej+l1+1,10:pokej+1,90
3006 pokej+l1+38,10:pokej+38,90:pokej+l1+39,10:pokej+39,90:next
3008 forj=1024to1984step40:pokej+l1,13:pokej+l1+1,13:pokej+l1+38,13
3010 pokej+l1+39,13:next:return
10000 rem*** title
10001 print"[147][153]"chr$(142);
10002 print"[169] [223]"
10003 print"[169] [223]"
10004 print" p "
10005 print" r "
10006 print" o "
10007 print" p "
10008 print"[223] s [146][169]"
10009 print" [146]"
10010 print"[223] [146][169]"
10011 print" [146]"
10012 print"[169] [223]"
10013 print"[169] [223] [213][195][201] [169] [223]"
10014 print" props [221] [221] props "
10015 print"[223] [146][169] [202][195][203] [146][223] [146][169]"
10016 print"[223] [146][169]"
10017 print" [146]"
10018 print"[169] [223]"
10019 print" [146]"
10020 print"[169] p [223]"
10021 print" r "
10022 print" o "
10023 print" p "
10024 print" s "
10025 print"[223] [146][169]"
10026 print"[223] [146][169][159]reading[157][157][157]data..."
10027 q$="":poke214,19:print
10028 printq$"joystick":printq$"in port 2"
10999 return
11000 rem*** instructions
11002 print"[147]":poke53272,31
11004 r$=""
11006 print"[153][218][218][218][218][218][218][218][218][218][218][218][218][218][218][218][218][218][218][218][218][218][218][218][218][218][218][218][218][218]"
11007 print"[218][218][218][218]"
11008 printr$"[218][218][158] you are a pigeon x[158] lost [153][218][218]"
11010 printr$"[218][218][158] in a dangerous sky full [153][218][218]"
11012 printr$"[218][218][158] of whirling propellers. [153][218][218]"
11013 print"[218][218][218][218]"
11014 printr$"[218][218][159] back at the coop, your [153][218][218]"
11016 printr$"[218][218][159] mate waits faithfully-- [150]x[153][218]"
11017 print"[218][218][218][218]"
11018 printr$"[218][218][150] watch out for the props [153][218][218]"
11020 printr$"[218][218][150] while you fly for home. [153][218][218]"
11021 print"[218][218][218][218]"
11022 printr$"[218][218][158] hit fire button during [153][218][218]"
11024 printr$"[218][218][158] score display to pause, [153][218][218]"
11026 printr$"[218][218][158] or change skill level. [153][218][218]"
11027 print"[218][218][218][218]"
11028 printr$"[218][218][159] hit zero key during any [153][218][218]"
11030 printr$"[218][218][159] pause to quit playing. [153][218][218]"
11032 print"[218][218][218][218]"
11038 printr$"[218][218][158] press fire butto