![]() |
Routines |
| Prev: 66A6 | Up: Map | Next: 670E |
|
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 | 66D7 | LD HL,$5E6C | HL=State_Robbie_Active (Robbie). | |
| 66DA | LD B,$10 | Set the object counter to 10. | ||
| 66DC | CALL SetObjectInactive | Set all of the objects inactive using SetObjectInactive. | ||
| 66DF | LD A,($5E04) | Jump to LevelComplete_Pause if the tunes are switched off (Sound_Enable is not zero). | ||
| 66E2 | AND A | |||
| 66E3 | JR NZ,LevelComplete_Pause | |||
| 66E5 | LD A,($5E37) | Jump to LevelComplete_Jingle if this is the first level (ActivePlayer_Level is zero). | ||
| 66E8 | AND A | |||
| 66E9 | JR Z,LevelComplete_Jingle | |||
| 66EB | AND $03 | Jump to LevelComplete_Jingle if the level is not a multiple of four. | ||
| 66ED | JR NZ,LevelComplete_Jingle | |||
| 66EF | LD DE,$641D | DE=Tune_Scale. | ||
| 66F2 | LD HL,$5E38 | HL=CurrentPlayer_Lives (the lives of the active player). | ||
| 66F5 | INC (HL) | Give the player an extra life. | ||
| LevelComplete_PlayTune | 66F6 | CALL PlayMusic | Play the tune using PlayMusic. | |
| LevelComplete_NextLevel | 66F9 | LD HL,$5E37 | HL=ActivePlayer_Level (the level of the active player). | |
| 66FC | INC (HL) | Increment the level by one. | ||
| 66FD | JP LevelNew | Jump to LevelNew. | ||
| LevelComplete_Jingle | 6700 | LD DE,$642D | DE=Tune_Jingle. | |
| 6703 | JR LevelComplete_PlayTune | Jump to LevelComplete_PlayTune. | ||
| LevelComplete_Pause | 6705 | DI | Disable interrupts. | |
| 6706 | LD B,$0A | Set the number of countdowns to 0A. | ||
| 6708 | CALL PauseForCount | Pause using PauseForCount. | ||
| 670B | EI | Enable interrupts. | ||
| 670C | JR LevelComplete_NextLevel | Jump to LevelComplete_NextLevel. | ||
| Prev: 66A6 | Up: Map | Next: 670E |