Prev: 49232 Up: Map Next: 49282
49257: 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 49257 BIT 6,(IY+7) Jump to NudgePlayerNorthSouth_Done if the player is not flipped.
49261 JR Z,NudgePlayerNorthSouth_Done
49263 LD A,(IX+9) Fetch the x of the doorway middle.
49266 CP (IY+1) Jump to NudgePlayerNorthSouth_Done if the player is in the middle.
49269 JR Z,NudgePlayerNorthSouth_Done
Step toward the middle along x.
49271 LD A,1 Set A to 1.
49273 JR NC,NudgePlayerNorthSouth_Set Jump to NudgePlayerNorthSouth_Set if carry is not set.
49275 NEG Negate A.
NudgePlayerNorthSouth_Set 49277 LD (IY+14),A Set the x-speed adjustment of the player.
This entry point is used by the routine at NudgePlayerEastWest.
Finish the nudge.
NudgePlayerNorthSouth_Done 49280 POP BC Restore BC from the stack.
49281 RET Return.
Prev: 49232 Up: Map Next: 49282