Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dim pfx = z
- dim pfy = y
- dim pfox = x
- dim pfoy = w
- dim pl = v
- dim jf = u
- dim dx = t
- dim dy = s
- dim sf = r
- dim sc0 = score
- dim sc1 = score + 1
- dim sc2 = score + 2
- const pfc = $82
- const p0cc = $36
- const p0nc = $42
- const cp0c = $1C
- COLUBK = 0
- COLUPF = pfc
- COLUP0 = p0nc
- pfx = 15 : pfox = 15
- pfy = 5 : pfoy = 5
- f = 1 : pl = 1 :scorecolor = p0nc
- gosub p1
- playfield:
- ................................
- ................................
- ................................
- ................................
- ................................
- ................................
- ................................
- ................................
- ................................
- ................................
- ................................
- ................................
- end
- pfpixel pfx pfy on
- player0x = 80 : player0y = 30
- main
- temp1 = sf
- sf = SWCHA/16
- temp2 = (sf ^ 15) & temp1
- temp3 = temp2 & 3 : dy = dtbl[temp3]
- temp3 = temp2/4 & 3 : dx = dtbl[temp3]
- if temp2 then on f gosub movpf movpl0 chngpl0
- if !jf && joy0fire then jf = 1 : f = ftbl[f] : scorecolor = scctbl[f] : on f gosub pf_scc pl0_scc chngpl0
- if jf && !joy0fire then jf = 0
- if f = 2 then COLUP0 = cp0c : goto draw
- if collision(player0, playfield) then COLUP0 = p0cc else COLUP0 = p0nc
- draw
- drawscreen
- goto main
- data scctbl
- pfc, p0nc, cp0c
- end
- data dtbl
- 0, -1, 1, 0
- end
- data ftbl
- 1, 2, 0
- end
- movpf
- pfx = (pfx + dx) & 31
- pfy = pfy + dy
- if pfy = 255 then pfy = 11
- if pfy = 12 then pfy = 0
- pfpixel pfox pfoy off
- pfpixel pfx pfy on
- pfox = pfx : pfoy = pfy
- pf_scc
- temp1 = pfx : temp2 = pfy
- goto update_scr
- movpl0
- player0x = player0x + dx
- player0y = player0y + dy
- pl0_scc
- temp1 = player0x : temp2 = player0y
- goto update_scr
- chngpl0
- if !temp2 then return
- pl = pl + dx
- if pl = 255 then pl = 6
- if pl = 7 then pl = 0
- on pl goto p0 p1 p2 p3 p4 p5 p6
- update_scr
- 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
- sc1 = sc1 & 240 : sc2 = 0
- if temp2 >= 100 then sc1 = sc1 + 1 : temp2 = temp2 - 100
- if temp2 >= 100 then sc1 = sc1 + 1 : temp2 = temp2 - 100
- if temp2 >= 50 then sc2 = sc2 + 80 : temp2 = temp2 - 50
- if temp2 >= 30 then sc2 = sc2 + 48 : temp2 = temp2 - 30
- if temp2 >= 20 then sc2 = sc2 + 32 : temp2 = temp2 - 20
- if temp2 >= 10 then sc2 = sc2 + 16 : temp2 = temp2 - 10
- sc2 = sc2 | temp2
- rt
- return
- p0
- player0:
- %11111111
- %10000001
- %10000001
- %10000001
- %10000001
- %10000001
- %10000001
- %11111111
- end
- return
- p1
- player0:
- %10000001
- %00000000
- %00000000
- %00000000
- %00000000
- %00000000
- %00000000
- %10000001
- end
- return
- p2
- player0:
- %00010000
- %00010000
- %00010000
- %00011111
- %11111000
- %00001000
- %00001000
- %00001000
- end
- return
- p3
- player0:
- %00010000
- %00010000
- %00010000
- %11111110
- %00010000
- %00010000
- %00010000
- %00000000
- end
- return
- p4
- player0:
- %10000001
- %10000001
- %10000001
- %10000001
- %10000001
- %10000001
- %10000001
- %10000001
- end
- return
- p5
- player0:
- %10000001
- %10000001
- %10000001
- %10000001
- %10000001
- %10000001
- %10000001
- %11111111
- end
- return
- p6
- player0:
- %11111111
- %10000001
- %10000001
- %10000001
- %10000001
- %10000001
- %10000001
- %10000001
- end
- return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement