![]() |
Routines |
| Prev: CF7E | Up: Map | Next: CFA7 |
|
Used by the routine at MoveEntity.
Limits the displacement of the player to less than 09C0 if the player is in a certain range of positions. Purpose not yet known.
|
||||||||||||||
| LimitDisplacement | CF95 | LD A,(IX+$0E) | Fetch the column. | |||||||||||
| CF98 | CP $84 | Jump to CF9F if it is 84 or more. | ||||||||||||
| CF9A | JR NC,LimitDisplacement_Skip | |||||||||||||
| CF9C | CP $25 | Compare A with 25. | ||||||||||||
| CF9E | RET NC | Return if the carry flag is reset. | ||||||||||||
| LimitDisplacement_Skip | CF9F | LD DE,$09C0 | DE is 09C0. | |||||||||||
| CFA2 | SBC HL,DE | Subtract DE from HL. (with the carry) | ||||||||||||
| CFA4 | RET NC | Return if the carry flag is reset. | ||||||||||||
| CFA5 | ADD HL,DE | HL takes DE. | ||||||||||||
| CFA6 | RET | Return. | ||||||||||||
| Prev: CF7E | Up: Map | Next: CFA7 |