![]() |
Routines |
| Prev: DC26 | Up: Map | Next: DC53 |
|
Used by the routines at Handler_MovingObjects and Handler_Enemies.
Negates both deltas and flips facing when the horizontal delta is non-zero.
|
||||||||
|
Negate the vertical delta.
|
||||||||
| Reverse_Direction | DC37 | LD A,(IX+$09) | Fetch the vertical delta and decrease it by one. | |||||
| DC3A | DEC A | |||||||
| DC3B | XOR %11111111 | Invert every bit. | ||||||
| DC3D | LD (IX+$09),A | Write the negated vertical delta. | ||||||
|
Negate the horizontal delta.
|
||||||||
| DC40 | LD A,(IX+$08) | Fetch the horizontal delta and decrease it by one. | ||||||
| DC43 | DEC A | |||||||
| DC44 | XOR %11111111 | Invert every bit. | ||||||
| DC46 | LD (IX+$08),A | Write the negated horizontal delta. | ||||||
| DC49 | RET Z | Return if it is now zero. | ||||||
|
Flip the facing bit.
|
||||||||
| DC4A | LD A,$80 | Toggle bit 7 of *IX+07. | ||||||
| DC4C | XOR (IX+$07) | |||||||
| DC4F | LD (IX+$07),A | |||||||
| DC52 | RET | Return. | ||||||
| Prev: DC26 | Up: Map | Next: DC53 |