![]() ![]() |
Routines |
Prev: 25319 | Up: Map | Next: 25374 |
Used by the routine at Message_SprayBugs.
|
||||
ResetPlayerData | 25335 | LD B,2 | B=2 (loop counter, max. 2 players). | |
ResetPlayerData_Loop | 25337 | PUSH BC | Stash BC on the stack. | |
25338 | XOR A | Reset ActivePlayer_Level to 0 (level 1). | ||
25339 | LD (24119),A | |||
25342 | LD A,4 | Set CurrentPlayer_Lives to 4. | ||
25344 | LD (24120),A | |||
25347 | CALL LevelNew_0 | Call LevelNew_0. | ||
25350 | CALL ResetFlowerLeaf | Call ResetFlowerLeaf. | ||
25353 | CALL ChangePlayer | Call ChangePlayer. | ||
25356 | POP BC | Restore BC from the stack. | ||
25357 | DJNZ ResetPlayerData_Loop | Decrease player counter by one and loop back to ResetPlayerData_Loop until counter is zero. | ||
2UP has one "extra" life, due to the way the game "spends" a life when your turn starts.
|
||||
25359 | LD A,5 | Write 5 to InactivePlayer_Lives. | ||
25361 | LD (24122),A | |||
25364 | LD A,(24067) | A=GameOptions. | ||
25367 | AND %00000001 | Keep only bit 0 (1 or 2 players). | ||
25369 | RET NZ | Return if this is a two player game. | ||
25370 | LD (24122),A | Else, write 0 to InactivePlayer_Lives (2UP has no lives). | ||
25373 | RET | Return. |
Prev: 25319 | Up: Map | Next: 25374 |