Prev: B43E Up: Map Next: B498
B473: 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 B473 LD DE,$B498 Point DE at the attributes of the lines of text at GameSelection_Attributes.
B476 EXX Switch to the shadow registers.
B477 LD HL,$B4A0 Point HL' at the positions of the lines of text at GameSelection_Position.
B47A LD DE,$B4B0 Point DE' at the lines of text at String_1UP_Game.
There are eight lines of text.
B47D LD B,$08 Set the number of lines of text in the shadow B register to 08.
This entry point is used by the routines at HallOfFame and NewHighScore_Enter.
GameMenu_Loop B47F EXX Switch back to the normal registers.
B480 LD A,(DE) Copy the attribute of the line of text to Current_MenuAttribute.
B481 LD ($96A8),A
B484 INC DE Move onto the attribute of the next line of text.
B485 EXX Switch to the shadow registers.
B486 PUSH BC Stash the line counter on the stack.
B487 LD A,(HL) Fetch the X position of the line of text.
B488 INC HL Move onto the position of the next line of text.
B489 INC HL
B48A PUSH HL Stash the position pointer on the stack.
B48B DEC HL Move back to the Y position of the line of text.
B48C LD H,(HL) Set the Y position in H.
B48D LD L,A Set the X position in L.
B48E CALL MenuWriteText Print the line of text.
B491 EXX Switch to the shadow registers.
B492 POP HL Restore the position pointer and the line counter from the stack.
B493 POP BC
B494 INC DE Move onto the next line of text.
B495 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.
B497 RET Return.
Prev: B43E Up: Map Next: B498