![]() |
Routines |
| Prev: 36591 | Up: Map | Next: 36736 |
|
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 2 is set. The flags are set by ControlPlayer and cleared again by CheckRoomBounds and CheckObstacles if the move is possible.
|
||||||||||
| ApplyMovement | 36710 | BIT 4,(IX+2) | Jump to ApplyMovement_Y if the flag for the X axis (bit 4) is set. | |||||||
| 36714 | JR NZ,ApplyMovement_Y | |||||||||
| 36716 | LD A,E | Fetch the X move. | ||||||||
| 36717 | ADD A,(IX+3) | Add the X position of the entity. | ||||||||
| 36720 | LD (IX+3),A | Update the X position of the entity. | ||||||||
| ApplyMovement_Y | 36723 | BIT 5,(IX+2) | Return if the flag for the Y axis (bit 5) is set. | |||||||
| 36727 | RET NZ | |||||||||
| 36728 | LD A,D | Fetch the Y move. | ||||||||
| 36729 | ADD A,(IX+4) | Add the Y position of the entity. | ||||||||
| 36732 | LD (IX+4),A | Update the Y position of the entity. | ||||||||
| 36735 | RET | Return. | ||||||||
| Prev: 36591 | Up: Map | Next: 36736 |