Prev: CC9B Up: Map Next: CD47
CD1B: Flash Lives/ Lose Life
Used by the routine at CAE7.
Flash_Lives CD1B LD B,$0A Short pause.
CD1D CALL Halt_Loop
CD20 LD HL,$CC59 Point to Lives. Set a counter for 05 times and stash it.
CD23 LD B,$05
Flash_Lives_Loop CD25 PUSH BC
CD26 DEC (HL) Decrease the number of lives by one, stash the lives memory location and draw the decreased life images.
CD27 PUSH HL
CD28 CALL Life_Images
CD2B LD B,$10 Short pause.
CD2D CALL Halt_Loop
CD30 POP HL Grab the lives memory location, increase it by one, stash the location again and draw the now increased life images (i.e. what they were on entry to the routine).
CD31 INC (HL)
CD32 PUSH HL
CD33 CALL Life_Images
CD36 LD B,$10 Short pause.
CD38 CALL Halt_Loop
CD3B POP HL
CD3C POP BC Loop back until the counter is zero.
CD3D DJNZ Flash_Lives_Loop
CD3F LD A,(HL) Finally decrease lives by one and if they are not zero jump to Prep_Display_Phase_1.
CD40 DEC A
CD41 LD (HL),A
CD42 JP NZ,Prep_Display_Phase_1
CD45 SCF Set the carry flag and return.
CD46 RET
Prev: CC9B Up: Map Next: CD47