Prev: 42319 Up: Map Next: 42426
42409: 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 42409 LD A,(IX+6) Fetch the X velocity of the actor.
42412 NEG Reverse the X velocity.
42414 LD (IX+6),A Set the new X velocity of the actor.
42417 LD A,(IX+0) Fetch the sprite ID of the actor.
42420 XOR %00000010 Flip bit 1 (the direction the actor is facing).
42422 LD (IX+0),A Set the new sprite ID of the actor.
42425 RET Return.
Prev: 42319 Up: Map Next: 42426