Advertisement
MolSno

C1L4 gimmick converted final

Sep 20th, 2014
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ; Main ;
  3. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  4. LDA $14 ;\
  5. AND #$07 ; | Run code every 8 frames...
  6. ORA $9D ; | except when sprites are not locked
  7. BNE + ;/
  8.  
  9. REP #$20 ;
  10. LDA $14AF ; on/off switch value, 00 = ON, anything else = OFF
  11. BNE WaterDown ; if OFF, bring the water down
  12. WaterUp:
  13. LDA $1468 ; layer 2 position, next frame
  14. CMP #$00CF ;\ if layer 2 will go too high, branch
  15. BCS + ;/
  16. INC $1468 ;
  17. +
  18. SEP #$20 ;
  19. RTS ;
  20. WaterDown:
  21. LDA $1468 ;
  22. BEQ + ;
  23. DEC $1468 ;
  24. SEP #$20 ;
  25. RTS ;
  26. +
  27. SEP #$20 ;
  28. STZ $14AF ;
  29. RTS ;
  30.  
  31. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  32. ; Init ;
  33. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  34. STZ $1466
  35. STZ $1467
  36. STZ $1468
  37. STZ $1469
  38. STZ $14af
  39. RTS
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement