Prev: 8C63 Up: Map Next: 8CB7
8C8C: Flash Score
Used by the routine at HandlerPlayerAppearing.
Called by HandlerPlayerAppearing while the timer at FlashTimer is running. The timer is counted down, the beep of the start is made every sixteen steps, and the six attribute cells of the score at the top of the screen are set to flash. When the timer reaches zero the flash is turned off again.
FlashScore 8C8C DEC A Decrease the timer.
8C8D LD ($5E3C),A Write the timer back to FlashTimer.
8C90 JR Z,FlashScore_Stop Jump to FlashScore_Stop if the timer has reached zero.
8C92 AND %00001111 Keep only bits 0-3.
8C94 CALL Z,SoundsStart Call SoundsStart to make the beep, if the bottom four bits are zero.
8C97 LD HL,$50C8 HL=50C8 (the screen address of the score).
8C9A CALL AttributeAddress Call AttributeAddress to convert it to an attribute address.
8C9D LD B,$06 B=06 (the number of attribute cells of the score).
FlashScore_Loop 8C9F LD A,(HL) Fetch the attribute.
8CA0 OR %10000000 Set bit 7 (flash).
8CA2 LD (HL),A Write A back to the attribute.
8CA3 INC HL Move on to the next attribute.
8CA4 DJNZ FlashScore_Loop Decrease the cell counter by one and loop back to FlashScore_Loop until all six cells are flashing.
8CA6 RET Return.
The timer has finished, so turn the flash off.
FlashScore_Stop 8CA7 LD HL,$50C8 HL=50C8 (the screen address of the score).
8CAA CALL AttributeAddress Call AttributeAddress to convert it to an attribute address.
8CAD LD B,$06 B=06 (the number of attribute cells of the score).
FlashScore_StopLoop 8CAF LD A,(HL) Fetch the attribute.
8CB0 AND %01111111 Reset bit 7 (flash).
8CB2 LD (HL),A Write A back to the attribute.
8CB3 INC HL Move on to the next attribute.
8CB4 DJNZ FlashScore_StopLoop Decrease the cell counter by one and loop back to FlashScore_StopLoop until the flash is off in all six cells.
8CB6 RET Return.
Prev: 8C63 Up: Map Next: 8CB7