Prev: D826 Up: Map Next: D864
D82D: Handler: Kempston
Used by the routine at Handler_Player.
Reads Kempston and walks, climbs, jumps or fires.
Fetch the left/right Kempston masks.
Controls_Kempston D82D LD HL,($6486) Fetch the left mask into L and the right mask into H.
Walk left.
D830 CALL Read_Kempston Call Player_MoveLeft if left matches the stored mask.
D833 JR NZ,Controls_Kempston_Right
D835 CP L
D836 CALL Z,Player_MoveLeft
Walk right.
Controls_Kempston_Right D839 CALL Read_Kempston Call Player_MoveRight if right matches the stored mask.
D83C JR NZ,Controls_Kempston_Up
D83E CP H
D83F CALL Z,Player_MoveRight
Climb up, or start a jump.
Controls_Kempston_Up D842 CALL Read_Kempston Call Player_ClimbUp if up (bit 3) is pressed.
D845 JR NZ,Controls_Kempston_Down
D847 CP $08
D849 CALL Z,Player_ClimbUp
Climb down.
Controls_Kempston_Down D84C CALL Read_Kempston Call Player_ClimbDown if down (bit 2) is pressed.
D84F JR NZ,Controls_Kempston_Action
D851 CP $04
D853 CALL Z,Player_ClimbDown
Fire / use the furniture.
Controls_Kempston_Action D856 CALL Read_Kempston Call Player_Action if fire (bit 4) is pressed.
D859 JP NZ,Handler_Player_Resolve
D85C CP $10
D85E CALL Z,Player_Action
Resolve the player movement.
D861 JP Handler_Player_Resolve Jump to Handler_Player_Resolve.
Prev: D826 Up: Map Next: D864