![]() |
Routines |
| Prev: 35143 | Up: Map | Next: 35228 |
|
Controller for 1UP lives.
|
||||
| DisplayPlayerLives | 35151 | LD HL,64 | Call ScreenAddress with 0064 (screen buffer address) for 1UP lives. | |
| 35154 | CALL ScreenAddress | |||
| 35157 | CALL ControllerActiveLives | A=1UP lives remaining (by calling ControllerActiveLives). | ||
| 35160 | AND A | If 1UP lives are zero, jump to Handler1UPNoLives. | ||
| 35161 | JR Z,Handler1UPNoLives | |||
| 35163 | CALL HandlerDisplayLives | Else, there are lives to display so call HandlerDisplayLives. | ||
|
Controller for 2UP lives.
|
||||
| Controller2UPLives | 35166 | LD HL,176 | Call ScreenAddress with 0176 (screen buffer address) for 2UP lives. | |
| 35169 | CALL ScreenAddress | |||
| 35172 | CALL ControllerInactiveLives | A=2UP lives remaining (by calling ControllerInactiveLives). | ||
| 35175 | AND A | If 2UP lives are zero, jump to Handler2UPNoLives. | ||
| 35176 | JR Z,Handler2UPNoLives | |||
|
Handles displaying the lives count and UDG character.
|
||||
| HandlerDisplayLives | 35178 | ADD A,48 | Add 48 to convert to an ASCII character (starting at "0" character). | |
| 35180 | CALL PrintScreen | Call PrintScreen. | ||
| 35183 | LD DE,53585 | DE=UDG_Life. | ||
| 35186 | PUSH BC | Stash BC and DE on the stack. | ||
| 35187 | PUSH DE | |||
| 35188 | JP PrintScreen_0 | Jump to PrintScreen_0. | ||
|
1UP has no lives.
|
||||
| Handler1UPNoLives | 35191 | CALL Handler2UPNoLives | Call Handler2UPNoLives. | |
| 35194 | JR Controller2UPLives | Jump to Controller2UPLives. | ||
|
2UP has no lives.
|
||||
| Handler2UPNoLives | 35196 | LD A,32 | A=ASCII " " (SPACE). | |
| 35198 | CALL PrintScreen | Call PrintScreen. | ||
| 35201 | LD A,32 | A=ASCII " " (SPACE). | ||
| 35203 | JP PrintScreen | Jump to PrintScreen. | ||
|
Controller for the currently active player.
|
||||
| ControllerActiveLives | 35206 | LD A,(24165) | If Flag_ActivePlayer is not zero then jump to InactivePlayerLives. | |
| 35209 | AND A | |||
| 35210 | JR NZ,InactivePlayerLives | |||
|
Return currently active players lives left.
|
||||
| ActivePlayerLives | 35212 | LD A,(24225) | A=ActivePlayer_Lives. | |
| 35215 | RET | Return. | ||
|
Return inactive players lives left.
|
||||
| InactivePlayerLives | 35216 | LD A,(24229) | A=InactivePlayer_Lives. | |
| 35219 | RET | Return. | ||
|
Controller for the inactive player.
|
||||
| ControllerInactiveLives | 35220 | LD A,(24165) | If Flag_ActivePlayer is zero then jump to InactivePlayerLives. | |
| 35223 | AND A | |||
| 35224 | JR Z,InactivePlayerLives | |||
| 35226 | JR ActivePlayerLives | Jump to ActivePlayerLives. | ||
| Prev: 35143 | Up: Map | Next: 35228 |