Prev: 6ED2 Up: Map Next: 6F31
6EF1: Update Robbie Carrying Can
Handles Robbie while he is carrying a spray can (Robbie state 02). The controls move Robbie and the can together, and the can is held out in front of him. Robbie can turn round, and he can fire a weapon when fire is pressed (see FireWeapon). If Robbie walks all the way into an empty cubby hole then he drops the can into it, and becomes Robbie empty-handed (see GamePlayEntry).
Input
IX Robbie object
Robbie_CarryingCan 6EF1 CALL StoreEntity Remember the position and state using StoreEntity.
6EF4 BIT 3,(IX+$04) Jump to Robbie_CarryingCan_Input unless Robbie has just picked up the can.
6EF8 JR Z,Robbie_CarryingCan_Input
6EFA RES 3,(IX+$04) Reset bit 3 of IX+04.
6EFE JR Robbie_CarryingCan_Fire Jump to Robbie_CarryingCan_Fire.
Robbie_CarryingCan_Input 6F00 CALL ReadInput Read the controls using ReadInput.
6F03 BIT 0,A Jump to Robbie_CarryingCan_Right if right is being pressed.
6F05 JR Z,Robbie_CarryingCan_Right
6F07 BIT 1,A Jump to Robbie_CarryingCan_Left if left is being pressed.
6F09 JR Z,Robbie_CarryingCan_Left
This entry point is used by the routines at Robbie_CarryingCan_Right and Robbie_CarryingCan_CubbyColumn.
Robbie_CarryingCan_Vertical 6F0B LD A,(IX+$01) A=the X position of Robbie.
6F0E BIT 0,(IX+$04) Jump to Robbie_CarryingCan_FacingRight if Robbie is facing right.
6F12 JR Z,Robbie_CarryingCan_FacingRight
6F14 CP $D8 Jump to Robbie_CarryingCan_Fire if Robbie is too far to the right to move vertically.
6F16 JR NC,Robbie_CarryingCan_Fire
6F18 CP $24 Jump to Robbie_CarryingCan_Fire if Robbie is too far to the left to move vertically.
6F1A JR C,Robbie_CarryingCan_Fire
This entry point is used by the routine at Robbie_CarryingCan_FacingRight.
Robbie_CarryingCan_VerticalInput 6F1C CALL ReadInput Read the controls using ReadInput.
6F1F BIT 3,A Jump to Robbie_CarryingCan_Up if up is being pressed.
6F21 JP Z,Robbie_CarryingCan_Up
6F24 BIT 2,A Jump to Robbie_CarryingCan_Down if down is being pressed.
6F26 JP Z,Robbie_CarryingCan_Down
Robbie_CarryingCan_Fire 6F29 CALL ReadInput Read the controls using ReadInput.
6F2C BIT 4,A Test bit 4 of A (fire).
6F2E CALL Z,FireWeapon Fire a weapon using FireWeapon if fire is being pressed.
Prev: 6ED2 Up: Map Next: 6F31