Prev: 45524 Up: Map Next: 45598
45573: Switch Player
Used by the routine at HandlePlayerDeath.
Used when a player has died in a two player game. Swaps over the state of the two players, clears the screen and makes the new player stand up with the normal colour, then carries on at InitialiseGame_StartTurn.
SwitchPlayer 45573 CALL ChangePlayer Swap over the states of the two players.
45576 CALL ClearPlayArea_Attributes Clear the attribute buffer of the play area.
45579 CALL ClearPlayArea Clear the play area.
45582 LD A,(IX+0) Fetch the sprite ID of the player.
45585 AND %00000111 Keep only bits 0-2.
45587 OR %00010000 Set bit 4, giving a sprite ID of 16 to 23.
45589 LD (IX+0),A Set the new sprite ID of the player.
45592 LD (IX+5),71 Set the colour of the player to INK:WHITE, PAPER:BLACK (BRIGHT).
45596 JR InitialiseGame_StartTurn Jump to InitialiseGame_StartTurn to start the turn.
Prev: 45524 Up: Map Next: 45598