Advertisement
Guest User

x3.bas

a guest
May 30th, 2013
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. set optimization noinlinedata
  2.  
  3. dim ns0p = a
  4. dim jf = b
  5. dim p0x = c
  6. dim p0v = d
  7.  
  8. player1:
  9. %11111110
  10. %01111100
  11. %00111000
  12. %00010000
  13. %00000000
  14. %00000000
  15. %00000000
  16. %00000000
  17. end
  18.  
  19. player0:
  20. %00000000
  21. %00000000
  22. %00000000
  23. %00000000
  24. %00000000
  25. %00011000
  26. %10111101
  27. %01100110
  28. end
  29.  
  30. player1x = 76 : player1y = 88
  31. player0x = 56 : p0x = 56 : player0y = 10
  32. ns0p = %00000111 : jf = 1 : p0v = 0
  33.  
  34. main
  35.  
  36. if !collision(player0, missile1) then no_col
  37.  
  38. rem bits in the table pointer ns0p correspond
  39. rem to the three copies and get masked out
  40. rem for a collision
  41.  
  42. temp1 = missile1x - p0x
  43. if temp1 < 8 then ns0p = ns0p & %11111011 : goto update_p0
  44. if temp1 < 24 then ns0p = ns0p & %11111101 : goto update_p0
  45. if temp1 < 40 then ns0p = ns0p & %11111110 : goto update_p0
  46. update_p0
  47. jf = 1 : missile1y = 0
  48. if !ns0p then p0v = 1 : ns0p = %00000111
  49. no_col
  50.  
  51. if joy0fire && jf then missile1x = player1x + 3 : missile1y = 80 : jf = 0
  52. if joy0left then if player1x > 8 then player1x = player1x - 1
  53. if joy0right then if player1x < 146 then player1x = player1x + 1
  54.  
  55. if jf then skip_missile
  56. missile1y = missile1y - 1
  57. if !missile1y then jf = 1
  58. skip_missile
  59.  
  60. p0x = p0x + p0v
  61. if p0x < 10 || p0x >110 then p0v = 0 - p0v
  62.  
  63. player0x = p0x + pos0[ns0p]
  64.  
  65. NUSIZ0 = ns0[ns0p]
  66. NUSIZ1 = $10
  67. COLUP0 = $28
  68. COLUP1 = $20
  69. COLUBK = $00
  70. drawscreen
  71.  
  72. goto main
  73.  
  74. data ns0
  75. $20, $20, $20, $21, $20, $22, $21, $23
  76. end
  77.  
  78. data pos0
  79. $00, $20, $10, $10, $00, $00, $00, $00
  80. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement