![]() |
Routines |
| Prev: BC1C | Up: Map | Next: BC56 |
|
Used by the routine at MENU.
Hands DISPLAY_TEXT_LIST, the rest of this routine, the menu's eight colours (MENU_COLOURS), positions and strings. Called at the start of the menu and on every pass of its loop (MENU).
|
||||
| DISPLAY_MENU | BC25 | LD DE,MENU_COLOURS | DE' = the colours | |
| BC28 | EXX | |||
| BC29 | LD HL,MENU_XY | HL = the positions, MENU_XY | ||
| BC2C | LD DE,MENU_TEXT | DE = the strings, MENU_TEXT | ||
| BC2F | LD B,$08 | eight lines | ||
|
This entry point is used by the routines at GAME_ENDED and ARRIVAL_SCREEN.
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 the summary (GAME_ENDED) and the arrival screen (ARRIVAL_SCREEN).
|
||||
| DISPLAY_TEXT_LIST | BC31 | EXX | this string's colour into PRINT_ATTR, for PRINT_TEXT_SINGLE_COLOUR | |
| BC32 | LD A,(DE) | |||
| BC33 | LD (PRINT_ATTR),A | |||
| BC36 | INC DE | |||
| BC37 | EXX | |||
| BC38 | PUSH BC | L = x, H = y; HL moved on to the next pair and kept | ||
| BC39 | LD A,(HL) | |||
| BC3A | INC HL | |||
| BC3B | INC HL | |||
| BC3C | PUSH HL | |||
| BC3D | DEC HL | |||
| BC3E | LD H,(HL) | |||
| BC3F | LD L,A | |||
| BC40 | CALL PRINT_TEXT_SINGLE_COLOUR | print it, and loop | ||
| BC43 | POP HL | |||
| BC44 | POP BC | |||
| BC45 | DJNZ DISPLAY_TEXT_LIST | |||
| BC47 | LD A,(TEXT_SHOWN) | the first list since TEXT_SHOWN was cleared... | ||
| BC4A | AND A | |||
| BC4B | RET NZ | |||
| BC4C | INC A | ...sets it... | ||
| BC4D | LD (TEXT_SHOWN),A | |||
| BC50 | 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 lines change without the screen being redrawn | ||
| BC53 | JP SHOW_BUFFER | |||
| Prev: BC1C | Up: Map | Next: BC56 |