Prev: 7D8A Up: Map Next: 7DC3
7D9A: Start Game
Used by the routine at GameInitialisation.
Prepares a new game: the player data, the screen and side panel, the key pieces, the entity table and the doors. Then enters the starting room.
start-game
StartGame 7D9A CALL ResetPlayerData Call ResetPlayerData to reset the game data.
7D9D LD A,$03 Write 03 (the number of lives at the start of the game) to PlayerLives.
7D9F LD ($5E21),A
7DA2 LD HL,$EB58 Set the food pointer in FoodPointer to FoodItems.
7DA5 LD ($5E55),HL
7DA8 CALL ClearScreen Call ClearScreen to clear the screen.
7DAB CALL DrawSidePanel Call DrawSidePanel to draw the side panel.
7DAE CALL DisplayPlayerLives Call DisplayPlayerLives to display the lives.
7DB1 CALL PlaceKeyPieces Call PlaceKeyPieces to place the key pieces.
7DB4 CALL SetKeyPositions Call SetKeyPositions to set the positions of the keys.
7DB7 CALL ResetGameState Call ResetGameState to reset the game state.
7DBA CALL RandomiseDoors Call RandomiseDoors to randomise the doors.
7DBD CALL PreparePlayer Call PreparePlayer to prepare the player.
7DC0 JP EnterRoom Jump to EnterRoom to enter the room.
View the equivalent code in;
Prev: 7D8A Up: Map Next: 7DC3