Prev: 32812 Up: Map Next: 33021
32977: Game Selection Menu
Used by the routine at Game_Restart.
Draws the seven menu lines and the copyright message.
main-menu
GameMenu 32977 LD DE,33038 Set the attribute table pointer to GameSelection_Attributes.
32980 EXX Switch to the shadow registers.
32981 LD HL,33045 Set the Y position table pointer to GameSelection_Position.
32984 LD DE,33052 Set the message pointer to String_GameSelection.
There are seven lines of text.
32987 LD B,7 Set a line counter in B' for 7 loops.
GameMenu_Loop 32989 EXX Switch back to the normal registers.
32990 LD A,(DE) Copy the line attribute to Current_MenuAttribute.
32991 LD (24166),A
32994 INC DE Move the attribute table pointer on by one.
Fetch the line Y position and print the line.
32995 EXX Switch to the shadow registers.
32996 PUSH BC Stash the line counter on the stack.
32997 LD A,(HL) Fetch the line Y position.
32998 INC HL Move the Y position table pointer on by one.
32999 PUSH HL Stash the Y position table pointer on the stack.
33000 LD H,A Set the print co-ordinate from the Y position and X position 56.
33001 LD L,56
33003 CALL MenuWriteText Call MenuWriteText.
Move on to the next line of text until all seven are printed.
33006 EXX Switch to the shadow registers.
33007 POP HL Restore the Y position table pointer and line counter from the stack.
33008 POP BC
33009 INC DE Move the message pointer on to the next string.
33010 DJNZ GameMenu_Loop Decrease the line counter by one and loop back to GameMenu_Loop until every line is printed.
Print the copyright line.
33012 LD HL,47104 Set the screen position to 47104.
33015 LD DE,33162 Set the message pointer to String_Copyright.
33018 JP PrintStringColour Jump to PrintStringColour.
View the equivalent code in;
Prev: 32812 Up: Map Next: 33021