Prev: BFEA Up: Map Next: C048
C02C: Nudge Player To Arch
Used by the routine at HandleNearArch.
Nudges the player towards the middle of the doorway of an arch, if close to it, by jumping to the routine for the direction of the arch (see ArchDirectionTable).
Input
IX The address of the arch object
Test that the player is flagged to be adjusted and is near the doorway.
NudgePlayerToArch C02C LD HL,$0F0F Set HL to 0F0F.
C02F LD IY,$5B88 Point IY at PlayerBottomObject.
C033 LD A,(IY+$00) Fetch the sprite number of the player.
C036 AND A Return if the slot is not used.
C037 RET Z
C038 BIT 3,(IY+$07) Return if the player is not flagged to be adjusted near arches.
C03C RET Z
C03D CALL TestNearTo Call TestNearTo.
C040 RET NC Return if the player is not near.
Jump by the direction of the arch.
C041 PUSH BC Stash BC on the stack.
C042 LD BC,$C048 Point BC at ArchDirectionTable.
C045 JP SetPlayerSpeed_Direction Jump to SetPlayerSpeed_Direction.
View the equivalent code in;
Prev: BFEA Up: Map Next: C048