![]() |
Routines |
| Prev: 7535 | Up: Map | Next: 757D |
|
Used by the routine at PrintGameDisplay.
|
||||
| InitialiseNewGame | 754F | CALL PrintDemoMode | Call PrintDemoMode. | |
|
"Spend" a life to continue, or move to Game Over.
|
||||
| SpendLife | 7552 | LD HL,$7839 | Decrease *Lives by one. | |
| 7555 | DEC (HL) | |||
|
Compare the players current lives with the maximum number of lives (04).
|
||||
| 7556 | LD C,(HL) | C=*Lives. | ||
| 7557 | LD A,$04 | A=04 (the maximum number of lives). | ||
| 7559 | EXX | Switch to the shadow registers. | ||
| 755A | LD DE,$50CB | DE'=50CB (screen buffer location). | ||
| 755D | EXX | Switch back to the normal registers. | ||
| 755E | SUB C | A-=C. | ||
| 755F | JR Z,TestGameOver | Jump to TestGameOver if A is zero. | ||
|
Blank out where the lives would print.
|
||||
| 7561 | ADD A,A | B=A*02. | ||
| 7562 | LD B,A | |||
| PrintBlank_Loop | 7563 | EXX | Switch to the shadow registers. | |
| 7564 | LD L,$64 | L=64. | ||
| 7566 | CALL PrintGraphic | Call PrintGraphic. | ||
| 7569 | DJNZ PrintBlank_Loop | Decrease counter by one and loop back to PrintBlank_Loop until counter is zero. | ||
| TestGameOver | 756B | LD A,C | Jump to GameOver if C is zero. | |
| 756C | AND A | |||
| 756D | JR Z,GameOver | |||
|
Display the bike graphic for each remaining life.
|
||||
| 756F | LD B,C | B=C (counter; current number of lives). | ||
| PrintLives | 7570 | EXX | Switch to the shadow registers. | |
| 7571 | LD L,$9C | L'=9C. | ||
|
Print the left side of the bike graphic.
|
||||
| 7573 | CALL PrintGraphic | Call PrintGraphic. | ||
| 7576 | EXX | Switch back to the normal registers. | ||
|
Print the right side of the bike graphic.
|
||||
| 7577 | CALL PrintGraphic | Call PrintGraphic. | ||
| 757A | DJNZ PrintLives | Decrease counter by one and loop back to PrintLives until counter is zero. | ||
| 757C | RET | Return. | ||
| Prev: 7535 | Up: Map | Next: 757D |