![]() |
Routines |
| Prev: 35939 | Up: Map | Next: 36023 |
|
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 | 35980 | DEC A | Decrease the timer. | |
| 35981 | LD (24124),A | Write the timer back to FlashTimer. | ||
| 35984 | JR Z,FlashScore_Stop | Jump to FlashScore_Stop if the timer has reached zero. | ||
| 35986 | AND %00001111 | Keep only bits 0-3. | ||
| 35988 | CALL Z,SoundsStart | Call SoundsStart to make the beep, if the bottom four bits are zero. | ||
| 35991 | LD HL,20680 | HL=20680 (the screen address of the score). | ||
| 35994 | CALL AttributeAddress | Call AttributeAddress to convert it to an attribute address. | ||
| 35997 | LD B,6 | B=6 (the number of attribute cells of the score). | ||
| FlashScore_Loop | 35999 | LD A,(HL) | Fetch the attribute. | |
| 36000 | OR %10000000 | Set bit 7 (flash). | ||
| 36002 | LD (HL),A | Write A back to the attribute. | ||
| 36003 | INC HL | Move on to the next attribute. | ||
| 36004 | DJNZ FlashScore_Loop | Decrease the cell counter by one and loop back to FlashScore_Loop until all six cells are flashing. | ||
| 36006 | RET | Return. | ||
|
The timer has finished, so turn the flash off.
|
||||
| FlashScore_Stop | 36007 | LD HL,20680 | HL=20680 (the screen address of the score). | |
| 36010 | CALL AttributeAddress | Call AttributeAddress to convert it to an attribute address. | ||
| 36013 | LD B,6 | B=6 (the number of attribute cells of the score). | ||
| FlashScore_StopLoop | 36015 | LD A,(HL) | Fetch the attribute. | |
| 36016 | AND %01111111 | Reset bit 7 (flash). | ||
| 36018 | LD (HL),A | Write A back to the attribute. | ||
| 36019 | INC HL | Move on to the next attribute. | ||
| 36020 | DJNZ FlashScore_StopLoop | Decrease the cell counter by one and loop back to FlashScore_StopLoop until the flash is off in all six cells. | ||
| 36022 | RET | Return. | ||
| Prev: 35939 | Up: Map | Next: 36023 |