Prev: 72F5 Up: Map Next: 737A
7325: Display Lives
Used by the routines at LevelNew and PlayerInit.
DisplayPlayerLives 7325 LD HL,$0040 Call ScreenAddress with 0040 for 1UP lives.
7328 CALL ScreenAddress
732B CALL ReturnLives_1UPController Call ReturnLives_1UPController.
732E AND A Display an empty space if no lives are remaining.
732F JR Z,DisplayPlayerLives_0
7331 CALL DisplayPlayerLives_Print Call DisplayPlayerLives_Print.
DisplayPlayerLives_2UP 7334 LD HL,$00B0 Call ScreenAddress with 00B0 for 2UP lives.
7337 CALL ScreenAddress
733A CALL ReturnLives_2UPController Call ReturnLives_2UPController.
733D AND A Display an empty space if no lives are remaining.
733E JR Z,DisplayPlayerLives_1
DisplayPlayerLives_Print 7340 ADD A,$30 Add 30 to convert to an ASCII character (starting at 0 character).
7342 CALL PrintScreen Call PrintScreen.
7345 LD DE,$735C DE=UDG_Life.
7348 PUSH BC Stash BC and DE on the stack.
7349 PUSH DE
734A JP PrintScreen_0 Jump to PrintScreen_0.
DisplayPlayerLives_0 734D CALL DisplayPlayerLives_1 Call DisplayPlayerLives_1.
7350 JR DisplayPlayerLives_2UP Jump to DisplayPlayerLives_2UP.
DisplayPlayerLives_1 7352 LD A,$20 A=ASCII " " (SPACE).
7354 CALL PrintScreen Call PrintScreen.
7357 LD A,$20 A=ASCII " " (SPACE).
7359 JP PrintScreen Jump to PrintScreen.
UDG_Life 735C DEFB %00011000 udg29532_56x4
735D DEFB %00100100
735E DEFB %00111100
735F DEFB %01111110
7360 DEFB %01011010
7361 DEFB %00111100
7362 DEFB %00111100
7363 DEFB %01100110
Check which player is current in a one player game.
ReturnLives_1UPController 7364 LD A,($5E1E) If Current_Player is 2UP, jump to ReturnLives_2UP.
7367 AND A
7368 JR NZ,ReturnLives_2UP
Handle 1UP.
ReturnLives_1UP 736A LD A,($5E38) A=CurrentPlayer_Lives.
736D RET Return.
Handle 2UP.
ReturnLives_2UP 736E LD A,($5E3A) A=2UP_Lives.
7371 RET Return.
Check which player is current in a two player game.
ReturnLives_2UPController 7372 LD A,($5E1E) If Current_Player is 1UP, jump to ReturnLives_2UP.
7375 AND A
7376 JR Z,ReturnLives_2UP
7378 JR ReturnLives_1UP Else, it's 2UP so jump to ReturnLives_1UP.
Prev: 72F5 Up: Map Next: 737A