Prev: 62E7 Up: Map Next: 631E
62F7: Reset Player Data
Used by the routine at Message_SprayBugs.
ResetPlayerData 62F7 LD B,$02 B=02 (loop counter, max. 2 players).
ResetPlayerData_Loop 62F9 PUSH BC Stash BC on the stack.
62FA XOR A Reset ActivePlayer_Level to 00 (level 1).
62FB LD ($5E37),A
62FE LD A,$04 Set CurrentPlayer_Lives to 04.
6300 LD ($5E38),A
6303 CALL LevelNew_0 Call LevelNew_0.
6306 CALL ResetFlowerLeaf Call ResetFlowerLeaf.
6309 CALL ChangePlayer Call ChangePlayer.
630C POP BC Restore BC from the stack.
630D 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.
630F LD A,$05 Write 05 to InactivePlayer_Lives.
6311 LD ($5E3A),A
6314 LD A,($5E03) A=GameOptions.
6317 AND %00000001 Keep only bit 0 (1 or 2 players).
6319 RET NZ Return if this is a two player game.
631A LD ($5E3A),A Else, write 00 to InactivePlayer_Lives (2UP has no lives).
631D RET Return.
Prev: 62E7 Up: Map Next: 631E