Prev: 5F6C Up: Map Next: 5FA7
5F97: Write Menu Line
Used by the routines at GameMenu, GameOver, HandlerCup and DisplayBestTime.
Prints a line of text and sets the attributes for it. The last character of the text has bit 7 set. The attribute is held at Current_MenuAttribute.
Before After
write-menu-line-before write-menu-line-after
Input
HL Pixel co-ordinates (H is the Y position, L the X position)
DE Pointer to the text
MenuWriteText 5F97 PUSH HL Stash the text position on the stack.
5F98 CALL ScreenAddress Convert the text position to a screen address using ScreenAddress.
5F9B LD A,($5E3F) Fetch the colour of the line from Current_MenuAttribute.
5F9E EX AF,AF' Hold the colour in A' ready for the string printer.
5F9F EXX Switch to the shadow registers.
5FA0 POP HL Restore the text position from the stack.
5FA1 CALL AttributeAddress Convert the text position to an attribute address using AttributeAddress.
5FA4 JP PrintString_Loop Jump to PrintString_Loop to print the text and set the attributes.
Prev: 5F6C Up: Map Next: 5FA7