![]() |
Routines |
| Prev: 6FFC | Up: Map | Next: 70F9 |
|
|
||||
|
Controller for 1UP lives.
|
||||
| DisplayPlayerLives | 70A4 | LD HL,$0040 | Call ScreenAddress with 0040 (screen buffer address) for 1UP lives. | |
| 70A7 | CALL ScreenAddress | |||
| 70AA | CALL ControllerActiveLives | A=1UP lives remaining (by calling ControllerActiveLives). | ||
| 70AD | AND A | If 1UP lives are zero, jump to Handler1UPNoLives. | ||
| 70AE | JR Z,Handler1UPNoLives | |||
| 70B0 | CALL HandlerDisplayLives | Else, there are lives to display so call HandlerDisplayLives. | ||
|
Controller for 2UP lives.
|
||||
| Controller2UPLives | 70B3 | LD HL,$00B0 | Call ScreenAddress with 00B0 (screen buffer address) for 2UP lives. | |
| 70B6 | CALL ScreenAddress | |||
| 70B9 | CALL ControllerInactiveLives | A=2UP lives remaining (by calling ControllerInactiveLives). | ||
| 70BC | AND A | If 2UP lives are zero, jump to Handler2UPNoLives. | ||
| 70BD | JR Z,Handler2UPNoLives | |||
|
Handles displaying the lives count and UDG character.
|
||||
| HandlerDisplayLives | 70BF | ADD A,$30 | Add 30 to convert to an ASCII character (starting at "0" character). | |
| 70C1 | CALL PrintScreen | Call PrintScreen. | ||
| 70C4 | LD DE,$70DB | DE=UDG_Life. | ||
| 70C7 | PUSH BC | Stash BC and DE on the stack. | ||
| 70C8 | PUSH DE | |||
| 70C9 | JP PrintScreen_0 | Jump to PrintScreen_0. | ||
|
1UP has no lives.
|
||||
| Handler1UPNoLives | 70CC | CALL Handler2UPNoLives | Call Handler2UPNoLives. | |
| 70CF | JR Controller2UPLives | Jump to Controller2UPLives. | ||
|
2UP has no lives.
|
||||
| Handler2UPNoLives | 70D1 | LD A,$20 | A=ASCII " " (SPACE). | |
| 70D3 | CALL PrintScreen | Call PrintScreen. | ||
| 70D6 | LD A,$20 | A=ASCII " " (SPACE). | ||
| 70D8 | JP PrintScreen | Jump to PrintScreen. | ||
|
The UDG for the lives icon.
|
||||
| UDG_Life | 70DB | DEFB %00011000 |
|
|
| 70DC | DEFB %00100100 | |||
| 70DD | DEFB %00111100 | |||
| 70DE | DEFB %01111110 | |||
| 70DF | DEFB %01011010 | |||
| 70E0 | DEFB %00111100 | |||
| 70E1 | DEFB %00111100 | |||
| 70E2 | DEFB %01100110 | |||
|
Controller for the currently active player.
|
||||
| ControllerActiveLives | 70E3 | LD A,($5DD1) | If Flag_ActivePlayer is not zero then jump to InactivePlayerLives. | |
| 70E6 | AND A | |||
| 70E7 | JR NZ,InactivePlayerLives | |||
|
Return currently active players lives left.
|
||||
| ActivePlayerLives | 70E9 | LD A,($5DF1) | A=ActivePlayer_Lives. | |
| 70EC | RET | Return. | ||
|
Return inactive players lives left.
|
||||
| InactivePlayerLives | 70ED | LD A,($5DF9) | A=InactivePlayer_Lives. | |
| 70F0 | RET | Return. | ||
|
Controller for the inactive player.
|
||||
| ControllerInactiveLives | 70F1 | LD A,($5DD1) | If Flag_ActivePlayer is zero then jump to InactivePlayerLives. | |
| 70F4 | AND A | |||
| 70F5 | JR Z,InactivePlayerLives | |||
| 70F7 | JR ActivePlayerLives | Jump to ActivePlayerLives. | ||
|
View the equivalent code in;
|
||||
| Prev: 6FFC | Up: Map | Next: 70F9 |