Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rem Generated 02/11/2015 12:26:30 by Visual bB Version 1.0.0.548
- rem **********************************
- rem *<filename> *
- rem *<description> *
- rem *<author> *
- rem *<contact info> *
- rem *<license> *
- rem **********************************
- playfield:
- ................................
- XXX...X...X.X..X.X..X.X..XX.....
- X..X.X.X.X.X.X.X.XX.X.X.X.....X.
- X..X.X.X.X.X.X.X.X.XX.X.X....X.X
- XXX...X..X...X.X.X..X.X..XX...X.
- ................................
- ...X....X......XXX..X..X.XXX....
- ..X.X...X.....X...X.XX.X.X..X...
- ...X....X.....XXXXX.X.XX.X..X...
- ........XXXX..X...X.X..X.XXX....
- ................................
- end
- COLUBK = $BC
- COLUPF = $BE
- ; COLUP0 = $3E
- ; COLUP1 = $3E
- dim _Sound0 = c
- dim _Chan0_Duration = x
- dim _C0 = e
- dim _V0 = f
- dim _F0 = g
- player0x=50:player0y=50
- player1x=20:player1y=20
- missile0height=4:missile0y=255
- NUSIZ0 = 16
- sprites
- player0:
- %00111100
- %00011000
- %11111111
- %01111110
- %00111100
- %00111100
- %00011000
- %00011000
- end
- player1:
- %00101010
- %01001001
- %00101010
- %00110110
- %01111111
- %01011101
- %01101011
- %00111110
- end
- if missile0y>240 then goto skip
- missile0y=missile0y-2:goto draw_loop
- skip
- if joy0fire then missile0y = player0y-2:missile0x = player0x+4: _Sound0 = 4 : _Chan0_Duration = 12 : _V0 = 8 : _F0 = 22
- draw_loop
- drawscreen
- if player1y<player0y then player1y=player1y+1
- if player1y>player0y then player1y=player1y-1
- if player1x<player0x then player1x=player1x+1
- if player1x>player0x then player1x=player1x-1
- player1x=player1x:player1y=player1y
- if joy0up then player0y=player0y-1:goto jump
- if joy0down then player0y=player0y+1:goto jump
- if joy0left then player0x=player0x-1:goto jump
- if joy0right then player0x=player0x+1:goto jump
- if collision(missile0,player1) then score=score+1:player1x=rand/2:player1y=0:missile0y=255
- if collision(player0,player1) then score=score-1:player1x=rand/2:player1y=0:missile0y=255
- jump
- ;***************************************************************
- ;
- ; Channel 0 sound effect check.
- ;
- ;```````````````````````````````````````````````````````````````
- ; If no channel 0 sound effect is on, skip all channel 0
- ; sound effect subsections.
- ;
- if !_Sound0 then goto __Skip_Channel_0
- ;```````````````````````````````````````````````````````````````
- ; Decreases the channel 0 duration counter.
- ;
- _Chan0_Duration = _Chan0_Duration - 1
- ;```````````````````````````````````````````````````````````````
- ; If channel 0 duration counter is zero, end current sound
- ; effect.
- ;
- if !_Chan0_Duration then goto __Clear_Channel_0
- ;***************************************************************
- ;
- ; Channel 0 sound effect 4.
- ;
- ; The volume and the frequency changes.
- ;
- ;```````````````````````````````````````````````````````````````
- ; If sound 4 isn't on, skip this subsection.
- ;
- if _Sound0 <> 4 then goto __Skip_Chan0_Sound_004
- ;```````````````````````````````````````````````````````````````
- ; Sets the tone, volume and frequency.
- ;
- AUDC0 = 4 : AUDV0 = _V0 : AUDF0 = _F0
- ;```````````````````````````````````````````````````````````````
- ; Only looks at the even/odd bit.
- ;
- temp5 = _Chan0_Duration & %00000001
- ;```````````````````````````````````````````````````````````````
- ; Decreases volume only when _Chan0_Duration is an odd number.
- ;
- if temp5 && _V0 then _V0 = _V0 - 1
- ;```````````````````````````````````````````````````````````````
- ; Decreases the frequency variable.
- ; DM edited this to decend through the pitches - strangely by changing - to +
- if _F0 then _F0 = _F0 + 1
- ;```````````````````````````````````````````````````````````````
- ; Jumps to end of channel 0 area.
- ;
- goto __Skip_Channel_0
- __Skip_Chan0_Sound_004
- ;***************************************************************
- ;
- ; Channel 0 sound effect 5.
- ;
- ; The tone, volume, and frequency changes.
- ;
- ;```````````````````````````````````````````````````````````````
- ; If sound 5 isn't on, skip this subsection.
- ;
- if _Sound0 <> 5 then goto __Skip_Chan0_Sound_005
- ;```````````````````````````````````````````````````````````````
- ; Sets the tone, volume and frequency.
- ;
- AUDC0 = _C0 : AUDV0 = _V0 : AUDF0 = _F0
- ;```````````````````````````````````````````````````````````````
- ; Flips the tone between 4 and 12.
- ;
- _C0 = _C0 ^ 8
- ;```````````````````````````````````````````````````````````````
- ; Only looks at the even/odd bit.
- ;
- temp5 = _Chan0_Duration & %00000001
- ;```````````````````````````````````````````````````````````````
- ; Decreases volume only when _Chan0_Duration is an odd number.
- ;
- if temp5 && _V0 then _V0 = _V0 - 1
- ;```````````````````````````````````````````````````````````````
- ; Decreases the frequency variable.
- ;
- if _F0 then _F0 = _F0 - 1
- ;```````````````````````````````````````````````````````````````
- ; Jumps to end of channel 0 area.
- ;
- goto __Skip_Channel_0
- __Skip_Chan0_Sound_005
- ;***************************************************************
- ;
- ; Other channel 0 sound effects go here.
- ;
- ;***************************************************************
- ;***************************************************************
- ;
- ; Jumps to end of channel 0 area. (This catches any mistakes.)
- ;
- goto __Skip_Channel_0
- ;***************************************************************
- ;
- ; Clears channel 0.
- ;
- __Clear_Channel_0
- ;```````````````````````````````````````````````````````````````
- ; Turns off channel 0 sound variable and mutes channel.
- ;
- _Sound0 = 0 : AUDV0 = 0
- ;***************************************************************
- ;
- ; End of channel 0 area.
- ;
- __Skip_Channel_0
- goto sprites
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement