db $42

JMP MarioBelow : JMP MarioAbove : JMP MarioSide : JMP SpriteV : JMP SpriteH : JMP MarioCape : JMP MarioFireBall : JMP MarioCorner : JMP MarioHeadinside : JMP MarioBodyinside

!CartWithMario = $1528
!CurrentCart = $151C
!CartNeeded = #$01

SpriteV:
SpriteH:
LDA $1497
BNE MarioCape
LDA !CartWithMario,x
CMP !CurrentCart,x
BNE MarioCape
CMP !CartNeeded
BEQ MarioCape
PHY
JSL $00F5B7
PLY
MarioCape:
MarioBelow:
MarioHeadinside:
MarioSide:
MarioCorner:
MarioFireBall:
MarioAbove:
MarioBodyinside:
RTL
