Prev: 8C01 Up: Map Next: 8C71
8C3E: Flash Score Label
Used by the routine at 8C71.
HandlerScoreLabel 8C3E LD A,($5E6C) If 5E6C is zero, jump to ScoreLabelFlash.
8C41 AND A
8C42 JR Z,ScoreLabelFlash
8C44 LD (IX+$00),$00 Write 00 to IX+00.
8C48 RET Return.
Controller for handling whether to action 1UP or 2UP score label.
ScoreLabelFlash 8C49 LD A,($5E65) If Flag_ActivePlayer is not zero, jump to FlashScoreLabel2UP.
8C4C AND A
8C4D JR NZ,FlashScoreLabel2UP
Flash 1UP score label.
8C4F LD HL,$0018 HL=0018 (position of the 1UP score label).
Set flash state for the 3-attributes of the score label.
FlashText 8C52 CALL AttributeAddress Call AttributeAddress.
8C55 LD B,$03 B=03 (counter for the three letters in a score label).
FlashText_Loop 8C57 LD A,(HL) Fetch the attribute byte.
8C58 OR %10000000 Ensure bit 7 is set (the flash bit).
8C5A LD (HL),A Write the attribute byte back to HL.
8C5B INC HL Increment the attribute address pointer by one.
8C5C DJNZ FlashText_Loop Decrease counter by one and loop back to FlashText_Loop until counter is zero.
8C5E RET Return.
Unset flash state for the 3-attributes of the score label.
UnsetFlashText 8C5F CALL AttributeAddress Call AttributeAddress.
8C62 LD B,$03 B=03 (counter for the three letters in a score label).
UnsetFlashText_Loop 8C64 LD A,(HL) Fetch the attribute byte.
8C65 AND %01111111 Keep only bits 0-6 (i.e. everything except the flash bit).
8C67 LD (HL),A Write the attribute byte back to HL.
8C68 INC HL Increment the attribute address pointer by one.
8C69 DJNZ UnsetFlashText_Loop Decrease counter by one and loop back to UnsetFlashText_Loop until counter is zero.
8C6B RET Return.
Flash 2UP score label.
FlashScoreLabel2UP 8C6C LD HL,$00D8 HL=00D8 (position of the 2UP score label).
8C6F JR FlashText Jump to FlashText.
View the equivalent code in;
Prev: 8C01 Up: Map Next: 8C71