Prev: C048 Up: Map Next: C069
C050: Nudge Player East West
Sets the adjustment to the speed of the player along the y axis, to bring the player a step closer to the middle line of an arch that goes east and west. Nothing is done if the sprite of the player is flipped.
Input
IX The address of the arch object
IY The address of the player
Skip if flipped or already in the middle.
NudgePlayerEastWest C050 BIT 6,(IY+$07) Jump to NudgePlayerNorthSouth_Done if the player is flipped.
C054 JR NZ,NudgePlayerNorthSouth_Done
C056 LD A,(IX+$0A) Fetch the y of the doorway middle.
C059 CP (IY+$02) Jump to NudgePlayerNorthSouth_Done if the player is in the middle.
C05C JR Z,NudgePlayerNorthSouth_Done
Step toward the middle along y.
C05E LD A,$01 Set A to 01.
C060 JR NC,NudgePlayerEastWest_Set Jump to NudgePlayerEastWest_Set if carry is not set.
C062 NEG Negate A.
NudgePlayerEastWest_Set C064 LD (IY+$0F),A Set the y-speed adjustment of the player.
C067 JR NudgePlayerNorthSouth_Done Jump to NudgePlayerNorthSouth_Done.
View the equivalent code in;
Prev: C048 Up: Map Next: C069