![]() |
Routines |
| Prev: 8C71 | Up: Map | Next: 8D06 |
|
Jetman is walking on the ground. Keep him walking while there is ground beneath him, or launch him if UP is pressed or the ground ends.
|
||||||||
|
Set the vertical thrust first. F0 is a signed -10 upward thrust.
|
||||||||
| Handler_JetmanWalk | 8CBC | LD (IX+$06),$F0 | Write F0 to *IX+06. | |||||
| 8CC0 | CALL HandlerControls | Call HandlerControls. | ||||||
| 8CC3 | BIT 3,A | Jump to LaunchJetman if UP is pressed. | ||||||
| 8CC5 | JP Z,LaunchJetman | |||||||
|
Keep walking if there is ground under Jetman, otherwise launch.
|
||||||||
| 8CC8 | CALL ReadTerrainCell | Call ReadTerrainCell. | ||||||
| 8CCB | LD A,D | Jump to LaunchJetman if there is no terrain under Jetman. | ||||||
| 8CCC | AND A | |||||||
| 8CCD | JP Z,LaunchJetman | |||||||
| 8CD0 | LD A,E | Jump to LaunchJetman if the cell beside Jetman is empty. | ||||||
| 8CD1 | AND A | |||||||
| 8CD2 | JP Z,LaunchJetman | |||||||
| 8CD5 | LD A,E | Jump to LaunchJetman if bit 3 of the second terrain byte is set (a crater tile). | ||||||
| 8CD6 | OR E | |||||||
| 8CD7 | BIT 3,A | |||||||
| 8CD9 | JP NZ,LaunchJetman | |||||||
| 8CDC | JP Handler_JetmanMovement_Animate | Jump to Handler_JetmanMovement_Animate to move and animate Jetman. | ||||||
|
This entry point is used by the routine at Handler_Jetman.
|
||||||||
| Handler_JetmanWalk_Face | 8CDF | JP Handler_JetmanMovement_Draw | Jump to Handler_JetmanMovement_Draw. | |||||
|
This entry point is used by the routine at Handler_Jetman.
Face Jetman left and keep walking. F0 is a signed -10 leftward speed.
|
||||||||
| Handler_JetmanWalk_FaceLeft | 8CE2 | LD A,$F0 | Write F0 to *IX+05. | |||||
| 8CE4 | LD (IX+$05),A | |||||||
|
Bit 2 of the 0-based sprite index is the facing: reset means left and set means right.
|
||||||||
| 8CE7 | LD A,(IX+$00) | A=*IX+00. | ||||||
| 8CEA | DEC A | Decrease it to a 0-based sprite index. | ||||||
| 8CEB | RES 2,A | Reset the facing bit. | ||||||
| 8CED | INC A | Restore the 1-based sprite ID. | ||||||
| 8CEE | LD (IX+$00),A | Write A back to *IX+00. | ||||||
| 8CF1 | JP Handler_JetmanWalk | Jump to Handler_JetmanWalk. | ||||||
|
This entry point is used by the routine at Handler_Jetman.
Face Jetman right and keep walking. 10 is a signed +10 rightward speed.
|
||||||||
| Handler_JetmanWalk_FaceRight | 8CF4 | LD A,$10 | Write 10 to *IX+05. | |||||
| 8CF6 | LD (IX+$05),A | |||||||
|
Same 0-based facing bit as 8CE7, but set it for right.
|
||||||||
| 8CF9 | LD A,(IX+$00) | A=*IX+00. | ||||||
| 8CFC | DEC A | Decrease it to a 0-based sprite index. | ||||||
| 8CFD | SET 2,A | Set the facing bit. | ||||||
| 8CFF | INC A | Restore the 1-based sprite ID. | ||||||
| 8D00 | LD (IX+$00),A | Write A back to *IX+00. | ||||||
| 8D03 | JP Handler_JetmanWalk | Jump to Handler_JetmanWalk. | ||||||
| Prev: 8C71 | Up: Map | Next: 8D06 |