Skip to navigation

Main game loop: PlayGame

Name: PlayGame [Show more] Type: Subroutine Category: Main game loop Summary: Start playing the generated landscape
Context: See this subroutine in context in the source code References: This subroutine is called as follows: * CheckSecretCode (Part 2 of 2) calls PlayGame
.PlayGame LDA #&83 \ Set the palette to the first set of colours from the JSR SetColourPalette \ colourPalettes table, which the SpawnEnemies routine \ set to the correct palette for playing the game (so \ for landscape 0000 that would be blue, black, white \ and green, for example) \ \ So this displays the landscape preview screen that we \ drew in PreviewLandscape with an all-blue palette \ before jumping here JSR ReadKeyboard \ Enable the keyboard, flush the keyboard buffer and \ read a character from it (so this waits for a key \ press before starting the game, following the "PRESS \ ANY KEY" message on the landscape preview screen) LSR gameInProgress \ Clear bit 7 of gameInProgress to indicate that a game \ now in progress and we are no longer in the title and \ preview screens (so the interrupt handler can now \ update the game)