![]() |
Routines |
| Prev: 8EEF | Up: Map | Next: 8F80 |
|
Used by the routine at ControlPlayer.
Moves an entity by whole pixels on each axis, unless the flag for the axis in bits 4-5 of offset 02 is set. The flags are set by ControlPlayer and cleared again by CheckRoomBounds and CheckObstacles if the move is possible.
|
||||||||||
| ApplyMovement | 8F66 | BIT 4,(IX+$02) | Jump to ApplyMovement_Y if the flag for the X axis (bit 4) is set. | |||||||
| 8F6A | JR NZ,ApplyMovement_Y | |||||||||
| 8F6C | LD A,E | Fetch the X move. | ||||||||
| 8F6D | ADD A,(IX+$03) | Add the X position of the entity. | ||||||||
| 8F70 | LD (IX+$03),A | Update the X position of the entity. | ||||||||
| ApplyMovement_Y | 8F73 | BIT 5,(IX+$02) | Return if the flag for the Y axis (bit 5) is set. | |||||||
| 8F77 | RET NZ | |||||||||
| 8F78 | LD A,D | Fetch the Y move. | ||||||||
| 8F79 | ADD A,(IX+$04) | Add the Y position of the entity. | ||||||||
| 8F7C | LD (IX+$04),A | Update the Y position of the entity. | ||||||||
| 8F7F | RET | Return. | ||||||||
| Prev: 8EEF | Up: Map | Next: 8F80 |