Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set optimization noinlinedata
- dim ns0p = a
- dim jf = b
- dim p0x = c
- dim p0v = d
- player1:
- %11111110
- %01111100
- %00111000
- %00010000
- %00000000
- %00000000
- %00000000
- %00000000
- end
- player0:
- %00000000
- %00000000
- %00000000
- %00000000
- %00000000
- %00011000
- %10111101
- %01100110
- end
- player1x = 76 : player1y = 88
- player0x = 56 : p0x = 56 : player0y = 10
- ns0p = %00000111 : jf = 1 : p0v = 0
- main
- if !collision(player0, missile1) then no_col
- rem bits in the table pointer ns0p correspond
- rem to the three copies and get masked out
- rem for a collision
- temp1 = missile1x - p0x
- if temp1 < 8 then ns0p = ns0p & %11111011 : goto update_p0
- if temp1 < 24 then ns0p = ns0p & %11111101 : goto update_p0
- if temp1 < 40 then ns0p = ns0p & %11111110 : goto update_p0
- update_p0
- jf = 1 : missile1y = 0
- if !ns0p then p0v = 1 : ns0p = %00000111
- no_col
- if joy0fire && jf then missile1x = player1x + 3 : missile1y = 80 : jf = 0
- if joy0left then if player1x > 8 then player1x = player1x - 1
- if joy0right then if player1x < 146 then player1x = player1x + 1
- if jf then skip_missile
- missile1y = missile1y - 1
- if !missile1y then jf = 1
- skip_missile
- p0x = p0x + p0v
- if p0x < 10 || p0x >110 then p0v = 0 - p0v
- player0x = p0x + pos0[ns0p]
- NUSIZ0 = ns0[ns0p]
- NUSIZ1 = $10
- COLUP0 = $28
- COLUP1 = $20
- COLUBK = $00
- drawscreen
- goto main
- data ns0
- $20, $20, $20, $21, $20, $22, $21, $23
- end
- data pos0
- $00, $20, $10, $10, $00, $00, $00, $00
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement