![]() |
Routines |
| Prev: C28A | Up: Map | Next: C2C4 |
|
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.
|
||||||||||||
|
Choose the characters and colour for the way the view faces.
|
||||||||||||
| DrawCompassText | C29A | PUSH DE | Stash DE on the stack. | |||||||||
| C29B | LD A,($BBBA) | Fetch the flag that tells whether the view is turned round. | ||||||||||
| C29E | AND $01 | Jump to DrawCompassText_Rotated if the view is turned round. | ||||||||||
| C2A0 | JR NZ,DrawCompassText_Rotated | |||||||||||
| C2A2 | LD HL,$7AAF | Point at the characters for the normal view. | ||||||||||
| C2A5 | LD A,$45 | Use bright cyan ink (attribute 45). | ||||||||||
|
Print the four characters of the compass text.
|
||||||||||||
| DrawCompassText_Draw | C2A7 | EX AF,AF' | Stash the colour on the stack. | |||||||||
| C2A8 | LD ($BBAC),HL | Set the font to the compass characters. | ||||||||||
| C2AB | LD HL,$50DB | Set the screen position of the compass text to 50DB (in the screen buffer). | ||||||||||
| C2AE | LD DE,$C2C4 | Point at the list of four characters. | ||||||||||
| C2B1 | LD B,$04 | Set a counter for the four characters. | ||||||||||
| DrawCompassText_Loop | C2B3 | LD A,(DE) | Print a character of the compass text, and loop back until all four have been printed. | |||||||||
| C2B4 | INC DE | |||||||||||
| C2B5 | CALL PrintCharacterWithAttribute | |||||||||||
| C2B8 | INC L | |||||||||||
| C2B9 | DJNZ DrawCompassText_Loop | |||||||||||
| C2BB | POP DE | Restore DE from the stack and return. | ||||||||||
| C2BC | RET | |||||||||||
|
Use the characters and colour for the turned view.
|
||||||||||||
| DrawCompassText_Rotated | C2BD | LD HL,$7ACF | Point at the characters for the turned round view. | |||||||||
| C2C0 | LD A,$43 | Use bright magenta ink (attribute 43). | ||||||||||
| C2C2 | JR DrawCompassText_Draw | Jump to DrawCompassText_Draw to print the compass text. | ||||||||||
| Prev: C28A | Up: Map | Next: C2C4 |