![]() |
Routines |
| Prev: 25568 | Up: Map | Next: 25622 |
|
Used by the routine at StartGame.
|
||||
| PlayersInit | 25584 | LD B,2 | B=2 (counter; both players). | |
| PlayersInit_Loop | 25586 | PUSH BC | Stash BC on the stack. | |
| 25587 | XOR A | Write 0 to 1UP_Level. | ||
| 25588 | LD (24365),A | |||
|
Set both players starting lives.
|
||||
| 25591 | LD A,4 | Write 4 to 1UP_Lives. | ||
| 25593 | LD (24366),A | |||
| 25596 | CALL ChangePlayer | Call ChangePlayer to swap the player data between 1UP and 2UP players. | ||
| 25599 | POP BC | Restore BC from the stack. | ||
| 25600 | DJNZ PlayersInit_Loop | Decrease counter by one and loop back to PlayersInit_Loop until counter is zero. | ||
|
Note this is +1 to 25591 as you "spend a life", and 1UP goes first.
|
||||
| 25602 | LD A,5 | Write 5 to 2UP_Lives. | ||
| 25604 | LD (24370),A | |||
|
Default to writing 255 to 2UP_Level (this is a 1UP game).
|
||||
| 25607 | LD A,255 | Write 255 to 2UP_Level. | ||
| 25609 | LD (24369),A | |||
|
Handle 2UP game.
|
||||
| 25612 | LD A,(24332) | Return if bit 0 of GameOptions is not set (i.e. if this is a 1UP game). | ||
| 25615 | AND %00000001 | |||
| 25617 | RET NZ | |||
| 25618 | LD (24370),A | Else, write it to 2UP_Lives. | ||
| 25621 | RET | Return. | ||
| Prev: 25568 | Up: Map | Next: 25622 |