Prev: C050 Up: Map Next: C082
C069: Nudge Player North South
Sets the adjustment to the speed of the player along the x axis, to bring the player a step closer to the middle line of an arch that goes north and south. Nothing is done unless the sprite of the player is flipped.
Input
IX The address of the arch object
IY The address of the player
Skip if not flipped or already in the middle.
NudgePlayerNorthSouth C069 BIT 6,(IY+$07) Jump to NudgePlayerNorthSouth_Done if the player is not flipped.
C06D JR Z,NudgePlayerNorthSouth_Done
C06F LD A,(IX+$09) Fetch the x of the doorway middle.
C072 CP (IY+$01) Jump to NudgePlayerNorthSouth_Done if the player is in the middle.
C075 JR Z,NudgePlayerNorthSouth_Done
Step toward the middle along x.
C077 LD A,$01 Set A to 01.
C079 JR NC,NudgePlayerNorthSouth_Set Jump to NudgePlayerNorthSouth_Set if carry is not set.
C07B NEG Negate A.
NudgePlayerNorthSouth_Set C07D LD (IY+$0E),A Set the x-speed adjustment of the player.
This entry point is used by the routine at NudgePlayerEastWest.
Finish the nudge.
NudgePlayerNorthSouth_Done C080 POP BC Restore BC from the stack.
C081 RET Return.
Prev: C050 Up: Map Next: C082