Advertisement
Chdata

Untitled

Sep 30th, 2013
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. Contact: ;
  2. LDA $14E0,x ;Sprite Xpos High Byte
  3. XBA ;Pseudo 16-bit
  4. LDA $E4,x ;Sprite Xpos Low Byte
  5. REP #$20 ;16-bit A
  6. SEC ;Subtract
  7. SBC $94 ;Mario's X position (level)
  8. SEP #$20 ;8-bit
  9. PHA ;Preserve A
  10. JSR SUB_HORZ_POS ;Y = horz flag
  11. PLA ;Restore A
  12. EOR Flip,y ;Flip A depending on horz direction
  13. CMP #$10 ;Xpos size (#16)
  14. BCS NoThx ;Branch if greater than or equal to
  15. LDA $14D4,x ;Sprite Ypos High Byte
  16. XBA ;Pseudo 16-bit
  17. LDA $D8,x ;Sprite Ypos Low Byte
  18. REP #$20 ;16-bit A
  19. SEC ;Subtract
  20. SBC $96 ;Mario's Y position (level)
  21. SEP #$20 ;8-bit A
  22. PHA ;Preserve A
  23. JSR SUB_VERT_POS ;Vertical Y GET
  24. PLA ;Restore A
  25. EOR Flip,y ;Flip based on wether or not Mario is above or below
  26. CMP #$20 ;Ypos size (#32)
  27. BCS Nothx ;Branch if greater than or equal to
  28. JSL $00F5B7 ;Contact is made
  29. NoThx: ;Contact is not made/finished
  30. RTS ;Return
  31. Flip: ;Flip data
  32. db $FF,$00 ;and stuff
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement