Prev: C76C Up: Map Next: C791
C785: Nudge the player towards the middle of an arch
Used by the routine at arch_check_doorway.
For each of records 0 to 3 with bit 3 of +$07 set -- only the player's two records have it -- within 15 of the arch's middle along both x and y and within 4 of its z, set a nudge of one unit towards the centre line. The nudge goes in +$0E (x) or +$0F (y), which the player's movement adds to its velocity (calc_plyr_dXY) when it next walks. This is why the knight slides into line with an arch as he walks through.
Input
IX the pillar's record, holding the arch's middle at +$09 to +$0B
arch_nudge_to_centre C785 LD HL,$0F0F 15 either way along x and y
C788 LD IY,$5C08 records 0 to 3
C78C LD DE,$0020
C78F LD B,$04
Prev: C76C Up: Map Next: C791