![]() |
Routines |
| Prev: BC8B | Up: Map | Next: BCE5 |
|
Used by the routine at MENU.
Hands DISPLAY_TEXT_LIST, at the end of this routine, the menu's seven colours (MENU_COLOURS), positions and strings. Called at the start of the menu and on every pass of its loop (MENU).
|
||||
| DISPLAY_MENU | BCB4 | LD DE,MENU_COLOURS | DE' = the colours | |
| BCB7 | EXX | |||
| BCB8 | LD HL,MENU_XY | HL = the positions, MENU_XY | ||
| BCBB | LD DE,MENU_TEXT | DE = the strings, MENU_TEXT | ||
| BCBE | LD B,$07 | seven lines | ||
|
This entry point is used by the routine at WON.
Print a list of strings. B how many; DE' their colours, a byte each; HL their positions, an (x, y) pair each; DE the strings, end to end. Also used by WON.
|
||||
| DISPLAY_TEXT_LIST | BCC0 | EXX | this string's colour into PRINT_ATTR, for PRINT_TEXT_SINGLE_COLOUR | |
| BCC1 | LD A,(DE) | |||
| BCC2 | LD (PRINT_ATTR),A | |||
| BCC5 | INC DE | |||
| BCC6 | EXX | |||
| BCC7 | PUSH BC | L = x, H = y; HL moved on to the next pair and kept | ||
| BCC8 | LD A,(HL) | |||
| BCC9 | INC HL | |||
| BCCA | INC HL | |||
| BCCB | PUSH HL | |||
| BCCC | DEC HL | |||
| BCCD | LD H,(HL) | |||
| BCCE | LD L,A | |||
| BCCF | CALL PRINT_TEXT_SINGLE_COLOUR | print it, and loop | ||
| BCD2 | POP HL | |||
| BCD3 | POP BC | |||
| BCD4 | DJNZ DISPLAY_TEXT_LIST | |||
| BCD6 | LD A,(FRAME_DRAWN) | the first list since the screen-shown flag (FRAME_DRAWN) was cleared... | ||
| BCD9 | AND A | |||
| BCDA | RET NZ | |||
| BCDB | INC A | ...sets it... | ||
| BCDC | LD (FRAME_DRAWN),A | |||
| BCDF | CALL PRINT_BORDER | ...draws the border (PRINT_BORDER) and shows the whole buffer (SHOW_BUFFER); later lists only redraw into the buffer and write the attributes, which is how the menu's flashing line changes without the screen being redrawn | ||
| BCE2 | JP SHOW_BUFFER | |||
| Prev: BC8B | Up: Map | Next: BCE5 |