Prev: 24403 Up: Map Next: 24480
24448: Initialise New Level
Used by the routines at StartGame and LevelComplete.
Starts a new level for the active player: refills the cubby holes, resets the flower and leaves, sets up the player and then draws the game window ready for the level to start.
new-level
Give the player a life, as PlayerInit is about to "spend" one.
LevelNew 24448 LD HL,24120 Increment CurrentPlayer_Lives by one.
24451 INC (HL)
Reset the cubby holes, the flower and the leaves, then set up the player.
24452 CALL ResetCubbyHoles Call ResetCubbyHoles.
24455 CALL ResetFlowerLeaf Call ResetFlowerLeaf.
24458 CALL PlayerInit Call PlayerInit.
This entry point is used by the routine at PlayerTurnEnds.
Draw the game window; this entry point is also used to continue the game after a turn.
LevelInit 24461 CALL CreateWindow Create the game window using CreateWindow.
24464 CALL DrawPlayArea Draw the play area using DrawPlayArea.
24467 CALL DrawCubbyHoleItems Draw the cubby hole items using DrawCubbyHoleItems.
24470 CALL DisplayPlayerLives Display the lives using DisplayPlayerLives.
24473 LD A,(23672) Write FRAMES to LastFrame.
24476 LD (24095),A
24479 RET Return.
View the equivalent code in;
Prev: 24403 Up: Map Next: 24480