![]() |
Routines |
| Prev: 8C6C | Up: Map | Next: 8CBC |
|
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.
|
||||||||
|
Count down GameDelayTimer, or skip straight to play.
|
||||||||
| Handler_Jetman | 8C71 | LD HL,$5E67 | If GameDelayTimer is zero, jump to Handler_Jetman_Play. | |||||
| 8C74 | LD A,(HL) | |||||||
| 8C75 | AND A | |||||||
| 8C76 | JR Z,Handler_Jetman_Play | |||||||
| 8C78 | DEC (HL) | Decrement GameDelayTimer by one. | ||||||
| 8C79 | JR NZ,HandlerScoreLabel | Jump to HandlerScoreLabel if the delay timer is still active. | ||||||
|
Play the pickup tone and unflash the score label.
|
||||||||
| 8C7B | CALL SoundsPickupItem | Call SoundsPickupItem. | ||||||
| 8C7E | LD A,($5EA0) | A=*ActivePlayer_Level. | ||||||
| 8C81 | AND %00000001 | Keep only bit 0. | ||||||
| 8C83 | LD ($5EA2),A | Write the result to LevelParity. | ||||||
|
Pick the score label of the active player to unflash.
|
||||||||
| 8C86 | LD A,($5E65) | Jump to Handler_Jetman_Draw if Flag_ActivePlayer is not zero. | ||||||
| 8C89 | AND A | |||||||
| 8C8A | JR NZ,Handler_Jetman_Draw | |||||||
| 8C8C | LD HL,$0018 | HL=0018. | ||||||
| Handler_Jetman_AfterLevel | 8C8F | CALL UnsetFlashText | Call UnsetFlashText. | |||||
| 8C92 | JR Handler_Jetman_Play | Jump to Handler_Jetman_Play. | ||||||
| Handler_Jetman_Draw | 8C94 | LD HL,$00D8 | HL=00D8. | |||||
| 8C97 | JR Handler_Jetman_AfterLevel | Jump to Handler_Jetman_AfterLevel. | ||||||
|
Draw the fuel gauge and read the controls.
|
||||||||
| Handler_Jetman_Play | 8C99 | LD HL,$1040 | HL=1040. | |||||
| 8C9C | LD A,($608F) | Fetch the high fuel byte from FuelLevel_2. | ||||||
| 8C9F | CALL DrawGauge | Call DrawGauge. | ||||||
|
Read the controls and walk left or right, or take off if UP is pressed.
|
||||||||
| 8CA2 | CALL HandlerControls | Call HandlerControls. | ||||||
| 8CA5 | BIT 1,A | Jump to Handler_JetmanWalk_FaceLeft if LEFT is pressed. | ||||||
| 8CA7 | JP Z,Handler_JetmanWalk_FaceLeft | |||||||
| 8CAA | BIT 0,A | Jump to Handler_JetmanWalk_FaceRight if RIGHT is pressed. | ||||||
| 8CAC | JP Z,Handler_JetmanWalk_FaceRight | |||||||
| 8CAF | BIT 3,A | Test whether UP is pressed. | ||||||
| 8CB1 | LD A,$00 | Clear the horizontal speed. | ||||||
| 8CB3 | LD (IX+$05),A | |||||||
| 8CB6 | JP Z,LaunchJetman | Jump to LaunchJetman if UP is pressed. | ||||||
| 8CB9 | JP Handler_JetmanWalk_Face | Jump to Handler_JetmanWalk_Face. | ||||||
| Prev: 8C6C | Up: Map | Next: 8CBC |