home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 231 / 231.d81 / win_lose_draw (.txt) < prev   
Commodore BASIC  |  2022-08-26  |  4KB  |  159 lines

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