![]() |
Routines |
| Prev: 41982 | Up: Map | Next: 42268 |
|
Used by the routine at RunGame.
Scrolls the message 'STAGE' and the number of the stage across the window, one frame at a time, while the gauges are updated.
|
||||
| ScrollStageMessage | 42215 | LD A,7 | Set the length of the message to 7... | |
| 42217 | LD (42354),A | ...in the operand of the instruction at 42353. | ||
| 42220 | LD A,(57055) | Fetch the number of the current level from LevelNumber. | ||
| 42223 | INC A | Add one to make the number of the stage. | ||
| 42224 | LD (42391),A | Store it as the last character of the message at 42391. | ||
| 42227 | LD HL,65294 | Set the scroll counter to 14 and the character index to 255. | ||
| 42230 | LD (43297),HL | Store them in ScrollCounter and 43298. | ||
| ScrollStageMessage_Loop | 42233 | LD IY,(23793) | Bring back IY from SavedIY. | |
| 42237 | EI | Enable interrupts... | ||
| 42238 | HALT | ...and wait for the next frame. | ||
| 42239 | DI | Disable interrupts. | ||
| 42240 | LD IX,42397 | Point IX at Gauges. | ||
| 42244 | CALL UpdateGauge | Update the gauge. | ||
| 42247 | LD IX,42401 | Point IX at Gauges_Second. | ||
| 42251 | CALL UpdateGauge | Update the gauge. | ||
| 42254 | LD HL,42385 | Point HL at StageMessage. | ||
| 42257 | CALL ScrollMessage | Scroll the message by one step. | ||
| 42260 | LD A,(43298) | Fetch the character index from 43298. | ||
| 42263 | CP 15 | Compare it with 15. | ||
| 42265 | RET Z | Return if the message has gone. | ||
| 42266 | JR ScrollStageMessage_Loop | Jump back to scroll the message another step. | ||
| Prev: 41982 | Up: Map | Next: 42268 |