Prev: 6163 Up: Map Next: 619E
6176: Player Initialisation
Used by the routines at LevelNew and Message_Eaten.
PlayerInit 6176 LD A,$15 Write 15 to 5EE4.
6178 LD ($5EE4),A
617B LD HL,$5F1E Copy 08 bytes of data from DefaultState_Robbie to Robbie_Object.
617E LD DE,$5E6C
6181 LD BC,$0008
6184 LDIR
Set default "begin play" delay period.
6186 LD A,$80 A=80 (delay counter).
6188 LD HL,$5E03 If GameOptions says this is a 1UP game, jump to PlayerInit_WriteDelay.
618B BIT 0,(HL)
618D JR Z,PlayerInit_WriteDelay
618F ADD A,$7F Else, A=FF for a two player game (to give more time for "passing over" the controls.
PlayerInit_WriteDelay 6191 LD ($5E22),A Write the delay counter 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.
Prev: 6163 Up: Map Next: 619E