![]() |
Routines |
| Prev: 26278 | Up: Map | Next: 26382 |
|
Used by the routine at UpdateBloomingFlower.
Clears all of the objects from the play area, plays a tune (unless the tunes are switched off, when there is a pause instead) and then starts the next level using LevelNew.
Every fourth level (the fifth, the ninth and so on) earns an extra life and the longer tune at Tune_Scale, and the other levels just play the jingle at Tune_Jingle.
|
||||
| LevelComplete | 26327 | LD HL,24172 | HL=State_Robbie_Active (Robbie). | |
| 26330 | LD B,16 | Set the object counter to 16. | ||
| 26332 | CALL SetObjectInactive | Set all of the objects inactive using SetObjectInactive. | ||
| 26335 | LD A,(24068) | Jump to LevelComplete_Pause if the tunes are switched off (Sound_Enable is not zero). | ||
| 26338 | AND A | |||
| 26339 | JR NZ,LevelComplete_Pause | |||
| 26341 | LD A,(24119) | Jump to LevelComplete_Jingle if this is the first level (ActivePlayer_Level is zero). | ||
| 26344 | AND A | |||
| 26345 | JR Z,LevelComplete_Jingle | |||
| 26347 | AND 3 | Jump to LevelComplete_Jingle if the level is not a multiple of four. | ||
| 26349 | JR NZ,LevelComplete_Jingle | |||
| 26351 | LD DE,25629 | DE=Tune_Scale. | ||
| 26354 | LD HL,24120 | HL=CurrentPlayer_Lives (the lives of the active player). | ||
| 26357 | INC (HL) | Give the player an extra life. | ||
| LevelComplete_PlayTune | 26358 | CALL PlayMusic | Play the tune using PlayMusic. | |
| LevelComplete_NextLevel | 26361 | LD HL,24119 | HL=ActivePlayer_Level (the level of the active player). | |
| 26364 | INC (HL) | Increment the level by one. | ||
| 26365 | JP LevelNew | Jump to LevelNew. | ||
| LevelComplete_Jingle | 26368 | LD DE,25645 | DE=Tune_Jingle. | |
| 26371 | JR LevelComplete_PlayTune | Jump to LevelComplete_PlayTune. | ||
| LevelComplete_Pause | 26373 | DI | Disable interrupts. | |
| 26374 | LD B,10 | Set the number of countdowns to 10. | ||
| 26376 | CALL PauseForCount | Pause using PauseForCount. | ||
| 26379 | EI | Enable interrupts. | ||
| 26380 | JR LevelComplete_NextLevel | Jump to LevelComplete_NextLevel. | ||
| Prev: 26278 | Up: Map | Next: 26382 |