Prev: 25240 Up: Map Next: 25438
25394: Game Selection Menu
Used by the routine at GameInitialisation.
Prints the seven lines of the game selection menu, and then the copyright message at the bottom of the screen. Each line of the menu has an attribute (from GameSelection_Attributes), a vertical position (from GameSelection_Position) and some text (from GameSelection_Text), and all of them are printed starting at column 7.
game-menu
The attributes are fetched using DE, and the positions and the text use HL' and DE'.
GameMenu 25394 LD DE,25438 Point DE at the table of menu line attributes.
25397 EXX Switch to the shadow registers.
25398 LD HL,25445 Point HL' at GameSelection_Position.
25401 LD DE,25452 Point DE' at GameSelection_Text.
There are seven lines of text.
25404 LD B,7 Set the menu line counter to 7.
GameMenu_Loop 25406 EXX Switch back to the normal registers.
25407 LD A,(DE) Copy the attribute of this menu line to Current_MenuAttribute.
25408 LD (24356),A
25411 INC DE Move onto the attribute for the next menu line.
25412 EXX Switch to the shadow registers.
25413 PUSH BC Stash the menu line counter on the stack.
25414 LD A,(HL) Fetch the vertical position of this menu line.
25415 INC HL Move onto the position for the next menu line.
25416 PUSH HL Stash the position pointer on the stack.
25417 LD H,A Set the position of this menu line; the vertical position from the table and the horizontal position of 56.
25418 LD L,56
25420 CALL MenuWriteText Print the menu line using MenuWriteText.
25423 EXX Switch to the shadow registers.
25424 POP HL Restore the position pointer and the menu line counter from the stack.
25425 POP BC
25426 INC DE Move onto the text of the next menu line.
25427 DJNZ GameMenu_Loop Decrease the menu line counter by one and loop back to GameMenu_Loop until all seven lines have been printed.
Print the copyright message at the bottom of the screen.
25429 LD HL,47104 Set the position of the copyright message (47104).
25432 LD DE,24462 Point DE at Message_Rights.
25435 JP PrintStringColour Print the copyright message using PrintStringColour.
Prev: 25240 Up: Map Next: 25438