Prev: AA97 Up: Map Next: AAED
AAD3: Turn Robot Left
Used by the routine at MoveRobot.
Turns the robot a quarter of a turn, so that its direction goes down by one. The robot is moved to the start of the cell, and it gets one of the types for turning (20 to 2F).
Input
A Controls
IX Robot
TurnRobotLeft AAD3 RES 1,A Clear the bit of the controls for turning left...
AAD5 LD ($9625),A ...and store them.
AAD8 LD A,(IX+$00) Fetch the type of the robot.
AADB SUB $04 Go back by one direction...
AADD AND $0D
AADF OR $20 ...keep the bits that are used for the sprite and mark it as turning.
This entry point is used by the routine at TurnRobotRight.
TurnRobot_Store AAE1 LD (IX+$00),A Store the type of the robot.
AAE4 LD (IX+$01),$00 Move the robot to the start of the cell in the X direction...
AAE8 LD (IX+$03),$00 ...and in the Y direction.
AAEC RET Return.
Prev: AA97 Up: Map Next: AAED