Prev: 43423 Up: Map Next: 43503
43476: Switch Players
Used by the routines at GameEntryPoint and Handler_Fired.
Handler_SwitchPlayers 43476 LD A,(43914) A=*Game_Flags.
43479 XOR %00010000 Flip bit 4.
43481 LD (43914),A Write A to *Game_Flags.
Default to using 1UP.
43484 LD HL,43904 HL=1UP_Lives.
Who is in play, is it 1UP or 2UP?
43487 BIT 4,A Jump to Handler_SwitchPlayers_Write if this is player one.
43489 JR Z,Handler_SwitchPlayers_Write
Else, use 2UP.
43491 LD HL,43909 HL=2UP_Lives.
Handler_SwitchPlayers_Write 43494 LD (43902),HL Write HL to *ActivePlayer.
43497 RLCA Rotate A left (with carry).
43498 BIT 5,A Return if bit 5 of A is set.
43500 RET NZ
43501 RLCA Rotate A left (with carry).
43502 RET Return.
Prev: 43423 Up: Map Next: 43503