Prev: 43059 Up: Map Next: 43172
43153: 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 43153 PUSH BC Save BC.
43154 LD A,(IX+7) Fetch the time and direction of the enemy...
43157 LD C,A ...and keep them in C.
43158 ADD A,2 Add two to the direction...
43160 AND 3 ...and keep just the direction...
43162 LD B,A ...in B.
43163 LD A,C Fetch the time and direction again...
43164 AND 252 ...clear the old direction...
43166 OR B ...and use the new one.
43167 LD (IX+7),A Store them.
43170 POP BC Restore BC.
43171 RET Return.
Prev: 43059 Up: Map Next: 43172