Prev: 6FFD Up: Map Next: 7048
7020: Flash Score Label
Used by the routine at GamePlayEntry.
Makes the score label of the active player ("1UP" or "2UP") flash. This is done while the delay before Charlie appears is running (see GamePlayEntry).
Before After
flash-score-before flash-score-after
ScoreLabelFlash 7020 LD A,($5F21) Fetch the active player (00 for 1UP, FF for 2UP).
7023 AND A If the current player is 2UP then jump to FlashScoreLabel2UP.
7024 JR NZ,FlashScoreLabel2UP
Flash 1UP score label.
7026 LD HL,$0018 HL=00,18 (position of the 1UP score label).
Set flash state for the 3-attributes of the score label.
FlashText 7029 CALL AttributeAddress Calculate the attribute buffer address using AttributeAddress.
702C LD B,$03 Set the letter counter to 03 (the three letters in a score label).
FlashText_Loop 702E LD A,(HL) Fetch the attribute byte.
702F OR %10000000 Ensure bit 7 is set (the flash bit).
7031 LD (HL),A Write the attribute byte back.
7032 INC HL Move on to the next attribute.
7033 DJNZ FlashText_Loop Decrease the letter counter by one and loop back to FlashText_Loop until all three letters have been done.
7035 RET Return.
This entry point is used by the routine at GamePlayEntry.
Unset flash state for the 3-attributes of the score label.
UnsetFlashText 7036 CALL AttributeAddress Calculate the attribute buffer address using AttributeAddress.
7039 LD B,$03 Set the letter counter to 03 (the three letters in a score label).
UnsetFlashText_Loop 703B LD A,(HL) Fetch the attribute byte.
703C AND %01111111 Keep only bits 0-6 (i.e. everything except the flash bit).
703E LD (HL),A Write the attribute byte back.
703F INC HL Increase the attribute pointer by one.
7040 DJNZ UnsetFlashText_Loop Decrease the letter counter by one and loop back to UnsetFlashText_Loop until all three letters have been done.
7042 RET Return.
Flash 2UP score label.
FlashScoreLabel2UP 7043 LD HL,$00D8 HL=00,D8 (position of the 2UP score label).
7046 JR FlashText Jump to FlashText.
View the equivalent code in;
Prev: 6FFD Up: Map Next: 7048