Prev: 39228 Up: Map Next: 39499
39458: Lose Game
Used by the routine at MainLoop.
Shows the message that is used when every sector has been destroyed, plays the defeat tune and then ends the game.
LoseGame 39458 LD A,71 Use bright white on black as the attribute.
39460 CALL ClearPlayWindowWithAttributes Clear the play window using ClearPlayWindowWithAttributes.
39463 LD DE,39718 Point DE' at the attributes of the four lines of text (see DefeatMessage_Attributes).
39466 EXX Switch to the shadow registers, as PrintTextList expects the attributes there.
39467 LD HL,39722 Point HL at DefeatMessage_Coordinates.
39470 LD DE,39730 Point DE at DefeatMessage_Text.
39473 LD B,4 There are four lines to print.
39475 CALL PrintTextList Print them using PrintTextList.
39478 LD DE,49897 Point DE at GameLostTune.
39481 CALL PlayMusic Play it using PlayMusic.
This entry point is used by the routine at EndRound.
This entry point waits for a while and then ends the game.
LoseGame_Wait 39484 LD HL,0 Set up a delay of 65536 iterations of the outer loop...
39487 LD B,0 ...using B as the second counter.
LoseGame_Delay 39489 DEC H Count down.
39490 LD A,L Loop back until the high byte has counted down to zero.
39491 OR H
39492 JR NZ,LoseGame_Delay
39494 DJNZ LoseGame_Delay Loop back until B has counted down to zero too.
39496 JP GameOver End the game using GameOver.
Prev: 39228 Up: Map Next: 39499