![]() |
Routines |
| Prev: 6FD7 | Up: Map | Next: 7020 |
|
Used by the routines at StartLevel and HandleEndOfLife.
Puts Charlie in his starting position, and takes a life away from the active player. Charlie will not appear until a delay has run out (see GamePlayEntry); it is shorter for a one player game than a two player game, so that the players have time to swap controls.
|
||||
| StartLife | 6FFD | LD HL,$5FAF | Point HL at the data for Charlie at the start of a life (CharlieTemplate). | |
| 7000 | LD DE,$5F35 | Point DE at ActorCharlie. | ||
| 7003 | LD BC,$0008 | Set the number of bytes to copy to 08. | ||
| 7006 | LDIR | Copy the data for Charlie into the first actor slot. | ||
| 7008 | LD A,$80 | Set the delay for a one player game to 80. | ||
| 700A | LD HL,$5F0C | Point HL at GameOptions. | ||
| 700D | BIT 0,(HL) | Jump to StartLife_SetDelay if this is a one player game. | ||
| 700F | JR Z,StartLife_SetDelay | |||
| 7011 | ADD A,$7F | Add 7F so the delay is FF for a two player game. | ||
| StartLife_SetDelay | 7013 | LD ($5F25),A | Set the game delay timer (GameDelayTimer). | |
| 7016 | LD A,($5F2E) | Take a life away from the active player (ActivePlayer_Lives). | ||
| 7019 | DEC A | |||
| 701A | LD ($5F2E),A | |||
| 701D | JP DisplayPlayerLives | Jump to DisplayPlayerLives to show the lives. | ||
| Prev: 6FD7 | Up: Map | Next: 7020 |