Prev: 49802 Up: Map Next: 49860
49818: Draw Compass Text
Used by the routines at StartGame and CheckRotateKey.
Draws the four characters of the compass text in the status panel, using one set of characters when the view is the normal way round and another set when the view has been rotated by half a turn.
Normal view Rotated view
compass-text-normal compass-text-rotated
Input
DE Preserved
Choose the characters and colour for the way the view faces.
DrawCompassText 49818 PUSH DE Stash DE on the stack.
49819 LD A,(48058) Fetch the flag that tells whether the view is turned round.
49822 AND 1 Jump to DrawCompassText_Rotated if the view is turned round.
49824 JR NZ,DrawCompassText_Rotated
49826 LD HL,31407 Point at the characters for the normal view.
49829 LD A,69 Use bright cyan ink (attribute 69).
Print the four characters of the compass text.
DrawCompassText_Draw 49831 EX AF,AF' Stash the colour on the stack.
49832 LD (48044),HL Set the font to the compass characters.
49835 LD HL,20699 Set the screen position of the compass text to 20699 (in the screen buffer).
49838 LD DE,49860 Point at the list of four characters.
49841 LD B,4 Set a counter for the four characters.
DrawCompassText_Loop 49843 LD A,(DE) Print a character of the compass text, and loop back until all four have been printed.
49844 INC DE
49845 CALL PrintCharacterWithAttribute
49848 INC L
49849 DJNZ DrawCompassText_Loop
49851 POP DE Restore DE from the stack and return.
49852 RET
Use the characters and colour for the turned view.
DrawCompassText_Rotated 49853 LD HL,31439 Point at the characters for the turned round view.
49856 LD A,67 Use bright magenta ink (attribute 67).
49858 JR DrawCompassText_Draw Jump to DrawCompassText_Draw to print the compass text.
Prev: 49802 Up: Map Next: 49860