Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dim pfx = x
- dim pfy = y
- dim pfox = u
- dim pfoy = v
- dim jf = w
- dim lf = p
- dim rf = q
- dim uf = r
- dim df = s
- dim sc0 = score
- dim sc1 = score + 1
- dim sc2 = score + 2
- const pfc = $82
- const p0c = $44
- COLUBK = 0
- COLUPF = pfc
- COLUP0 = p0c
- lf = 0 : rf = 0 : uf = 0 : df = 0
- pfx = 15 : pfox = 15
- pfy = 5 : pfox = 5
- f = 1
- playfield:
- ................................
- ................................
- ................................
- ................................
- ................................
- ................................
- ................................
- ................................
- ................................
- ................................
- ................................
- ................................
- end
- player0:
- %11111111
- %10000001
- %10000001
- %10000001
- %10000001
- %10000001
- %10000001
- %11111111
- end
- pfpixel pfx pfy on
- player0x = 80 : player0y = 30
- main
- if f then goto updatep
- if !lf && joy0left then lf = 1 : if pfx then pfx = pfx - 1
- if lf && !joy0left then lf = 0
- if !rf && joy0right then rf = 1 : if pfx < 31 then pfx = pfx + 1
- if rf && !joy0right then rf = 0
- if !uf && joy0up then uf = 1 : if pfy then pfy = pfy - 1
- if uf && !joy0up then uf = 0
- if !df && joy0down then df = 1 : if pfy < 11 then pfy = pfy + 1
- if df && !joy0down then df = 0
- pfpixel pfox pfoy off
- pfpixel pfx pfy on
- pfox = pfx : pfoy = pfy
- goto display
- updatep
- if !lf && joy0left then lf = 1 : player0x = player0x - 1
- if lf && !joy0left then lf = 0
- if !rf && joy0right then rf = 1 : player0x = player0x + 1
- if rf && !joy0right then rf = 0
- if !uf && joy0up then uf = 1 : player0y = player0y - 1
- if uf && !joy0up then uf = 0
- if !df && joy0down then df = 1 : player0y = player0y + 1
- if df && !joy0down then df = 0
- display
- if !jf && joy0fire then jf = 1 : f = f ^ 1
- if jf && !joy0fire then jf = 0
- if f then temp1 = player0x else temp1 = pfx
- sc0 = 0 : sc1 = sc1 & 15
- if temp1 >= 100 then sc0 = sc0 + 16 : temp1 = temp1 - 100
- if temp1 >= 100 then sc0 = sc0 + 16 : temp1 = temp1 - 100
- if temp1 >= 50 then sc0 = sc0 + 5 : temp1 = temp1 - 50
- if temp1 >= 30 then sc0 = sc0 + 3 : temp1 = temp1 - 30
- if temp1 >= 20 then sc0 = sc0 + 2 : temp1 = temp1 - 20
- if temp1 >= 10 then sc0 = sc0 + 1 : temp1 = temp1 - 10
- sc1 = (temp1 * 4 * 4) | sc1
- if f then temp1 = player0y else temp1 = pfy
- sc1 = sc1 & 240 : sc2 = 0
- if temp1 >= 100 then sc1 = sc1 + 1 : temp1 = temp1 - 100
- if temp1 >= 100 then sc1 = sc1 + 1 : temp1 = temp1 - 100
- if temp1 >= 50 then sc2 = sc2 + 80 : temp1 = temp1 - 50
- if temp1 >= 30 then sc2 = sc2 + 48 : temp1 = temp1 - 30
- if temp1 >= 20 then sc2 = sc2 + 32 : temp1 = temp1 - 20
- if temp1 >= 10 then sc2 = sc2 + 16 : temp1 = temp1 - 10
- sc2 = sc2 | temp1
- COLUP0 = p0c
- if f then scorecolor = p0c else scorecolor = pfc
- drawscreen
- goto main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement