Prev: 24428 Up: Map Next: 24487
24471: 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 24471 PUSH HL Stash the text position on the stack.
24472 CALL ScreenAddress Convert the text position to a screen address using ScreenAddress.
24475 LD A,(24127) Fetch the colour of the line from Current_MenuAttribute.
24478 EX AF,AF' Hold the colour in A' ready for the string printer.
24479 EXX Switch to the shadow registers.
24480 POP HL Restore the text position from the stack.
24481 CALL AttributeAddress Convert the text position to an attribute address using AttributeAddress.
24484 JP PrintString_Loop Jump to PrintString_Loop to print the text and set the attributes.
Prev: 24428 Up: Map Next: 24487