Prev: 35948 Up: Map Next: 36028
35953: Handler: Jetman
Handler for Jetman while he is walking on the ground. Counts down GameDelayTimer at the start of a turn, then draws the fuel gauge and reads the controls.
Input
IX Actor slot
Count down GameDelayTimer, or skip straight to play.
Handler_Jetman 35953 LD HL,24167 If GameDelayTimer is zero, jump to Handler_Jetman_Play.
35956 LD A,(HL)
35957 AND A
35958 JR Z,Handler_Jetman_Play
35960 DEC (HL) Decrement GameDelayTimer by one.
35961 JR NZ,HandlerScoreLabel Jump to HandlerScoreLabel if the delay timer is still active.
Play the pickup tone and unflash the score label.
35963 CALL SoundsPickupItem Call SoundsPickupItem.
35966 LD A,(24224) A=*ActivePlayer_Level.
35969 AND %00000001 Keep only bit 0.
35971 LD (24226),A Write the result to LevelParity.
Pick the score label of the active player to unflash.
35974 LD A,(24165) Jump to Handler_Jetman_Draw if Flag_ActivePlayer is not zero.
35977 AND A
35978 JR NZ,Handler_Jetman_Draw
35980 LD HL,24 HL=0024.
Handler_Jetman_AfterLevel 35983 CALL UnsetFlashText Call UnsetFlashText.
35986 JR Handler_Jetman_Play Jump to Handler_Jetman_Play.
Handler_Jetman_Draw 35988 LD HL,216 HL=0216.
35991 JR Handler_Jetman_AfterLevel Jump to Handler_Jetman_AfterLevel.
Draw the fuel gauge and read the controls.
Handler_Jetman_Play 35993 LD HL,4160 HL=4160.
35996 LD A,(24719) Fetch the high fuel byte from FuelLevel_2.
35999 CALL DrawGauge Call DrawGauge.
Read the controls and walk left or right, or take off if UP is pressed.
36002 CALL HandlerControls Call HandlerControls.
36005 BIT 1,A Jump to Handler_JetmanWalk_FaceLeft if LEFT is pressed.
36007 JP Z,Handler_JetmanWalk_FaceLeft
36010 BIT 0,A Jump to Handler_JetmanWalk_FaceRight if RIGHT is pressed.
36012 JP Z,Handler_JetmanWalk_FaceRight
36015 BIT 3,A Test whether UP is pressed.
36017 LD A,0 Clear the horizontal speed.
36019 LD (IX+5),A
36022 JP Z,LaunchJetman Jump to LaunchJetman if UP is pressed.
36025 JP Handler_JetmanWalk_Face Jump to Handler_JetmanWalk_Face.
Prev: 35948 Up: Map Next: 36028