Display routines
Routines · Data · Address index
Portraits, bars, icons and shapes, the tile layers of the view, display modes and drivers, text windows and text output. The routines page explains how the entries are written.
0x292ee, 0x29514 — Bars
- Ranges:
0x292ee–0x293b4;0x29514–0x295b9 - Role:
0x292ee(x, y, value, max, width, height, colour, empty colour)frames a bar and fills width × value / max pixels, limiting value to 0 and max, with at least one pixel for a value above 0.0x29514(slot)draws the food bar at (250, 25), 51 × 5 pixels, out of 100, for the selected character while the character panel is open. Its colour isDS:0x5d6fby food: 3 from 33, 5 below 33, 8 below 20. - Used by: Timed updates › Food, Hit-point display
0x293b5 — Hit-point display
- Range:
0x293b5–0x29513 - Role: Argument: a slot. Does nothing unless the character is present (mask 1,
0x293c4) and, with the character panel open, unless it is the selected character. With the "Bar Graphs" option it draws a bar fromhit_points+ 10 out ofhit_points_max+ 10, its colour chosen fromDS:0x5d62by thresholds (0x2944a–0x294c6); otherwise it prints the two numbers with the format atDS:0x5d9b(0x294ce–0x2950b). Display only. - Used by: Change hit points › Behavior, Scripted characters, flags and messages › Characters, Camp menus › The camp menu
0x29b09 — Character portrait and sheet
- Role: Redraws a character's portrait area. Its character sheet part
prints the alignment name selected by
alignment(0x29fd2), the strength text (0x2a0d4) and, through a number formatter, intelligence, wisdom, dexterity, constitution and charisma (0x2a0fa–0x2a18c). Its portrait part draws "Swapping" (DS:0x5dcd) instead of the name when the character is the character being swapped (0x29c10–0x29c30). On the inventory page it prints the first state that applies (0x29dfb–0x29ee4): DEAD (−10 hit points), UNCONSCIOUS (−9 to 0), POISON (SLOW) (CHARACTER_STATUS_POISONEDwithSPELL_EFFECT_SLOW_POISON,0x29e52), POISONED, PARALYZED, PETRIFIED (strings fromDS:0x5dd6). - Used by: Character record › Attributes, Lasting spell effects, Lasting spells › What lasting effects do, Attributes and classes › Attributes, Change hit points › Behavior, Texts, Global script flags
0x2901c — Portrait frame of active spells
- Role: Draws the frame of a character's portrait (63 × 50 pixels at
the portrait position given by
DS:0x5d65andDS:0x5d67) from two tests. The protective test (0x2907c–0x290a9) holds when the character'sspell_effectshas0x4818(Shield, Blur, Protection from Evil, Magical Vestment), its armor reserve+0x145or byte+0x146is nonzero, or the party hasSPELL_EFFECT_MYSTIC_DEFENSE. The other test (0x290b8–0x290d6) holds for the character's0x13000(Aid, Slow Poison, Haste) or the party's0x8420(Prayer, Bless, Detect Invisible). With neither, the ordinary frame is drawn; with the protective test only, a rectangle in colour 6, or 4 under mystic defense (0x29024–0x29040); with the other test only, colour 5; with both, the two colours alternate in 8-pixel dashes (0x291b0–0x292e5). - Used by: Lasting spell effects, Lasting spells › What lasting effects do, Character record › Unused bytes
0x295ba — Draw a character's face
- Range:
0x295ba–0x2973e - Role: Draws the face of a present character at its portrait
position, or, on the inventory page, of the
selected character only. A character at −10 hit points
gets the image addressed by
DS:0xe400instead of its face. Otherwise the face (face_image) is drawn through a colour table chosen in this order, the last match winning:DS:0xeee8forSPELL_EFFECT_INVISIBILITYorSPELL_EFFECT_IMPROVED_INVISIBILITY(0x29654),DS:0xeee4forCHARACTER_STATUS_POISONED,DS:0xee30forCHARACTER_STATUS_PETRIFIED; below 1 hit point the image addressed byDS:0xcb60is drawn over it. - Used by: Lasting spell effects, Lasting spells › What lasting effects do
0x1ea08 — Draw an item icon
- Role: Draws an item's icon; while the party has
SPELL_EFFECT_DETECT_MAGIC(0x1ea23), an item withITEM_RUNTIME_MAGICALis drawn through the colour table addressed byDS:0xcc26. Called, as far call0x0e24:0x07c8, by the inventory drawing at0x1d727and by the portrait hand at0x29a31; the held item has its own test at0x18cde. - Used by: Lasting spell effects
0x2992f — Draw a portrait hand
- Range:
0x2992f–0x29b08 - Role: Draws a hand's item, or the empty-hand image, then marks the
hand unavailable when its
disabled_slotsbit is set, when0x1eaeerefuses it, or when the character has less than 1 hit point or is paralyzed or petrified; a nonzeroslot_statusshows the result label instead. - Used by: The inventory › Two hands
0x2973f — Hand result label
- Role: Draws the result of a hand's last use, kept in
slot_status: through a jump table at analysis address0x29925, −1 MISS (DS:0x5da7), −2 HACK, −3 CAN'T REACH (DS:0x5db6,DS:0x5dbc), −4 NO AMMO, −5 BASH; other values are printed as a number. Called at0x29a14. - Comparative source: REF-SCUMM-018,
gui_drawWeaponSlotStatus. - Used by: Formation › Formation, Texts
0x1941d, 0x1945e, 0x1949f, 0x194e0 — Draw a shape in a window
- Ranges:
0x1941d–0x1945d,0x1945e–0x1949e,0x1949f–0x194df,0x194e0–0x19520; they call0x2da7a–0x2dab9,0x2daba–0x2daf9,0x2dafa–0x2db39and0x2db3a–0x2db79respectively. - Role: Arguments: a word (2 in the view's calls), a shape far
pointer, x, y and a text window whose entry moves the
position. The second routine of each pair returns without drawing when the
shape pointer is null (
0x2da81–0x2da87,0x2dac1–0x2dac7,0x2db01–0x2db07,0x2db41–0x2db47); otherwise it calls0x2dc86when the window differs fromDS:0x6298, adds the originDS:0xefd6,DS:0xefd2and calls a display-driver slot: 18 draws the shape, 39 draws it mirrored, 15 draws it through the replacement colour table and 38 mirrored through that table (VGA driver, EGA driver). Overlay code calls the first two through0x20:0x6adand0x20:0x6ee; the monster drawing picks one of the four from four far pointers atDS:0x049e. The shape drawing routines are two of them. - Used by: Doors, teleporters and temporary walls › Released shapes, Run a sequence › Without a level change, MGA.OVL › Game call sites
0x2aa00 — Fill a colour table
- Range:
0x2aa00–0x2aa30(file offsets0x1dc00–0x1dc30) - Role: Arguments: two far pointers. Copies 16 bytes from the first to
CS:0x3b1and 16 bytes from the second toCS:0x3c1of its code segment (analysis0x2aa31and0x2aa41), the two colour tables that the tile compositor reads (0x2b231,0x2b238). Its only caller is overlay 250 (0x48235), while loading a level. - Used by: Dungeon tiles (VCN) › Organization
0x2b3da, 0x2b50d, 0x33dc4, 0x2b5a8, 0x2b5de, 0x2b77e — Drawing helpers
- Role:
0x2b5a8and0x2b5deread a block and its mask for the EGA branch of the tile drawing, the mask reversed when mirrored.0x2b77e(shape, table)translates the 16-colour table of a shape of format 1 (0x18d32).0x2b3daand0x2b50dcombine the bytes of two tile sources, each optionally mirrored; the branches of the tile drawing for display modes 1 and 0, whose drivers are not in the collection, call them (0x2b157,0x2aed0).0x33dc4steps a 3-byte generator atDS:0x6676and returns a byte; only the vortex drawing uses it (0x234e4,0x235c4), so it does not affect the game's other random numbers. - Used by: Explosion and vortex animations, Display modes, Screen coordinates, pixel by pixel
0x2aa6d — Draw the tile layers
- Range:
0x2aa6d–0x2aac8(dispatch); EGA branch0x2aacc–0x2acf5 - Status: the branches for modes 0 and 1 (
0x2acf8,0x2af10) are not examined:SETUP.EXEcannot select these modes and their drivers are not in the collection. - Role: Draws the 22 × 15 tile layers of the view with
the VCN blocks of the level. The destination is the off-screen buffer
addressed by
DS:0xdf3a, or segment0xa400in the EGA mode. It branches on the display mode: 5 (EGA) to0x2aacc, 0 and 1 to their own branches, any other value, VGA and Tandy included, to the tile compositor. The EGA branch decodes the entry bits as the compositor does, then copies the blocks that the level load stored in video memory (segment0xa800+ block number, 2 bytes per row and plane, rows 80 bytes apart). For an entry drawn over the backdrop it combines the two blocks under the block's transparency mask, reversed when the entry is mirrored (0x2abf2–0x2acd5); a set bit0x8000in that backdrop entry is not removed (0x2ac25–0x2ac3e). The video-card register settings in this branch are not examined. - Comparative source: REF-SCUMM-016,
EoBCoreEngine::drawScene(drawVcnBlocks). - Used by: Screen coordinates, pixel by pixel › From tiles to pixels, Screen coordinates, pixel by pixel › Unusual entry values, Display modes › The three modes, Dungeon tiles (VCN) › Reading the file, Wall layouts (VMP)
0x2b194 — Dungeon tile compositor
- Address:
0x2b194(file offset0x1e394) - Role: Draws VCN tiles in VGA mode from VMP entries: the high bit
selects the foreground, bit
0x4000mirrors the tile and the low 14 bits give the tile index. It walks the 22 × 15 tiles row by row and writes each one 8 pixels to the right of the previous one in a buffer 320 pixels wide. A wall entry of 0 is replaced by the backdrop entry 330 words further, drawn with the backdrop colours; other entries use the wall colours, and an entry with the high bit draws the backdrop tile first. Unusual values: the mirror flag set by a wall entry whose block number is 0 is not cleared before the backdrop entry is read (0x2b1c3–0x2b1ee), so the backdrop is drawn mirrored; an entry0x8000draws no wall part (test at0x2b2c4); bit0x8000of a backdrop entry is shifted out when the block address is computed (0x2b1f4); the block number is not range-checked. Also used for the Tandy mode. - Used by: Dungeon tiles (VCN) › Organization, Wall layouts (VMP) › Reading the file, Screen coordinates, pixel by pixel › From tiles to pixels, Screen coordinates, pixel by pixel › Unusual entry values
0x1889a — Program start-up settings
- Range:
0x1889a–0x18ae4 - Role: Opens
EOSPREFS.DAT(DS:0x1ce3) and reads its three words: the display mode, the sound driver, from which it sets the "Sounds" option, and the mouse preference into a local (0x188e8–0x18947); when the file is missing it prints "Please run SETUP before running The Legend of Darkmoon." and returns to DOS (0x1894f–0x18962). It then sets the display mode withFONT8.FNT(0x18a5a–0x18a6b), starts the sound driver (0x18a76), reads the 768 bytes ofpalette.col(DS:0x1cf0) into the working palette and sets it (0x18a7d–0x18aa6), and sets the mouse control byte from the mouse preference (0x18aa9–0x18ac1). - Used by: Settings (EOSPREFS.DAT) › In brief, Palettes (PAL, EGA, COL) › Reading the file, Images, palettes and fonts, Decoration, door and monster images, Dungeon graphics, Fonts (FNT), Scenes and sequence pictures
0x312db — Set the display mode and load its driver
- Range:
0x312db–0x315d9; jump tables at0x315da(palette, modes 2 to 5) and0x315e2(page segments, modes 0 to 6) - Role: Called only at start-up (
0x18a66). For mode 3, first clears 64,000 bytes at segment0xa000. Unless the mode is 8, it loads the display driver named by the driver names for the mode, through a request atDS:0x6371whose second far pointer is the driver function table. On failure it prints the message atDS:0x6403("Could not load overlay …") with the driver's name and returns 0. After a successful load, and for mode 8, it allocates a buffer for each odd page from 3 to 15 that has a size (0x313aa–0x313f2), then sets the page segments of the mode in the page table atDS:0x62a7: in modes 3 and 6, pages 0 and 1 are0xa000and pages 2, 4 and 6 take the buffers of pages 3, 5 and 7 (0x31453–0x3146b); in modes 0 and 1 the same, with0xb800(0x31402); in modes 4 and 5, pages 0, 2, 4 and 6 are0xa000,0xa400,0xa800and0xac00(0x31439–0x31451); in mode 2, the even pages from 0 to 14 are0xa000to0xae00in steps of0x200(0x31407–0x31431). Unless the mode is 8, it then calls the driver throughDS:0x655a(0x31473) and, when its second argument names a file, it loads that font intoDS:0xf098(0x3147f–0x31495) and installs it (0x314e0); a missing file prints a message and makes it return 0. The start-up calls it at0x18a66with the display mode andFONT8.FNT(far pointerDS:0x1cc4). Before loading the driver, unless the mode is 8, it sets the BIOS video mode of the display mode (0x3130d); the failure paths (0x3136d,0x314a2) put the start-up mode back. In every mode it finally allocates the 768-byte palette buffer atDS:0xf168(0x314e8–0x314ff). Mode 2 copies the 16 bytes atDS:0x638fthere and mode 5 those atDS:0x639f, and each gives them to the driver throughDS:0x65e2; modes 3 and 4 set colour 15 to (63, 63, 63) and set the palette (0x31515–0x3159f). It then saves the drive in use (0x315a2), setsDS:0x638eto 1, which the shutdown tests (0x315a7,0x31604), measures the refresh (0x315ac), seeds the random generator from the clock (0x315b7–0x315c0), selects text window 0 (0x315ca) and returns 1. - Used by: Fonts (FNT) › Reading the file, Display drivers › Loading a driver, MGA.OVL › Pages, XGA.OVL › Pages, Display modes
0x31a9c, 0x31ac3 — Read and set the BIOS video mode
- Range:
0x31a9c–0x31ac2,0x31ac3–0x31b05 - Role:
0x31a9casks the BIOS for the current video mode (AH =0x0fthrough call a software interrupt) and returns it.0x31ac3takes a display mode m: AX is the BIOS mode of m when m is below 9, otherwise the start-up mode; unless it already equals the start-up mode, it is passed to the BIOS (AH = 0, set mode) through interrupt0x10(0x31aed–0x31b00). The start-up (0x316d2) saves the current mode first; the display mode setup sets the mode of the display; the program's exit (0x31636) and several failure paths (0x2d33d,0x2f398) call it with 9 to put the start-up mode back. - Anomaly: the comparison (
0x31adf–0x31aeb) always indexes the table with m, also when m is 9 and the value came from the start-up mode: it then reads the word after the nine entries,DS:0x6500, which is 0 (ANOMALY-121). - Used by: Display modes, Anomalies and bugs
0x16e5e — Call a software interrupt
- Range:
0x16e5e–0x16e8e(with0x16e8f) - Role: Takes an interrupt number and the far addresses of an input and
an output register block, builds the interrupt instruction on the stack
(
0x16ea1–0x16eac) and runs it. The game sets and reads the video mode through it with interrupt0x10;START.EXEholds noint 0x10instruction of its own. - Used by: Read and set the BIOS video mode, Display modes
0x16db5, 0x16ded — Critical-error handler
- Range:
0x16db5–0x16dec,0x16ded–0x16e0f - Role:
0x16dedstores a far callback atDS:0xf2d8and makes0x16db5the handler of interrupt0x24, which DOS raises on a critical error such as a disk that is not ready (0x16dfd–0x16e06, through the set-vector call0x16da4). The handler saves the registers, sets the data segment, calls the callback with the error information and returns its result to DOS. The start-up installs it once (0x31737→0x2f436), with a callback (0x2f421) that records the error code atDS:0xf0fcand calls0x16e2b. That routine does not come back: it leaves the handler, sets the carry flag of the interrupted DOS call and returns to the program (0x16e43–0x16e59), so the call fails with no prompt from DOS. - Anomaly: in the EGA mode, the stray bytes of ANOMALY-80 land at
0x16dbe+ block number, inside this handler and, for block 47, on the first byte of0x16ded(see colour the VCN blocks). - Used by: Display modes, Search the drives for a file
0x310b1 — Select the current page
- Range:
0x310b1–0x310c8 - Role: Stores its argument in the current page
DS:0x62a5, the image page the drawing routines and the display driver work on, and returns the previous one. Many routines also writeDS:0x62a5directly. - Used by: Redraw the play screen, Play the ending, Load a scene
0x310c9 — Set a text window's bounds
- Range:
0x310c9–0x3111c - Role:
0x310c9(window, x, y, width, height)writes the four values into the window's entry of the text window table (+0,+2,+4,+6). When the window is the active one, it selects it again (0x31c33) so that the new bounds take effect. When it is the window installed for shape drawing (DS:0x6298), it installs it again through0x2dc86(0x31113), which sets the shape origin and the driver's shape window (slot 46) from the new bounds. - Used by: Set a text window in 8-pixel units, Load a saved game, Save menu
0x31cf2 — Select and clear a text window
- Range:
0x31cf2–0x31d0e - Role: Selects the window given as argument, then clears it; returns the previously active window.
- Used by: Build and show a menu, Print a text, Fade the text out, Print a text (introduction)
0x31c33 — Select a text window
- Role: Makes its argument the active text window,
copies that window's entry of the table
DS:0x1cfcinto the text output state and returns the previous window's number. Called with 7, the message area, by the game start (0x1cb9d), after a level load (0x272b8), by the rest (overlay 248) and after a dialogue (overlay 252); other callers select another window for a while and restore the previous one. - Used by: The inventory › Moving and equipping items, Dialogue screen
0x31d84 — Text output
- Role: Prints text; messages use it with the
text colour temporarily replaced. Bytes 1 to 31 are
control codes dispatched through a table (
0x31e92–0x31ea3),%introduces adorsargument, and every other byte is buffered atDS:0xf1ecand drawn by the display driver's text routine. Characters are read through0x323b4(0x31dde), which expands every byte from0x80up into two characters before this routine sees it; a zero character ends the output (0x31de7–0x31deb). The control table is at0x3209a(cs:0x59aof segment0x21b0):0x01flushes the line and calls the page-wait routine if one is set (0x31f18);0x02n and0x06n set the background and text colours (0x31f85,0x31f96);0x09and0x13advance to a tab column of 8, by moving the cursor or by padding with spaces (0x31fa7,0x31fd3);0x0cclears the window (0x31d0f);0x0dstarts a new line (0x31f6f);0x18n and0x19n set the cursor column and line, clamped to the window (0x31ea8,0x31ee0);0x08is buffered like a printable byte; the other codes are skipped. The colours are restored when the call ends (0x3206f–0x32085), and the cursor is stored back into the window's entry (0x32055). Lines are output by0x321be. - Used by: Print a message › Behavior, Initial items (ITEM.DAT) › Who uses it, Dialogue screen › Text window and pages, Dialogue texts (TEXT.DAT)
0x323b4 — Read the next text character
- Range:
0x323b4–0x323f8, with0x322f3–0x323b3 - Role: Returns the next character for the text output,
keeping one character ahead in
DS:0xf1e4–0xf1e5.0x322f3takes the next byte of the%sargument string if one is open, otherwise of the main string. A byte with bit 7 set is replaced by two characters: entry (c >> 3) & 15 of a 16-byte table atDS:0x71af, then entry c &0x7fof a 128-byte table atDS:0xe445(0x32364–0x3239d). Both tables hold zeros in the executable image, and a zero first character counts as no character. With both tables empty, such a byte gives no character: one that follows an ordinary character is skipped (look-ahead refill,0x323e6), while one at the start of the text or right after another such byte gives a zero character (refill at the start of the call,0x323c1), which ends the text, and one at the start of a%sargument gives a zero character that hides the rest of the line. Nothing fills the tables with the original data. No original INF message contains such a byte. - Used by: Initial items (ITEM.DAT) › Who uses it
0x321be — Output a line of text
- Range:
0x321be–0x322f2 - Role: Draws the buffered characters of the text output on
the current line of the active window. While the cursor line is below the
window it first calls the page wait. The room on the line is
the window's width in characters, less
DS:0x650c(7) when page waits are on and the page already has lines − 3 or more lines (0x32211–0x32227). When the buffer does not fit, it cuts after the last space at or before the room left (0x32245–0x32264); with no space it moves everything to the next line, or, at the start of a line, cuts at the edge. It drops one or two spaces at the cut (0x32298–0x322a6), then starts a new line and repeats while characters remain (0x322db–0x322ea). The text output calls it at each control code, at the end of the text and when the buffer passes the right edge by more than one character (0x32026). - Used by: Dialogue screen › Text window and pages
0x320d8 — Page wait and scroll
- Range:
0x320d8–0x321bd - Role: When page waits are on and the page holds at least
lines − 1 lines (
DS:0x6502,0x320dd–0x320ec), resets that count and calls the page-wait routine (0x3211d). It then scrolls the window up by one line through the page copy0x2d92aand fills the last line with the background colour (0x321b3). - Used by: Dialogue screen › Text window and pages
0x31c19, 0x31c29 — Turn page waits on and off
- Role:
0x31c19sets the page-wait switchDS:0x62a0and clears the count of lines since the last wait (DS:0x6502);0x31c29clears the switch.0x31c29runs at the game start (0x18aed), after a level load (0x272af), in the non-player character sequence (0x4b18c) and in the dialogue restore (0x4b32a);0x31c19is called only by the dialogue text window setup. - Used by: Dialogue screen › Opening and closing the screen, Dialogue screen › Edge cases and unknowns
0x31d0f — Clear the text window
- Role: Fills the active window with its background colour through
driver slot 22 (
DS:0x657a,0x31d52) and resets the cursor and the count of lines since the last wait. - Used by: Dialogue screen › Opening and closing the screen
0x308c5 — Load a font
- Range:
0x308c5–0x3095b - Role:
0x308c5(name, n)finds the file through the file search and opens it, reads its first word, allocates a zeroed block of that many bytes (flag0x10), reads as many bytes at block- 2 (
0x30940) and closes the file. It returns the block, or null when the file does not open or the word cannot be read; n is not used (ANOMALY-142). The start-up loadsFONT6.FNTwith n = 6 (0x18b27) and the display mode setupFONT8.FNTwith n = 8 (0x31489).
- 2 (
- Used by: Fonts, Images, palettes and fonts, Decoration, door and monster images, Dungeon graphics, Scenes and sequence pictures, Anomalies and bugs
0x19752, 0x19785, 0x31078, 0x3060e — Centre and draw a number
- Role:
0x3060e(int, x, y, colour, background)draws an int in decimal.0x19752(long)and0x19785(int)return the decimal digits of the number × 3, half its width in the 6-pixel font.0x31078(long, x, y, colour, background)draws a long in decimal. The character sheet centres each class's experience on x = 247 and its level on x = 286 with them (0x2a250–0x2a291). - Used by: Character portrait and sheet
0x2a37f — Grow the active text window
- Range:
0x2a37f–0x2a3d5 - Role:
0x2a37f(n)moves the active window left by n columns and up by 8n pixels, adds 2n columns and 16n pixels to its size, reselects it and clears the cursorDS:0xf094,DS:0xf096. The disk prompt calls it for its box (0x2a4e5,0x2a57c). - Used by: Disk prompt
0x31b06, 0x31bd3 — Page wait
- Ranges:
0x31b06–0x31bd2;0x31bd3–0x31c18 - Role:
0x31b06is the default page wait: it prints<MORE>and waits for a key or a mouse press.0x31bd3sets the prompt and its width, or restores the default with a null pointer; no caller is known. - Used by: Page waits
0x33d2d, 0x33cda — Load a display driver
- Role: Load the driver file of the display
mode:
0x33cdaallocates the block and loads the file,0x33d2d(0x3134c) places it and installs it. - Used by: Display drivers › Loading a driver
0x3166a — Install a font
- Range:
0x3166a–0x316d1 - Role: Returns the current font and, unless its argument is null, makes
the argument the current font, copies its character
advance (font byte
+0x103) toDS:0x6288and its line height (+0x102) toDS:0x6289, and recomputes the active window's lines and columns. The start-up loadsFONT6.FNTintoDS:0x9342(0x18b22–0x18b33) and the game start installs it (0x1cb76);FONT8.FNT, kept atDS:0xf098, is installed by the display mode setup and again by the two-choice question, the defeat sequence, the ending and a few other routines. The dialogue routines do not call it. - Used by: Dialogue screen › Text window and pages, Fonts (FNT) › Reading the file
0x19678 — Print shadowed text
- Range:
0x19678–0x196e9 - Role:
0x19678(text, x, y, colour, background)draws the text four times through driver slot 52: in colour 12 at (x − 1, y) with the given background, at (x, y +- and at (x − 1, y + 1) without background, then in colour at (x, y). The text thus has a colour-12 shadow on its left and below it.
- Used by: Draw a menu button, Draw a spell-list line, Draw a slot button, Show the entering message
0x192e1, 0x2d9e0 — Rectangle outline
- Range:
0x192e1–0x19337,0x2d9e0–0x2da36 - Role:
0x192e1(x1, y1, x2, y2, colour)draws the four edges of the rectangle through driver slot 17 (DS:0x6566): top, bottom, left, right.0x2d9e0takes the same arguments and draws the same four lines in the same order; it is the one used by highlight a box frame and by the character panel and the mouse-cursor code (0x2a4d8,0x3033c–0x305b4). - Used by: Race, class and alignment menus
0x1e78e — Highlight a box frame
- Range:
0x1e78e–0x1e8c5 - Status: that the frame appears to pulse is inferred from its colour list.
- Role:
0x1e78e(frame)keeps one highlighted frame inDS:0x54fc(−1 for none). The frames are rectangles of 8 bytes (x1, y1, x2, y2) atDS:0x545c: frames 6 to 9 are the four boxes of the party creation screen, 10 to 13 the four portraits of its portrait menu and 14 to 19 the six boxes of the party transfer screen. A different frame, or −1, redraws the old frame in colour 12 (0x2d9e0) and makes the new one current, restarting its colour list (stepDS:0x54feset to 0,0x1e7f3). The same frame again is drawn, once per tick of the free-running counter (next time inDS:0xef30), in the colour of stepDS:0x54feof the zero-terminated list atDS:0x23cc(15, 176, 178 … 188, 12, 188 … 176), which then starts over. - Comparative source: REF-SCUMM-017,
updateBoxFrameHighLight. - Used by: Move the selection highlight, Choose a portrait, Redraw a box, Highlight the first portrait, Transferring a party from Eye of the Beholder I › Transferring a party from Eye of the Beholder I, Transfer: spells and items
0x2d92a — Copy a page area
- Range:
0x2d92a–0x2d9b2 - Role:
0x2d92a(x, y, to x, to y, width, height, from page, to page)copies a rectangle between two image pages, x and width in 8-pixel columns, y and height in pixels, through driver slot 13 (DS:0x6556). It limits the width to 40 columns and the height to 200 rows, moves a negative source or destination edge to 0 while shrinking the area, and copies nothing when either x is 40 or more. The right and bottom edges are not clipped here. - Used by: Choose a slot, Show the work page, Scroll the credits, Show a character's figure, Page wait and scroll, MGA.OVL › Game call sites, Dialogue screen
0x1edc8 — Rebuild the play screen
- Range:
0x1edc8–0x1edfb - Role: Loads the level's VCN file
again (
0x2ae3:0x48, arguments 0, 0), sets the current page to 0, hides the pointer, redraws the play screen with the view (argument 1), redraws every portrait and shows the pointer. Called as0xe24:0xb88from the monster-resource form of opcode0xec(0x27354) and from overlay 252 at the end of the character sequence (0x4b196) and of a dialogue (0x4b341). - Used by: Redraw the play screen, Load a level or monster resources
0x1990a — Wait, then wait for input
- Range:
0x1990a–0x19955 - Role: Busy-waits n × 18 ticks of the free-running counter (n the argument), empties the input queue, waits until an input event is queued, then empties the queue again. The parchment reader calls it with 0 after showing a map.
- Used by: Read a parchment
0x1ecf2 — Draw a button box
- Range:
0x1ecf2–0x1ed9a - Role:
0x1ecf2(x, y, width, height, flat, hollow)hides the mouse and draws two nested framed boxes. The outer one, one pixel wide on each side, has its top and right edges in the light colourDS:0xeef0and its left and bottom edges in the dark colourDS:0xe5c2, or both in the interface colourDS:0xe606when flat is non-zero; the inner one, one pixel in, always uses the light and dark colours and is filled with the interface colour unless hollow is non-zero. Then it shows the mouse. Menus of the overlays, the message box and the slot menus draw their buttons with it; the message box shows its pressed button by redrawing it with flat and hollow set. - Used by: Message with one button, Draw a slot button
0x197b5 — Draw a framed box
- Role: Arguments: corners (x1, y1, x2, y2) and three colours. Fills the inside with the third colour unless it is −1 (driver slot 22), then draws the top and right edges in the first colour and the left and bottom edges in the second (driver slot 17).
- Used by: Dialogue screen › Opening and closing the screen, Dialogue screen › Opening and closing the screen, Transferring a party from Eye of the Beholder I, Transfer: spells and items