Prev: 46256 Up: Map Next: 46397
46381: Write Menu Line
Used by the routine at GameMenu.
Prints a line of text with an attribute, for the game selection menu and the hall of fame. The shadow registers hold the text pointer (DE') and the screen address (HL'), and the normal registers hold the attribute address (HL). The attribute is taken from Current_MenuAttribute. Printing is done by the code in PrintStringColour.
Before
menu-line-before
After MenuWriteText
menu-line-after
Input
HL Position of the text, with the Y position in H and the X position in L (both in pixels)
DE' Pointer to the text, which ends with a character that has bit 7 set
MenuWriteText 46381 PUSH HL Stash the position of the line of text on the stack.
46382 CALL ScreenAddress Convert the position into a screen address.
46385 LD A,(38568) Fetch the attribute of the line of text from Current_MenuAttribute.
46388 EX AF,AF' Stash the attribute in the shadow AF register.
46389 EXX Switch to the shadow registers.
46390 POP HL Restore the position of the line of text from the stack.
46391 CALL AttributeAddress Convert the position into an attribute address.
46394 JP PrintString_Loop Jump to PrintString_Loop to print the line of text.
Prev: 46256 Up: Map Next: 46397