![]() |
Routines |
| Prev: A880 | Up: Map | Next: A8E3 |
|
Spend a life for the active player. In a 2UP game, swap to the other player when they still have lives left.
|
||||
|
1UP path.
|
||||
| LoseLife | A8B5 | LD A,($5E00) | A=*GameOptions. | |
| A8B8 | AND %00000001 | Keep only bit 0. | ||
| A8BA | JR NZ,LoseLife_2UP | Jump to LoseLife_2UP if this is a 2UP game. | ||
| LoseLife_Loop | A8BC | LD A,($5EA1) | Jump to GameOver_Check_Player_2UP if ActivePlayer_Lives is zero. | |
| A8BF | AND A | |||
| A8C0 | JR Z,GameOver_Check_Player_2UP | |||
| A8C2 | JP LevelInitialisation | Jump to LevelInitialisation. | ||
|
2UP path.
|
||||
| LoseLife_2UP | A8C5 | LD A,($5EA5) | Jump to LoseLife_Loop if InactivePlayer_Lives is zero. | |
| A8C8 | AND A | |||
| A8C9 | JR Z,LoseLife_Loop | |||
| A8CB | LD A,($5EA1) | Call GameOver_Check_Player_1UP if ActivePlayer_Lives is zero. | ||
| A8CE | AND A | |||
| A8CF | CALL Z,GameOver_Check_Player_1UP | |||
| A8D2 | CALL ChangePlayer | Call ChangePlayer. | ||
| A8D5 | XOR A | Write 00 to PlayerInactive. | ||
| A8D6 | LD ($5E6C),A | |||
| A8D9 | LD A,($5E65) | Flip Flag_ActivePlayer to the other player. | ||
| A8DC | CPL | |||
| A8DD | LD ($5E65),A | |||
| A8E0 | JP LevelInitialisation | Jump to LevelInitialisation. | ||
| Prev: A880 | Up: Map | Next: A8E3 |