![]() |
Routines |
| Prev: BE45 | Up: Map | Next: BE56 |
|
Used by the routine at display_day.
The game's one text printer. The position is on the stack, the font pointer in $5BC7 selects the glyphs, and each character is an index into that font. The first byte is the attribute for every cell the string covers; the characters follow, and bit 7 marks the last. Glyphs go into the buffer at screen_buffer and the colours straight into attribute memory, one cell per character.
The position is a pixel (x, y) with y counting up from the bottom of the screen, the same convention as the rest of the drawing code, so a string's top edge is at y and it extends eight rows below.
|
||||||||
| print_text | BE4C | POP BC | BC = the position, left on the stack; HL = its buffer address | |||||
| BE4D | PUSH BC | |||||||
| BE4E | CALL calc_vidbuf_addr | |||||||
| BE51 | LD L,C | |||||||
| BE52 | LD H,B | |||||||
| BE53 | LD A,(DE) | the colour byte into A' | ||||||
| BE54 | EX AF,AF' | |||||||
| BE55 | INC DE | |||||||
| Prev: BE45 | Up: Map | Next: BE56 |