Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Contact: ;
- LDA $14E0,x ;Sprite Xpos High Byte
- XBA ;Pseudo 16-bit
- LDA $E4,x ;Sprite Xpos Low Byte
- REP #$20 ;16-bit A
- SEC ;Subtract
- SBC $94 ;Mario's X position (level)
- SEP #$20 ;8-bit
- PHA ;Preserve A
- JSR SUB_HORZ_POS ;Y = horz flag
- PLA ;Restore A
- EOR Flip,y ;Flip A depending on horz direction
- CMP #$10 ;Xpos size (#16)
- BCS NoThx ;Branch if greater than or equal to
- LDA $14D4,x ;Sprite Ypos High Byte
- XBA ;Pseudo 16-bit
- LDA $D8,x ;Sprite Ypos Low Byte
- REP #$20 ;16-bit A
- SEC ;Subtract
- SBC $96 ;Mario's Y position (level)
- SEP #$20 ;8-bit A
- PHA ;Preserve A
- JSR SUB_VERT_POS ;Vertical Y GET
- PLA ;Restore A
- EOR Flip,y ;Flip based on wether or not Mario is above or below
- CMP #$20 ;Ypos size (#32)
- BCS Nothx ;Branch if greater than or equal to
- JSL $00F5B7 ;Contact is made
- NoThx: ;Contact is not made/finished
- RTS ;Return
- Flip: ;Flip data
- db $FF,$00 ;and stuff
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement