Advertisement
Guest User

Untitled

a guest
Oct 31st, 2011
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. level1F:
  2. PHP
  3. REP #%00110100
  4. LDA $1C ; \
  5. CMP.w #$0000 ; | compare screen Y position
  6.  
  7. BCS VARH1f ; | with $C0 - desired Y
  8. BCC ZERO1f
  9.  
  10. LDA $1C
  11. SBC #$0000
  12. STA $24
  13. ADC #$001B
  14. STA $24
  15. PLP
  16. RTS
  17.  
  18. VARH1f:
  19. LDA $1C ; \
  20. SBC.w #$0000 ; | set layer 3 Y
  21. STA $24 ; | to $C0 - desired height
  22. PLP ; | if screen Y > or = the value:
  23. RTS ; /
  24.  
  25. ZERO1f:
  26. LDA.w #$0000 ; \
  27. STA $24 ; | set layer 3 Y to zero
  28. PLP ; | if screen Y < the value
  29. BNE Return1F
  30. LDA $13D4
  31. BNE Return1F
  32. LDA $13
  33. AND #$03
  34. BEQ Return1F
  35. REP #$20
  36. DEC $22
  37. SEP #$20
  38. Return1F:
  39. RTS
  40.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement