Guest User

bf15a_mod.bas

a guest
Jan 28th, 2014
52
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. set kernel_options no_blank_lines
  2. set romsize 2k
  3.  
  4. const noscore=1
  5.  
  6. d=$c6 : e=$44
  7.  
  8. title_screen
  9.  
  10. g=0
  11. if w<64 then w=w+1 : z=1 : t=w/2
  12. if w>63 then u=0 : y=0
  13. bally=200
  14.  
  15. b=b+1
  16. if b=0 then d=rand : e=rand
  17.  
  18.  
  19. playfield:
  20. .X.....XXX...XXX...XXX...X.X.....
  21. .X.....X.X...X.X...X.X...X.X.....
  22. .X.....XXX...XX....XX.....X......
  23. .X.....X.X...X.X...X.X....X......
  24. .X.....X.X...X.X...X.X....X......
  25. .X...............................
  26. .X.....XXX...XX.XX.........XX....
  27. .X.....X.....X.X.X.........X.X...
  28. .X.....XXX...X...X.........X.X...
  29. .X.....X.....X...X.........X.X...
  30. .XXXX..XXX...X...X.........X.X...
  31. end
  32.  
  33. player0:
  34. %10101011
  35. %10101010
  36. %10111011
  37. %10101010
  38. %10101011
  39. %10000000
  40. end
  41.  
  42. player1:
  43. %00011000
  44. %00011000
  45. %01111110
  46. %01111110
  47. %01111110
  48. %01111110
  49. %01111110
  50. %01111110
  51. %01111110
  52. %01111110
  53. %11111111
  54. %11111111
  55. %11111111
  56. %11111111
  57. %11111111
  58. %11111111
  59. %11111111
  60. %11111111
  61. %11111111
  62. %11111111
  63. %11111111
  64. %11111111
  65. %11111111
  66. %11111111
  67. %11111111
  68. %11111111
  69. %11111111
  70. %11111111
  71. %11111111
  72. %11111111
  73. %11111111
  74. %01111110
  75. %01111110
  76. %01111110
  77. %01111110
  78. %01111110
  79. %01111110
  80. %01111110
  81. %01111110
  82. %00011000
  83. %00011000
  84. end
  85.  
  86. player0x=78 : player0y=47 : missile1x=78 : missile1y=41 : NUSIZ1=$25
  87. player1x=99 : player1y=88
  88.  
  89.  
  90. player0score=$80
  91.  
  92. if !joy0fire then main
  93.  
  94.  
  95.  
  96. beginning_game
  97.  
  98. playfield:
  99. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
  100. X..............................X.
  101. X..XX..XX..XX..XX..XX..XX..XX..X.
  102. X..............................X.
  103. X..XX..XX..XX..XX..XX..XX..XX..X.
  104. X..............................X.
  105. X..XX..XX..XX..XX..XX..XX..XX..X.
  106. X..............................X.
  107. X..XX..XX..XX..XX..XX..XX..XX..X.
  108. X..............................X.
  109. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
  110. end
  111.  
  112. player0:
  113. %00011110
  114. %00110011
  115. %11110001
  116. end
  117.  
  118. player1:
  119. %00111100
  120. %01111110
  121. %11111111
  122. %01111110
  123. %00111100
  124. end
  125.  
  126.  
  127.  
  128. new_game
  129. player1score=0 : player0score=0 : y=0 : v=0
  130. new_game_2
  131. player1x=21 : player1y=21
  132. player0x=133
  133. player0y=79 : m=79
  134.  
  135. get_new_present
  136.  
  137. ballx=(rand/4)+21
  138. bally=(rand/4)+15
  139.  
  140.  
  141. main
  142.  
  143. if switchreset then goto title_screen
  144.  
  145.  
  146. player1scorecolor=26 : COLUBK=d : COLUPF=e
  147. if switchbw then a=d : c=e : a=(d/16)-g : c=e/16 : player1scorecolor=8 : COLUBK=a : COLUPF=c
  148.  
  149.  
  150. ballheight=2
  151. CTRLPF=$21
  152. AUDV0=u : AUDC0=z : AUDF0=t
  153.  
  154. drawscreen
  155.  
  156. if player0score=$80 then goto title_screen
  157. d=$c6 : e=$44 : g=6
  158. if z>0 then w=w+1
  159. if w>15 then z=0 : w=0
  160.  
  161.  
  162. if player0score>$79 then z=1 : u=4 : y=1 : w=0
  163.  
  164.  
  165.  
  166. missile1y=100
  167. NUSIZ1=$00
  168. b=0
  169.  
  170. y=y+1
  171. if y=255 then player0score=addbcd(player0score, 5)
  172.  
  173. if collision(player1,player0) then player0score=addbcd(player0score, 5) : z=3 : u=4 : t=24 : goto new_game_2
  174.  
  175. if collision(ball,playfield) then ballx=ballx+1
  176. if collision(player1,ball) then player1score=addbcd(player1score, 1) : z=4 : u=4 : t=24 : goto get_new_present
  177.  
  178. move_enemy
  179. s=s+1 : m=m+1
  180.  
  181. if s{0} then move_player
  182. if m<32 then enemy_move
  183.  
  184. get_enemy_dir
  185. m=0
  186. if n<3 then skip_eud
  187. n=1
  188. if player0y>player1y then enemy_move
  189. n = n + 1 : goto enemy_move
  190.  
  191. skip_eud
  192. n=3
  193. if player0x<player1x then n = n + 1
  194.  
  195.  
  196. enemy_move
  197. pn = 0 : dir = n
  198. gosub move
  199. skip_enemy_move
  200.  
  201. move_player
  202. if s{0} then goto main
  203.  
  204. pn = 1
  205. dir = SWCHA / 16 ^ $0F
  206. if !dir then skip_to_f
  207. dir = dn[dir] : gosub move
  208. if dir then f = dir : goto main
  209. skip_to_f
  210. dir = f
  211. gosub move
  212. goto main
  213.  
  214. rem direction number 1 = up, 2 = down, 3 = left, 4 = right
  215. data dn
  216. 0, 1, 2, 0, 3, 3, 3, 0, 4, 4, 4
  217. end
  218.  
  219. rem pn = player number parameter
  220. rem dir = direction parameter
  221. rem scol = screen column
  222. rem srow = screen row
  223.  
  224. dim pn = temp3
  225. dim dir = temp4
  226. dim scol = temp5
  227. dim srow = temp6
  228.  
  229. move
  230. if dir < 3 then ud
  231. scol = (offset[dir] + player0x[pn]) / 4
  232. srow = (player0y[pn] - 7) / 8
  233. if pfread(scol, srow) then rl_0
  234. scol = (srow * 8) + 7
  235. if player0y[pn] = scol then skip_rl_0
  236. rl_0
  237. dir = 0
  238. skip_rl_0
  239. player0x[pn] = player0x[pn] + mov[dir]
  240. return
  241.  
  242. ud
  243. scol = (player0x[pn] - 17) / 4
  244. srow = (offset[dir] + player0y[pn]) / 8
  245. if pfread(scol, srow) then ud_0
  246. scol = scol + 1
  247. if pfread(scol, srow) then ud_0
  248. scol = (scol * 4) + 13
  249. if player0x[pn] = scol then skip_ud_0
  250. ud_0
  251. dir = 0
  252. skip_ud_0
  253. player0y[pn] = player0y[pn] + mov[dir]
  254. return
  255.  
  256. data offset
  257. 0, -8, 1, -18, -9
  258. end
  259.  
  260. data mov
  261. 0, -1, 1, -1, 1
  262. end
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×