Prev: A54F Up: Map Next: A5BA
A5A9: Reverse X Velocity
Reverses the X velocity of an actor and flips bit 1 of its sprite ID, so that it faces the other way.
Input
IX Actor record
ReverseXVelocity A5A9 LD A,(IX+$06) Fetch the X velocity of the actor.
A5AC NEG Reverse the X velocity.
A5AE LD (IX+$06),A Set the new X velocity of the actor.
A5B1 LD A,(IX+$00) Fetch the sprite ID of the actor.
A5B4 XOR %00000010 Flip bit 1 (the direction the actor is facing).
A5B6 LD (IX+$00),A Set the new sprite ID of the actor.
A5B9 RET Return.
Prev: A54F Up: Map Next: A5BA