![]() |
Routines |
| Prev: 28631 | Up: Map | Next: 28704 |
|
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 | 28669 | LD HL,24495 | Point HL at the data for Charlie at the start of a life (CharlieTemplate). | |
| 28672 | LD DE,24373 | Point DE at ActorCharlie. | ||
| 28675 | LD BC,8 | Set the number of bytes to copy to 8. | ||
| 28678 | LDIR | Copy the data for Charlie into the first actor slot. | ||
| 28680 | LD A,128 | Set the delay for a one player game to 128. | ||
| 28682 | LD HL,24332 | Point HL at GameOptions. | ||
| 28685 | BIT 0,(HL) | Jump to StartLife_SetDelay if this is a one player game. | ||
| 28687 | JR Z,StartLife_SetDelay | |||
| 28689 | ADD A,127 | Add 127 so the delay is 255 for a two player game. | ||
| StartLife_SetDelay | 28691 | LD (24357),A | Set the game delay timer (GameDelayTimer). | |
| 28694 | LD A,(24366) | Take a life away from the active player (ActivePlayer_Lives). | ||
| 28697 | DEC A | |||
| 28698 | LD (24366),A | |||
| 28701 | JP DisplayPlayerLives | Jump to DisplayPlayerLives to show the lives. | ||
| Prev: 28631 | Up: Map | Next: 28704 |