Prev: 6288 Up: Map Next: 62F7
62E7: Write Menu Line
Used by the routine at GameMenu.
Prints one line of the game selection menu. This is similar to PrintStringColour, but the attribute comes from Current_MenuAttribute and the text has no attribute byte. It is called with the shadow registers selected, so that HL' and DE' hold the position and the text.
Before
menu-line-before
After
menu-line-after
Input
DE' Pointer to the text
HL' Position (X in L', Y in H')
MenuWriteText 62E7 PUSH HL Stash the position (HL) on the stack.
62E8 CALL ScreenAddress Convert the co-ordinate to a screen address using ScreenAddress.
62EB LD A,($5E21) A=the menu attribute byte from Current_MenuAttribute.
62EE EX AF,AF' Keep the attribute in the shadow AF register.
62EF EXX Switch to the shadow registers.
62F0 POP HL Restore HL from the stack.
62F1 CALL AttributeAddress Convert the co-ordinate to an attribute buffer address using AttributeAddress.
62F4 JP PrintString_Loop Jump to PrintString_Loop to print the text and write the attributes.
Prev: 6288 Up: Map Next: 62F7