Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ; Main ;
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- LDA $14 ;\
- AND #$07 ; | Run code every 8 frames...
- ORA $9D ; | except when sprites are not locked
- BNE + ;/
- REP #$20 ;
- LDA $14AF ; on/off switch value, 00 = ON, anything else = OFF
- BNE WaterDown ; if OFF, bring the water down
- WaterUp:
- LDA $1468 ; layer 2 position, next frame
- CMP #$00CF ;\ if layer 2 will go too high, branch
- BCS + ;/
- INC $1468 ;
- +
- SEP #$20 ;
- RTS ;
- WaterDown:
- LDA $1468 ;
- BEQ + ;
- DEC $1468 ;
- SEP #$20 ;
- RTS ;
- +
- SEP #$20 ;
- STZ $14AF ;
- RTS ;
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ; Init ;
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- STZ $1466
- STZ $1467
- STZ $1468
- STZ $1469
- STZ $14af
- RTS
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement