home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1984 May / 1984-05.d64 / props (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  11KB  |  310 lines

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