Guest User

bf13_mod3.bas

a guest
Jan 27th, 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.  
  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. dir = SWCHA / 16 ^ $0F
  107. if !dir then dir = f else dir = dn[dir]
  108. pn = 1
  109. gosub move
  110. if dir then f = dir else dir = f : gosub move
  111. goto main
  112.  
  113. rem direction number 1 = up, 2 = down, 3 = left, 4 = right
  114. data dn
  115. 0, 1, 2, 0, 3, 3, 0, 4, 4, 4
  116. end
  117.  
  118. rem pn = player number parameter
  119. rem dir = direction parameter
  120. rem scol = screen column
  121. rem srow = screen row
  122.  
  123. dim pn = temp3
  124. dim dir = temp4
  125. dim scol = temp5
  126. dim srow = temp6
  127.  
  128. move
  129. if dir < 3 then ud
  130. scol = (offset[dir] + player0x[pn]) / 4
  131. srow = (player0y[pn] - 7) / 8
  132. if pfread(scol, srow) then rl_0
  133. scol = (srow * 8) + 7
  134. if player0y[pn] = scol then skip_rl_0
  135. rl_0
  136. dir = 0
  137. skip_rl_0
  138. player0x[pn] = player0x[pn] + mov[dir]
  139. return
  140.  
  141. ud
  142. scol = (player0x[pn] - 17) / 4
  143. srow = (offset[dir] + player0y[pn]) / 8
  144. if pfread(scol, srow) then ud_0
  145. scol = scol + 1
  146. if pfread(scol, srow) then ud_0
  147. scol = (scol * 4) + 13
  148. if player0x[pn] = scol then skip_ud_0
  149. ud_0
  150. dir = 0
  151. skip_ud_0
  152. player0y[pn] = player0y[pn] + mov[dir]
  153. return
  154.  
  155. data offset
  156. 0, -8, 1, -18, -9
  157. end
  158.  
  159. data mov
  160. 0, -1, 1, -1, 1
  161. 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.

×