![]() |
Routines |
| Prev: A3FE | Up: Map | Next: A51C |
|
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 | A4E7 | LD A,$07 | Set the length of the message to 07... | |
| A4E9 | LD ($A572),A | ...in the operand of the instruction at A571. | ||
| A4EC | LD A,($DEDF) | Fetch the number of the current level from LevelNumber. | ||
| A4EF | INC A | Add one to make the number of the stage. | ||
| A4F0 | LD ($A597),A | Store it as the last character of the message at A597. | ||
| A4F3 | LD HL,$FF0E | Set the scroll counter to 0E and the character index to FF. | ||
| A4F6 | LD ($A921),HL | Store them in ScrollCounter and A922. | ||
| ScrollStageMessage_Loop | A4F9 | LD IY,($5CF1) | Bring back IY from SavedIY. | |
| A4FD | EI | Enable interrupts... | ||
| A4FE | HALT | ...and wait for the next frame. | ||
| A4FF | DI | Disable interrupts. | ||
| A500 | LD IX,$A59D | Point IX at Gauges. | ||
| A504 | CALL UpdateGauge | Update the gauge. | ||
| A507 | LD IX,$A5A1 | Point IX at Gauges_Second. | ||
| A50B | CALL UpdateGauge | Update the gauge. | ||
| A50E | LD HL,$A591 | Point HL at StageMessage. | ||
| A511 | CALL ScrollMessage | Scroll the message by one step. | ||
| A514 | LD A,($A922) | Fetch the character index from A922. | ||
| A517 | CP $0F | Compare it with 0F. | ||
| A519 | RET Z | Return if the message has gone. | ||
| A51A | JR ScrollStageMessage_Loop | Jump back to scroll the message another step. | ||
| Prev: A3FE | Up: Map | Next: A51C |