Prev: 6298 Up: Map Next: 635E
6332: 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 07.
game-menu
The attributes are fetched using DE, and the positions and the text use HL' and DE'.
GameMenu 6332 LD DE,$635E Point DE at the table of menu line attributes.
6335 EXX Switch to the shadow registers.
6336 LD HL,$6365 Point HL' at GameSelection_Position.
6339 LD DE,$636C Point DE' at GameSelection_Text.
There are seven lines of text.
633C LD B,$07 Set the menu line counter to 07.
GameMenu_Loop 633E EXX Switch back to the normal registers.
633F LD A,(DE) Copy the attribute of this menu line to Current_MenuAttribute.
6340 LD ($5F24),A
6343 INC DE Move onto the attribute for the next menu line.
6344 EXX Switch to the shadow registers.
6345 PUSH BC Stash the menu line counter on the stack.
6346 LD A,(HL) Fetch the vertical position of this menu line.
6347 INC HL Move onto the position for the next menu line.
6348 PUSH HL Stash the position pointer on the stack.
6349 LD H,A Set the position of this menu line; the vertical position from the table and the horizontal position of 38.
634A LD L,$38
634C CALL MenuWriteText Print the menu line using MenuWriteText.
634F EXX Switch to the shadow registers.
6350 POP HL Restore the position pointer and the menu line counter from the stack.
6351 POP BC
6352 INC DE Move onto the text of the next menu line.
6353 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.
6355 LD HL,$B800 Set the position of the copyright message (B800).
6358 LD DE,$5F8E Point DE at Message_Rights.
635B JP PrintStringColour Print the copyright message using PrintStringColour.
Prev: 6298 Up: Map Next: 635E