![]() |
Routines |
| Prev: C8FF | Up: Map | Next: CA1D |
|
Used by the routine at AFTER_GAME.
Called by the main loop at the start of every game and after every death (AFTER_GAME, OBJECT_DONE). Copies the two start records (START_LEGS) over the robot's -- as a game starts (NEW_GAME_START), or as he last came through a doorway (EXIT_LOW_U) -- and takes a life. The copies' graphic is 56, so he appears through graphics 56-63 (PLAYER_APPEARING) and then takes the graphic kept at +$10 (PLAYER_APPEARED).
The first call of a game takes the five lives to four; below zero, after the fifth death, the game is over (GAME_ENDED).
|
||||||||
| NEW_LIFE | CA07 | LD HL,START_LEGS | Both records, legs and top; IX on the legs | |||||
| CA0A | LD DE,OBJECTS | |||||||
| CA0D | PUSH DE | |||||||
| CA0E | POP IX | |||||||
| CA10 | LD BC,$0040 | |||||||
| CA13 | LDIR | |||||||
| CA15 | LD HL,LIVES | A life fewer; below zero, the game is over | ||||||
| CA18 | DEC (HL) | |||||||
| CA19 | JP M,GAME_ENDED | |||||||
| CA1C | RET | |||||||
| Prev: C8FF | Up: Map | Next: CA1D |