![]() |
Routines |
| Prev: 90E0 | Up: Map | Next: 9119 |
|
Used by the routine at Select_Game_Options.
Prints the five lines of the game selection menu, the copyright message and the title.
The attributes of the lines are read through DE from GameSelection_Attributes, while the y positions and the strings are read through HL' and DE'.
|
||||||
|
Set up the pointers and the counter of the five lines.
|
||||||
| GameMenu | 90E4 | LD DE,$9119 | Point at the attributes of the lines (GameSelection_Attributes). | |||
| 90E7 | EXX | Switch to the shadow registers. | ||||
| 90E8 | LD HL,$911F | HL'=GameSelection_Position (the y positions of the lines). | ||||
| 90EB | LD DE,$9125 | DE'=GameSelection_Text (the first string). | ||||
| 90EE | LD B,$05 | B'=05 (the number of lines). | ||||
| GameMenu_Loop | 90F0 | EXX | Switch to the main registers. | |||
|
Print each of the lines.
|
||||||
| 90F1 | LD A,(DE) | Fetch the attribute of the line. | ||||
| 90F2 | LD ($8EE8),A | Store it in the print attribute (Current_MenuAttribute). | ||||
| 90F5 | INC DE | Move on to the next attribute. | ||||
| 90F6 | EXX | Switch to the shadow registers. | ||||
| 90F7 | PUSH BC | Stash the counter on the stack. | ||||
| 90F8 | LD A,(HL) | Fetch the y position of the line. | ||||
| 90F9 | INC HL | Move on to the next y position. | ||||
| 90FA | PUSH HL | Stash the pointer to the y positions on the stack. | ||||
| 90FB | LD H,A | Use it as the y position of the line. | ||||
| 90FC | LD L,$58 | L'=58 (the x position of the lines). | ||||
| 90FE | CALL MenuWriteText | Print the string. | ||||
| 9101 | EXX | Switch to the shadow registers. | ||||
| 9102 | POP HL | Restore the pointer to the y positions. | ||||
| 9103 | POP BC | Restore the counter. | ||||
| 9104 | INC DE | Move on to the next string. | ||||
| 9105 | DJNZ GameMenu_Loop | Repeat for each of the lines. | ||||
|
Print the copyright message and the title.
|
||||||
| 9107 | LD HL,$B800 | Set the x position to 00 and the y position to B8 (B800). | ||||
| 910A | LD DE,$9174 | Point at the copyright message (Message_Copyright). | ||||
| 910D | CALL PrintStringColour | Print the copyright message. | ||||
| 9110 | LD HL,$0010 | Set the x position to 10 and the y position to 00 (10). | ||||
| 9113 | LD DE,$9195 | Point at the title (GameSelection_Title). | ||||
| 9116 | JP PrintStringColour | Jump to PrintStringColour. | ||||
|
View the equivalent code in;
|
||||||
| Prev: 90E0 | Up: Map | Next: 9119 |