![]() |
Routines |
| Prev: 43046 | Up: Map | Next: 43136 |
|
Used by the routine at StartGame.
|
||||
| NewGame | 43084 | LD B,2 | B=2 (counter for our two players). | |
| NewGame_Loop | 43086 | PUSH BC | Stash the counter in BC on the stack. | |
|
Handle setting up 1UP player.
|
||||
| 43087 | LD A,255 | Write 1UP starting level to ActivePlayer_Level. | ||
| 43089 | LD (24224),A | |||
| 43092 | LD A,4 | Write 1UP starting lives to ActivePlayer_Lives. | ||
| 43094 | LD (24225),A | |||
| 43097 | XOR A | Write 0 to; | ||
| 43098 | LD (24226),A | |||
| 43101 | LD (24227),A | |||
| 43104 | CALL Terrain_Initialise | Call Terrain_Initialise. | ||
| 43107 | CALL 40798 | Call 40798. | ||
| 43110 | CALL ChangePlayer | Call ChangePlayer. | ||
| 43113 | POP BC | Restore BC from the stack. | ||
| 43114 | DJNZ NewGame_Loop | Decrease counter by one and loop back to NewGame_Loop until counter is zero. | ||
|
Handle setting up 2UP player.
|
||||
| 43116 | LD A,5 | Write 2UP starting lives to InactivePlayer_Lives. | ||
| 43118 | LD (24229),A | |||
| 43121 | LD A,255 | Write 2UP starting level to InactivePlayer_Level. | ||
| 43123 | LD (24228),A | |||
| 43126 | LD A,(24064) | A=GameOptions. | ||
| 43129 | AND %00000001 | Keep only bit 0. | ||
| 43131 | RET NZ | Return if GameOptions indicates this is a 1 player only game. | ||
| 43132 | LD (24229),A | Write A to InactivePlayer_Lives. | ||
| 43135 | RET | Return. | ||
| Prev: 43046 | Up: Map | Next: 43136 |