Prev: 28669 Up: Map Next: 28744
28704: 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 28704 LD A,(24353) Fetch the active player (0 for 1UP, 255 for 2UP).
28707 AND A If the current player is 2UP then jump to FlashScoreLabel2UP.
28708 JR NZ,FlashScoreLabel2UP
Flash 1UP score label.
28710 LD HL,24 HL=000,024 (position of the 1UP score label).
Set flash state for the 3-attributes of the score label.
FlashText 28713 CALL AttributeAddress Calculate the attribute buffer address using AttributeAddress.
28716 LD B,3 Set the letter counter to 3 (the three letters in a score label).
FlashText_Loop 28718 LD A,(HL) Fetch the attribute byte.
28719 OR %10000000 Ensure bit 7 is set (the flash bit).
28721 LD (HL),A Write the attribute byte back.
28722 INC HL Move on to the next attribute.
28723 DJNZ FlashText_Loop Decrease the letter counter by one and loop back to FlashText_Loop until all three letters have been done.
28725 RET Return.
This entry point is used by the routine at GamePlayEntry.
Unset flash state for the 3-attributes of the score label.
UnsetFlashText 28726 CALL AttributeAddress Calculate the attribute buffer address using AttributeAddress.
28729 LD B,3 Set the letter counter to 3 (the three letters in a score label).
UnsetFlashText_Loop 28731 LD A,(HL) Fetch the attribute byte.
28732 AND %01111111 Keep only bits 0-6 (i.e. everything except the flash bit).
28734 LD (HL),A Write the attribute byte back.
28735 INC HL Increase the attribute pointer by one.
28736 DJNZ UnsetFlashText_Loop Decrease the letter counter by one and loop back to UnsetFlashText_Loop until all three letters have been done.
28738 RET Return.
Flash 2UP score label.
FlashScoreLabel2UP 28739 LD HL,216 HL=000,216 (position of the 2UP score label).
28742 JR FlashText Jump to FlashText.
View the equivalent code in;
Prev: 28669 Up: Map Next: 28744