Prev: C8AD Up: Map Next: C8F7
C8D2: Nudge the player towards the middle of an arch
Used by the routine at FIRST_PILLAR.
If the player's legs are within 15 of the arch's middle in U and V and 4 in Z, sets a nudge of one unit towards its middle line in +$0E (U) or +$0F (V), which CALC_PLYR_DUV adds to his step when he next walks: this is why he slides into line with an arch as he walks through. An arch in a wall of constant U (not mirrored) nudges along V; one in a wall of constant V along U.
The routine is picked from ROUTINES_BIT3_SET, through the jump at the end of CALC_PLYR_DUV, by the pillar's own facing. Knight Lore does the same for each of the player's records; here only the legs are nudged.
Input
IX The first pillar, holding the arch's middle at +$09 to +$0B
ARCH_NUDGE_TO_CENTRE C8D2 LD HL,$0F0F 15 either way in U and V
C8D5 LD IY,OBJECTS The player's legs, if there are any
C8D9 LD A,(IY+$00)
C8DC AND A
C8DD RET Z
C8DE BIT 3,(IY+$07) Not one that uses doorways
C8E2 RET Z
C8E3 CALL IS_NEAR_TO Not near
C8E6 RET NC
C8E7 LD BC,ROUTINES_BIT3_SET Graphic 8: the first table
C8EA BIT 3,(IX+$00)
C8EE JP NZ,DISPATCH_ON_FACING
C8F1 LD BC,ROUTINES_BIT3_CLEAR Graphic 6: the second
C8F4 JP DISPATCH_ON_FACING
Prev: C8AD Up: Map Next: C8F7