Prev: A833 Up: Map Next: A8A4
A891: Reverse Direction
Used by the routines at MoveThief, MoveHunter and MoveDome.
Turns an enemy round, so that it faces the opposite direction.
Input
IX Entity
ReverseDirection A891 PUSH BC Save BC.
A892 LD A,(IX+$07) Fetch the time and direction of the enemy...
A895 LD C,A ...and keep them in C.
A896 ADD A,$02 Add two to the direction...
A898 AND $03 ...and keep just the direction...
A89A LD B,A ...in B.
A89B LD A,C Fetch the time and direction again...
A89C AND $FC ...clear the old direction...
A89E OR B ...and use the new one.
A89F LD (IX+$07),A Store them.
A8A2 POP BC Restore BC.
A8A3 RET Return.
Prev: A833 Up: Map Next: A8A4