Prev: 6163 Up: Map Next: 619E
6176: Initialise Player
Used by the routines at LevelNew and PlayerTurnEnds.
Sets up the active player for a turn: puts Robbie at his default position, sets how long the "get ready" delay lasts and takes a life.
PlayerInit 6176 LD A,$15 Write 15 to State_Explosion.
6178 LD ($5EE4),A
617B LD HL,$5F1E Copy 08 bytes of data from DefaultState_Robbie to State_Robbie_Active.
617E LD DE,$5E6C
6181 LD BC,$0008
6184 LDIR
Set default "begin play" delay period.
6186 LD A,$80 A=80 (the length of the "get ready" delay).
6188 LD HL,$5E03 Jump to PlayerInit_WriteDelay if GameOptions says this is a 1UP game.
618B BIT 0,(HL)
618D JR Z,PlayerInit_WriteDelay
618F ADD A,$7F Else, add 7F to make the delay FF for a two player game (giving more time for "passing over" the controls).
PlayerInit_WriteDelay 6191 LD ($5E22),A Write the delay to PlayDelay_Counter.
"Spend" a life.
6194 LD A,($5E38) Decrease CurrentPlayer_Lives by one.
6197 DEC A
6198 LD ($5E38),A
619B JP DisplayPlayerLives Jump to DisplayPlayerLives to display the lives.
Prev: 6163 Up: Map Next: 619E