Prev: 6F41 Up: Map Next: 6FAA
6F77: Move Robbie Left
Used by the routine at Robbie_CarryingCan.
Left is being pressed while Robbie is carrying a can. If he is facing right then he turns round, otherwise he moves two pixels to the left. The can moves with him.
Input
IX Robbie object
Robbie_CarryingCan_Left 6F77 BIT 0,(IX+$04) Jump to Robbie_CarryingCan_MoveLeft if Robbie is facing left.
6F7B JR NZ,Robbie_CarryingCan_MoveLeft
6F7D LD A,(IX+$01) A=the X position of Robbie.
6F80 ADD A,$0C Add 0C.
6F82 LD (IX+$01),A Write the new X position.
6F85 LD A,(IX+$09) A=the X position of the spray can.
6F88 SUB $10 Subtract 10.
6F8A LD (IX+$0D),A Write it to the new X position of the spray can.
6F8D SET 0,(IX+$04) Set bit 0 of IX+04 (Robbie faces left).
6F91 RES 2,(IX+$04) Reset bit 2 of IX+04.
6F95 JR Robbie_CarryingCan_StoreCanX Jump to Robbie_CarryingCan_StoreCanX.
Robbie_CarryingCan_MoveLeft 6F97 LD A,(IX+$01) A=the X position of Robbie.
6F9A SUB $02 Subtract 02.
6F9C CP $24 Jump to Robbie_CarryingCan_CubbyColumn if Robbie has reached the cubby hole column.
6F9E JR C,Robbie_CarryingCan_CubbyColumn
6FA0 LD (IX+$01),A Write the new X position.
6FA3 LD A,(IX+$09) A=the X position of the spray can.
6FA6 SUB $02 Subtract 02.
6FA8 JR Robbie_CarryingCan_StoreCanX Jump to Robbie_CarryingCan_StoreCanX.
Prev: 6F41 Up: Map Next: 6FAA