Prev: 24931 Up: Map Next: 24990
24950: 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 24950 LD A,21 Write 21 to State_Explosion.
24952 LD (24292),A
24955 LD HL,24350 Copy 8 bytes of data from DefaultState_Robbie to State_Robbie_Active.
24958 LD DE,24172
24961 LD BC,8
24964 LDIR
Set default "begin play" delay period.
24966 LD A,128 A=128 (the length of the "get ready" delay).
24968 LD HL,24067 Jump to PlayerInit_WriteDelay if GameOptions says this is a 1UP game.
24971 BIT 0,(HL)
24973 JR Z,PlayerInit_WriteDelay
24975 ADD A,127 Else, add 127 to make the delay 255 for a two player game (giving more time for "passing over" the controls).
PlayerInit_WriteDelay 24977 LD (24098),A Write the delay to PlayDelay_Counter.
"Spend" a life.
24980 LD A,(24120) Decrease CurrentPlayer_Lives by one.
24983 DEC A
24984 LD (24120),A
24987 JP DisplayPlayerLives Jump to DisplayPlayerLives to display the lives.
Prev: 24931 Up: Map Next: 24990