![]() |
Routines |
| Prev: 8548 | Up: Map | Next: 85E7 |
|
Used by the routines at Select1Or2PlayerGame and Handler_SubGame.
|
||||
|
Switch the active player.
|
||||
| Toggle_Players | 85CE | LD HL,($EFF2) | Store *Pointer_ActivePlayer in HL for the comparison. | |
|
Start with comparing against 1UP.
|
||||
| 85D1 | LD DE,$8C28 | DE=1UP_Name. | ||
| 85D4 | AND A | If the currently active player is not 1UP then jump to Set_Active_Player (which will then set it to 1UP). | ||
| 85D5 | SBC HL,DE | |||
| 85D7 | JR NZ,Set_Active_Player | |||
|
Else, set the active player to 2UP.
|
||||
| 85D9 | LD DE,$8C38 | DE=2UP_Name. | ||
|
Sets the active player to *Pointer_ActivePlayer.
|
||||
| Set_Active_Player | 85DC | LD ($EFF2),DE | Write DE to *Pointer_ActivePlayer. | |
| 85E0 | LD HL,$000F | Move HL 000F bytes to point to the active player state. | ||
| 85E3 | ADD HL,DE | |||
| 85E4 | BIT 7,(HL) | Test bit 7 of *HL. | ||
| 85E6 | RET | Return. | ||
| Prev: 8548 | Up: Map | Next: 85E7 |