Prev: 28370 Up: Map Next: 28465
28401: Update Robbie Carrying Can
Handles Robbie while he is carrying a spray can (Robbie state 2). 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 28401 CALL StoreEntity Remember the position and state using StoreEntity.
28404 BIT 3,(IX+4) Jump to Robbie_CarryingCan_Input unless Robbie has just picked up the can.
28408 JR Z,Robbie_CarryingCan_Input
28410 RES 3,(IX+4) Reset bit 3 of IX+4.
28414 JR Robbie_CarryingCan_Fire Jump to Robbie_CarryingCan_Fire.
Robbie_CarryingCan_Input 28416 CALL ReadInput Read the controls using ReadInput.
28419 BIT 0,A Jump to Robbie_CarryingCan_Right if right is being pressed.
28421 JR Z,Robbie_CarryingCan_Right
28423 BIT 1,A Jump to Robbie_CarryingCan_Left if left is being pressed.
28425 JR Z,Robbie_CarryingCan_Left
This entry point is used by the routines at Robbie_CarryingCan_Right and Robbie_CarryingCan_CubbyColumn.
Robbie_CarryingCan_Vertical 28427 LD A,(IX+1) A=the X position of Robbie.
28430 BIT 0,(IX+4) Jump to Robbie_CarryingCan_FacingRight if Robbie is facing right.
28434 JR Z,Robbie_CarryingCan_FacingRight
28436 CP 216 Jump to Robbie_CarryingCan_Fire if Robbie is too far to the right to move vertically.
28438 JR NC,Robbie_CarryingCan_Fire
28440 CP 36 Jump to Robbie_CarryingCan_Fire if Robbie is too far to the left to move vertically.
28442 JR C,Robbie_CarryingCan_Fire
This entry point is used by the routine at Robbie_CarryingCan_FacingRight.
Robbie_CarryingCan_VerticalInput 28444 CALL ReadInput Read the controls using ReadInput.
28447 BIT 3,A Jump to Robbie_CarryingCan_Up if up is being pressed.
28449 JP Z,Robbie_CarryingCan_Up
28452 BIT 2,A Jump to Robbie_CarryingCan_Down if down is being pressed.
28454 JP Z,Robbie_CarryingCan_Down
Robbie_CarryingCan_Fire 28457 CALL ReadInput Read the controls using ReadInput.
28460 BIT 4,A Test bit 4 of A (fire).
28462 CALL Z,FireWeapon Fire a weapon using FireWeapon if fire is being pressed.
Prev: 28370 Up: Map Next: 28465