Guest User

bf13_mod4.bas

a guest
Jan 27th, 2014
45
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.  
  7. beginning
  8.  
  9. playfield:
  10. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
  11. X..............................X.
  12. X..XX..XX..XX..XX..XX..XX..XX..X.
  13. X..............................X.
  14. X..XX..XX..XX..XX..XX..XX..XX..X.
  15. X..............................X.
  16. X..XX..XX..XX..XX..XX..XX..XX..X.
  17. X..............................X.
  18. X..XX..XX..XX..XX..XX..XX..XX..X.
  19. X..............................X.
  20. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
  21. end
  22.  
  23. player0:
  24. %00011110
  25. %00110011
  26. %11110001
  27. end
  28.  
  29. player1:
  30. %00111100
  31. %01111110
  32. %11111111
  33. %01111110
  34. %00111100
  35. end
  36.  
  37. player0score=$80
  38.  
  39. if !joy0fire then main
  40.  
  41.  
  42. new_game
  43. player1score=0 : player0score=0 : y=0
  44. new_game_2
  45.  
  46. player1x=21 : player1y=21
  47. player0x=101
  48. player0y=79 : m=79
  49.  
  50. get_new_present
  51.  
  52. ballx=(rand/4)+21
  53. bally=(rand/4)+15
  54.  
  55.  
  56. main
  57.  
  58. player1scorecolor=26 : COLUBK=$c6 : COLUPF=$44
  59. if switchbw then player1scorecolor=12 : COLUBK=4 : COLUPF=0
  60.  
  61. ballheight=2
  62. CTRLPF=$21
  63. AUDV0=z : AUDC0=z : AUDF0=24
  64.  
  65. drawscreen
  66.  
  67. if z>0 then w=w+1
  68. if w>15 then z=0 : w=0
  69.  
  70. if player0score>$79 then goto beginning
  71. y=y+1
  72. if y=255 then player0score=addbcd(player0score, 5)
  73.  
  74. if collision(player1,player0) then player0score=addbcd(player0score, 5) : z=3 : goto new_game_2
  75.  
  76. if collision(ball,playfield) then ballx=ballx+1
  77. if collision(player1,ball) then player1score=addbcd(player1score, 1) : z=4 : goto get_new_present
  78.  
  79. move_enemy
  80. s=s+1 : m=m+1
  81.  
  82. if s{0} then move_player
  83. if m>31 then get_enemy_dir
  84. goto enemy_move
  85.  
  86.  
  87. get_enemy_dir
  88. m=0
  89. if n>2 then skip_eud
  90. n=1
  91. if player0y>player1y then enemy_move
  92. n = n + 1 : goto enemy_move
  93.  
  94. skip_eud
  95. n=3
  96. if player0x<player1x then n = n + 1
  97.  
  98. enemy_move
  99. pn = 0 : dir = n
  100. gosub move
  101. skip_enemy_move
  102.  
  103. move_player
  104. if s{0} then goto main
  105.  
  106. pn = 1
  107. dir = SWCHA / 16 ^ $0F
  108. if !dir then skip_to_f
  109. dir = dn[dir] : gosub move
  110. if dir then f = dir : goto main
  111. skip_to_f
  112. dir = f
  113. gosub move
  114. goto main
  115.  
  116. rem direction number 1 = up, 2 = down, 3 = left, 4 = right
  117. data dn
  118. 0, 1, 2, 0, 3, 3, 0, 4, 4, 4
  119. end
  120.  
  121. rem pn = player number parameter
  122. rem dir = direction parameter
  123. rem scol = screen column
  124. rem srow = screen row
  125.  
  126. dim pn = temp3
  127. dim dir = temp4
  128. dim scol = temp5
  129. dim srow = temp6
  130.  
  131. move
  132. if dir < 3 then ud
  133. scol = (offset[dir] + player0x[pn]) / 4
  134. srow = (player0y[pn] - 7) / 8
  135. if pfread(scol, srow) then rl_0
  136. scol = (srow * 8) + 7
  137. if player0y[pn] = scol then skip_rl_0
  138. rl_0
  139. dir = 0
  140. skip_rl_0
  141. player0x[pn] = player0x[pn] + mov[dir]
  142. return
  143.  
  144. ud
  145. scol = (player0x[pn] - 17) / 4
  146. srow = (offset[dir] + player0y[pn]) / 8
  147. if pfread(scol, srow) then ud_0
  148. scol = scol + 1
  149. if pfread(scol, srow) then ud_0
  150. scol = (scol * 4) + 13
  151. if player0x[pn] = scol then skip_ud_0
  152. ud_0
  153. dir = 0
  154. skip_ud_0
  155. player0y[pn] = player0y[pn] + mov[dir]
  156. return
  157.  
  158. data offset
  159. 0, -8, 1, -18, -9
  160. end
  161.  
  162. data mov
  163. 0, -1, 1, -1, 1
  164. 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.

×