Routines |
Prev: A826 | Up: Map | Next: A880 |
Used by the routine at StartGame.
|
||||
NewGame | A84C | LD B,$02 | B=02 (counter for our two players). | |
NewGame_Loop | A84E | PUSH BC | Stash the counter in BC on the stack. | |
Handle setting up 1UP player.
|
||||
A84F | LD A,$FF | Write 1UP starting level to ActivePlayer_Level. | ||
A851 | LD ($5EA0),A | |||
A854 | LD A,$04 | Write 1UP starting lives to ActivePlayer_Lives. | ||
A856 | LD ($5EA1),A | |||
A859 | XOR A | Write 00 to; | ||
A85A | LD ($5EA2),A | |||
A85D | LD ($5EA3),A | |||
A860 | CALL Terrain_Initialise | Call Terrain_Initialise. | ||
A863 | CALL $9F5E | Call 9F5E. | ||
A866 | CALL ChangePlayer | Call ChangePlayer. | ||
A869 | POP BC | Restore BC from the stack. | ||
A86A | DJNZ NewGame_Loop | Decrease counter by one and loop back to NewGame_Loop until counter is zero. | ||
Handle setting up 2UP player.
|
||||
A86C | LD A,$05 | Write 2UP starting lives to InactivePlayer_Lives. | ||
A86E | LD ($5EA5),A | |||
A871 | LD A,$FF | Write 2UP starting level to InactivePlayer_Level. | ||
A873 | LD ($5EA4),A | |||
A876 | LD A,($5E00) | A=GameOptions. | ||
A879 | AND %00000001 | Keep only bit 0. | ||
A87B | RET NZ | Return if GameOptions indicates this is a 1 player only game. | ||
A87C | LD ($5EA5),A | Write A to InactivePlayer_Lives. | ||
A87F | RET | Return. |
Prev: A826 | Up: Map | Next: A880 |