Prev: 31888 Up: Map Next: 31978
31919: Game Selection Menu
Used by the routine at GameInitialisation.
Prints the seven menu lines, then the copyright message and the title. The icons were drawn by MenuIcons. The main registers are used to step through the attribute table at GameSelection_Attributes, whilst the shadow registers step through the Y position table at GameSelection_Position and the text at GameSelection_Text.
game-menu
GameMenu 31919 LD HL,48716 Write 48716 (the main font, see MainFont) to FontPointer.
31922 LD (24065),HL
31925 LD DE,31978 Point DE at the menu attribute table at GameSelection_Attributes.
31928 EXX Switch to the shadow registers.
31929 LD HL,31985 Point HL' at the menu Y position table at GameSelection_Position.
31932 LD DE,31992 Point DE' at the menu text at GameSelection_Text.
There are seven lines of text.
31935 LD B,7 B'=7 (the number of lines to print).
GameMenu_Loop 31937 EXX Switch back to the normal registers.
31938 LD A,(DE) Copy the attribute of the line from the menu attribute table to Current_MenuAttribute.
31939 LD (24098),A
31942 INC DE Move DE on to the text of the line.
31943 EXX Switch to the shadow registers.
31944 PUSH BC Stash the line counter on the stack.
31945 LD A,(HL) Fetch the Y position of the line.
31946 INC HL Move HL' on to the next Y position in the table.
31947 PUSH HL Stash the position table pointer on the stack.
31948 LD H,A Set the Y position of the line in H'.
31949 LD L,88 Set the X position of the line to 88 in L'.
31951 CALL MenuWriteText Call MenuWriteText to print the line.
31954 EXX Switch to the shadow registers.
31955 POP HL Restore the position table pointer from the stack.
31956 POP BC Restore the line counter from the stack.
31957 INC DE Move DE' on to the start of the next line of text.
31958 DJNZ GameMenu_Loop Decrease the 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.
31960 LD HL,47104 HL=47104 (a Y position of 184 and an X position of 0).
31963 LD DE,32081 Point DE at the copyright messaging at Message_Copyright.
31966 CALL PrintStringColour Call PrintStringColour to print the string.
Print the title at the top of the screen.
31969 LD HL,32 HL=0032 (a Y position of 0 and an X position of 32).
31972 LD DE,32114 Point DE at the game selection title text at GameSelection_Title.
31975 JP PrintStringColour Jump to PrintStringColour to print the string.
Prev: 31888 Up: Map Next: 31978