![]() |
Routines |
| Prev: 43354 | Up: Map | Next: 43441 |
|
The update routine for the bottom half of the robot in the game completed scene (object 92). The counter in IX+17 waits for 64 passes, then the robot goes down three pixels a pass into the pot of oil at row 40. After 128 it comes back up, bright white. At row 128 the end tune is played and a new game is started.
|
||||||||
|
Wait, go down, or come back up.
|
||||||||
| HandleEndingRobotBottom | 43377 | LD A,(IX+17) | Fetch the counter. | |||||
| 43380 | CP 64 | Jump to HandleEndingRobotBottom_CountPass if it is less than 64. | ||||||
| 43382 | JR C,HandleEndingRobotBottom_CountPass | |||||||
| 43384 | CP 128 | Jump to HandleEndingRobotBottom_ComingUp if it is 128 or more. | ||||||
| 43386 | JR NC,HandleEndingRobotBottom_ComingUp | |||||||
|
The robot is going down into the pot of oil.
|
||||||||
| 43388 | LD A,(IX+27) | Fetch the pixel y position. | ||||||
| 43391 | CP 40 | Jump to HandleEndingRobotBottom_CountPass if it has reached row 40. | ||||||
| 43393 | JR C,HandleEndingRobotBottom_CountPass | |||||||
| 43395 | SUB 3 | Take 3 off it. | ||||||
| 43397 | LD (IX+27),A | Store the pixel y position. | ||||||
|
Play a sound and redraw the robot.
|
||||||||
| HandleEndingRobotBottom_SoundAndRedraw | 43400 | CALL PlaySoundFromHeight_PlaySoundFromValue | Call PlaySoundFromHeight_PlaySoundFromValue. | |||||
| 43403 | CALL SetWipeAndDrawFlags | Call SetWipeAndDrawFlags. | ||||||
| HandleEndingRobotBottom_ColourCells | 43406 | JP ColourCells | Jump to ColourCells. | |||||
|
Count another pass.
|
||||||||
| HandleEndingRobotBottom_CountPass | 43409 | INC (IX+17) | Increment the counter. | |||||
| 43412 | JR HandleEndingRobotBottom_ColourCells | Jump to HandleEndingRobotBottom_ColourCells. | ||||||
|
The robot is coming back up.
|
||||||||
| HandleEndingRobotBottom_ComingUp | 43414 | LD A,(IX+27) | Fetch the pixel y position. | |||||
| 43417 | CP 128 | Jump to HandleEndingRobotBottom_Landed if it has reached row 128. | ||||||
| 43419 | JR NC,HandleEndingRobotBottom_Landed | |||||||
| 43421 | ADD A,3 | Add 3. | ||||||
| 43423 | LD (IX+27),A | Store the pixel y position. | ||||||
| 43426 | LD (IX+16),71 | Set the colour to bright white. | ||||||
| 43430 | JR HandleEndingRobotBottom_SoundAndRedraw | Jump to HandleEndingRobotBottom_SoundAndRedraw. | ||||||
|
The robot has come out of the oil.
|
||||||||
| HandleEndingRobotBottom_Landed | 43432 | LD DE,46039 | Point DE at RobotTune. | |||||
| 43435 | CALL PlayMusic | Call PlayMusic. | ||||||
| 43438 | JP RestartGame | Jump to RestartGame. | ||||||
| Prev: 43354 | Up: Map | Next: 43441 |