Prev: 46142 Up: Map Next: 46232
46195: Game Selection Menu
Used by the routines at HandlerHallOfFame and HandlerGameMenu.
Prints the eight lines of text of the game selection menu, each with its own attribute (see GameSelection_Attributes), at the positions in GameSelection_Position. The entry point at GameMenu_Loop is also used to print the hall of fame, which has its own tables.
Before After GameMenu
selection-menu-before selection-menu-after
GameMenu 46195 LD DE,46232 Point DE at the attributes of the lines of text at GameSelection_Attributes.
46198 EXX Switch to the shadow registers.
46199 LD HL,46240 Point HL' at the positions of the lines of text at GameSelection_Position.
46202 LD DE,46256 Point DE' at the lines of text at String_1UP_Game.
There are eight lines of text.
46205 LD B,8 Set the number of lines of text in the shadow B register to 8.
This entry point is used by the routines at HallOfFame and NewHighScore_Enter.
GameMenu_Loop 46207 EXX Switch back to the normal registers.
46208 LD A,(DE) Copy the attribute of the line of text to Current_MenuAttribute.
46209 LD (38568),A
46212 INC DE Move onto the attribute of the next line of text.
46213 EXX Switch to the shadow registers.
46214 PUSH BC Stash the line counter on the stack.
46215 LD A,(HL) Fetch the X position of the line of text.
46216 INC HL Move onto the position of the next line of text.
46217 INC HL
46218 PUSH HL Stash the position pointer on the stack.
46219 DEC HL Move back to the Y position of the line of text.
46220 LD H,(HL) Set the Y position in H.
46221 LD L,A Set the X position in L.
46222 CALL MenuWriteText Print the line of text.
46225 EXX Switch to the shadow registers.
46226 POP HL Restore the position pointer and the line counter from the stack.
46227 POP BC
46228 INC DE Move onto the next line of text.
46229 DJNZ GameMenu_Loop Decrease the line counter by one and loop back to GameMenu_Loop until all of the lines of text have been printed.
46231 RET Return.
Prev: 46142 Up: Map Next: 46232