home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 34 / 034.d81 / win_lose_draw (.txt) < prev   
Encoding:
Commodore BASIC  |  1987-01-01  |  3.7 KB  |  155 lines

  1. 10 ifl=0thenl=1:load"sysplotterd.o",8,1
  2. 20 poke55,0:poke56,32:clr
  3. 30 :
  4. 35 poke650,128
  5. 40 gosub 1000
  6. 45 j=56320
  7. 50 sys49158:rem clear hi-res
  8. 52 sys49161,16:rem color smear hi-res
  9. 54 sys49152: rem go to hi-res
  10. 56 sys49164,1: rem paint color
  11. 60 ms=0
  12. 65 xc=140:yc=30:xs=10:ys=4
  13. 70 sys49179,"score = 0           hi score = 1024896",8,176
  14. 72 sys49179,"f1/f7 aim, <space> shoots, <_> quits",8,184
  15. 80 gosub 10000 : rem draw target
  16. 82 ot=140
  17. 84 bx=140
  18. 86 gosub30000 : rem draw base
  19. 88 ot=bx
  20. 90 ifpeek(198)=0andpeek(j)=127then90
  21. 91 geti$:j%=peek(j)
  22. 92 if(i$="[133]"orj%=123)andbx>130thenbx=bx-1:goto86
  23. 94 if(i$="[136]"orj%=119)andbx<150thenbx=bx+1:goto86
  24. 96 ifi$="_"then60000
  25. 98 ifi$=" "orj%=111thengosub50000:gosub31000:gosub40000:goto86
  26. 100 goto86
  27. 999 end
  28. 1000 rem title screen
  29. 1010 print"[147][144]":poke53281,1:poke53280,5
  30. 1020 printspc(6)"[196]ispute?'s [199]azelle [208]resents:"
  31. 1030 printspc(10)"[215]in, [204]ose, or [196]raw"
  32. 1040 print"    by [196]aniel [212]obias - [193]pr. 1, 1987"
  33. 1050 print"          [195]opyright (c) 1987"
  34. 1060 print"    [193]n interstellar shooting gallery"
  35. 1070 print"[213]se [198]1/[198]7 keys (or joystick in port #2)"
  36. 1075 print"  to aim gun, and space bar (or [198][201][210][197])"
  37. 1080 print"to shoot.  [212]ry to hit the flying saucer."
  38. 1082 :
  39. 1090 print"[201]f you score makes the top ten, you get"
  40. 1092 print"in the permanent high score list!"
  41. 1095 print""spc(9)"[208]ress any key to begin."
  42. 1097 poke198,0:wait198,1:poke198,0:return
  43. 10000 rem plot target
  44. 10010 sys49173,xc-xs,yc-ys,xc+xs,yc-ys
  45. 10020 sys49173,xc+xs,yc-ys,xc+(xs*1.333),yc
  46. 10030 sys49173,xc+(xs*1.333),yc,xc+(xs*1.333),yc+ys
  47. 10032 sys49173,xc+(xs*1.333),yc+ys,xc-(xs*1.333),yc+ys
  48. 10034 sys49173,xc-(xs*1.333),yc+ys,xc-(xs*1.333),yc
  49. 10036 sys49173,xc-(xs*1.333),yc,xc-xs,yc-ys
  50. 10040 y=yc+0.333*ys
  51. 10045 forx=xc-(.8*xs)toxc+(.8*xs)step.2*xs
  52. 10050 gosub20000
  53. 10060 next
  54. 10070 forx=xc-xstoxc+xsstepxs/10
  55. 10080 sys49173,x,yc+1.05*ys,x,yc+1.5*ys
  56. 10090 next
  57. 10092 return
  58. 20000 rem draw window
  59. 20010 sys49173,x,y,x+(xs/20),y+(ys/5)
  60. 20012 sys49173,x+(xs/20),y+(ys/5),x-(xs/20),y+(ys/5)
  61. 20014 sys49173,x-(xs/20),y+(ys/5),x,y
  62. 20020 return
  63. 30000 rem draw base
  64. 30010 :
  65. 30012 sys49176,140,159,ot,150
  66. 30014 sys49176,139,159,ot-1,150
  67. 30016 :
  68. 30017 sys49173,135,159,145,159
  69. 30020 sys49173,135,158,145,158
  70. 30030 sys49173,140,159,bx,150
  71. 30035 sys49173,139,159,bx-1,150
  72. 30040 return
  73. 31000 rem show bullet
  74. 31005 oy=149:ox=bx
  75. 31007 gosub 32000
  76. 31100 fory=sytotystep-1:poke54296,15:poke54296,0
  77. 31115 x=((tx-sx)/(ty-139))*(y-sy)+sx
  78. 31120 sys49170,ox,oy
  79. 31130 sys49167,x,y
  80. 31135 ox=x:oy=y
  81. 31140 next
  82. 31150 return
  83. 32000 rem go a litte ways straight...
  84. 32010 fory=149to120step-1
  85. 32020 x=((bx-140)/(-9))*(y-149)+bx:poke54296,15:poke54296,0
  86. 32030 sys49170,ox,oy
  87. 32035 sys49167,x,y
  88. 32040 ox=x:oy=y
  89. 32050 nexty
  90. 32060 sx=x:sy=y
  91. 32070 return
  92. 40000 rem score!
  93. 40005 ifabs(ms)thengosub63000:return
  94. 40006 gosub 62000
  95. 40007 fori=1to60:
  96. 40008 sys49167,xc+rnd(1)*2*xs-xs,yc+rnd(1)*2*ys-ys:next
  97. 40010 :
  98. 40015 sys49179,"  you have completed the first level.",1*8,1*8
  99. 40017 sys49179,"   now entering the second level...",1*8,2*8
  100. 40018 fordl=1to3000:next
  101. 40019 sys49158
  102. 40020 sys49179,"score = 1000        hi score = 1024896",8,176
  103. 40022 sys49179,"f1/f7 aim, <space> shoots, <_> quits",8,184
  104. 40025 ms=1:xc=140:yc=30:xs=60:ys=20
  105. 40030 gosub 10000:gosub 30000
  106. 40040 tx=279:ty=yc:return
  107. 50000 rem set target position
  108. 50010 ifabs(ms)then50030
  109. 50020 tx=xc:ty=yc:return
  110. 50030 ifbx<140thentx=1:ty=yc:return
  111. 50040 tx=279:ty=yc:return
  112. 60000 print"[147][144]";:sys49155
  113. 60010 print""spc(13)"[200]igh [211]cores:"
  114. 60020 print"     ( 1 )      1024896    [196][193][206]"
  115. 60022 print"     ( 2 )       998644    [202][215][205]"
  116. 60023 print"     ( 3 )       675221    [215][193][214]"
  117. 60024 print"     ( 4 )       216315    [203][201][205]"
  118. 60025 print"     ( 5 )       104702    [202][207][206]"
  119. 60026 print"     ( 6 )        66604    [211][201][206]"
  120. 60027 print"     ( 7 )        28045    [202][207][203]"
  121. 60028 print"     ( 8 )         9980    [196][193][206]"
  122. 60029 print"     ( 9 )         4139    [202][207][206]"
  123. 60030 print"     (10 )         1001    [196][193][206]"
  124. 60040 print"  [217]our score:      ";
  125. 60050 ifabs(ms)thenprint"1000":goto60060
  126. 60055 print"0"
  127. 60060 print"[193]nother game ([217]/[206])?"
  128. 60062 poke198,0:wait198,1:geti$
  129. 60063 ifi$<>"y"andi$<>"n"andi$<>"[217]"andi$<>"[206]"then60062
  130. 60064 ifi$="y"ori$="[217]"thenrun40
  131. 60065 :
  132. 61000 poke56,160:clr:load"connect",8:end
  133. 61010 :
  134. 62000 rem sound for a hit
  135. 62010 s=54272
  136. 62020 poke s+24,15
  137. 62030 poke s+6,240
  138. 62040 poke s+4,17
  139. 62050 for a=1 to 10
  140. 62060 for x= 1 to 255  step 25
  141. 62070 poke s+1,x/2
  142. 62080 next x
  143. 62090 next a
  144. 62092 poke s+4,16
  145. 62094 return
  146. 63000 rem sound for a miss
  147. 63010 s=54272
  148. 63020 poke s+24,15
  149. 63030 poke s+6,240
  150. 63040 poke s+4,33
  151. 63050 pokes,4:pokes+1,4
  152. 63060 fordl=1to400:next
  153. 63070 poke s+4,32
  154. 63094 return
  155.