![]() |
Routines |
| Prev: B1B7 | Up: Map | Next: B205 |
|
Used by the routine at GameInitialisation.
Sets up the state of both players ready for a new game, builds the first room and starts the turn of player 1. A one player game gives player 2 no lives.
|
||||||||
|
Initialise player 2.
|
||||||||
| InitialiseGame | B1D4 | CALL InitialisePlayer | Initialise the player. | |||||
| B1D7 | CALL ChangePlayer | Swap over to the other player. | ||||||
|
Initialise player 1.
|
||||||||
| B1DA | CALL InitialisePlayer | Initialise the player. | ||||||
|
Always start on player 1.
|
||||||||
| B1DD | XOR A | Set the active player to 1UP in Flag_ActivePlayer. | ||||||
| B1DE | LD ($969E),A | |||||||
| B1E1 | CALL ClearPlayArea_Attributes | Clear the attribute buffer of the play area. | ||||||
| B1E4 | CALL ClearPlayArea | Clear the play area. | ||||||
| B1E7 | LD A,($9692) | Fetch the game options from GameOptions. | ||||||
| B1EA | AND %00000001 | Keep only bit 0. | ||||||
| B1EC | JR NZ,InitialiseGame_StartTurn | Jump to InitialiseGame_StartTurn if this is a two player game. | ||||||
| B1EE | LD ($96E0),A | Set the number of lives of player 2 in InactivePlayer_Lives to zero. | ||||||
|
This entry point is used by the routine at SwitchPlayer.
This is also where the next player joins in after the other player has died.
|
||||||||
| InitialiseGame_StartTurn | B1F1 | CALL StartTurn | Start the turn. | |||||
| B1F4 | LD IX,$9702 | Point IX at the player's actor at ImmortalData. | ||||||
| B1F8 | CALL VisitRoom | Mark the room as visited. | ||||||
| B1FB | CALL LoadOrchid | Load the orchid for the room. | ||||||
| B1FE | CALL SetUpRoomObjects | Set up the objects in the room. | ||||||
| B201 | CALL DrawCurrentRoom | Draw the current room. | ||||||
| B204 | RET | Return. | ||||||
| Prev: B1B7 | Up: Map | Next: B205 |