Prev: EBD8 Up: Map Next: ED7D
ED35: Player Controls
Used by the routine at InitialiseGame.
PlayerControls ED35 CALL $028E Call KEY_SCAN.
ED38 LD A,($5BF0) Jump to Check_PlayerControls if *GameState is not set to "Demo Mode" (03).
ED3B CP $03
ED3D JR NZ,Check_PlayerControls
ED3F LD A,E A=the keypress.
ED40 CP $FF Return if no keys have been pressed.
ED42 RET Z
ED43 JP $ED8F Jump to ED8F.
All player controls directly alter the user-defined keys except for (obviously) the Kempston joystick.
Check_PlayerControls ED46 LD IX,$F231 IX=TablePlayerAttributes.
ED4A LD A,E A=the keypress.
Check against UserDefinedKeys_Left.
ED4B LD HL,$5BEB Check the first user-defined key at UserDefinedKeys_Left.
ED4E CP (HL) Jump to PlayerMoveLeft if "left" has been pressed.
ED4F JP Z,PlayerMoveLeft
Check against UserDefinedKeys_Right.
ED52 INC HL Check the next user-defined key.
ED53 CP (HL) Jump to PlayerMoveRight if "right" has been pressed.
ED54 JP Z,PlayerMoveRight
Check against UserDefinedKeys_Up.
ED57 INC HL Check the next user-defined key.
ED58 CP (HL) Jump to Handler_LaddersAscending if "up" has been pressed.
ED59 JP Z,Handler_LaddersAscending
Check against UserDefinedKeys_Down.
ED5C INC HL Check the next user-defined key.
ED5D CP (HL) Jump to Handler_LaddersDescending if "down" has been pressed.
ED5E JP Z,Handler_LaddersDescending
Check against UserDefinedKeys_Fire.
ED61 INC HL Check the next user-defined key.
ED62 CP (HL) Jump to Handler_Doors if "fire" has been pressed.
ED63 JP Z,Handler_Doors
Toggle the music on/ off - I wish I knew this in 1984!
ED66 CP $10 Jump to InGame_ToggleMusic if A is equal to 10.
ED68 JP Z,InGame_ToggleMusic
Was the game paused?
ED6B CP $22 Return if A is not equal to 22.
ED6D RET NZ
Handle the game being paused.
ED6E DI Disable interrupts.
InGamePauseLoop ED6F CALL InGamePause Call InGamePause.
ED72 CALL $028E Call KEY_SCAN.
ED75 LD A,E Jump to InGamePauseLoop if no keys have been pressed.
ED76 CP $FF
ED78 JP Z,InGamePauseLoop
ED7B EI Re-enable interrupts.
ED7C RET Return.
Prev: EBD8 Up: Map Next: ED7D