Prev: DE0D Up: Map Next: DE6A
DE59: Trim a record's step at the town's walls
Clears the wall flag (bit 0 of +7) and jumps to MOVE_TABLE's routine for the facing, which trims the step so that the record stops against a wall instead of in it, and sets the flag if it had to. From offset 4 (MOVE_CLIPPED_AGAIN) the flag is left as it is, for a second move in the same turn. The step is only trimmed here: APPLY_STEP makes the move.
Input
IX The record
MOVE_CLIPPED DE59 RES 0,(IX+$07) No wall met yet
This entry point is used by the routines at ANTIBODY_FLIGHT, OBJECT_FLIGHT and MOVE_SPLIT.
MOVE_CLIPPED_AGAIN DE5D LD A,(IX+$06) By the facing
DE60 RLCA
DE61 RLCA
DE62 AND $03
DE64 LD BC,MOVE_TABLE
DE67 JP DISPATCH
Prev: DE0D Up: Map Next: DE6A