Wall and door data
Data · Routines · Address index
Wall properties and the wall-to-VMP mapping, door tables and slots, temporary walls and the visible blocks. The data page explains how the entries are written.
DS:0x2178 — Wall-to-VMP mapping
- Layout: one byte per wall reference
- Role: Selects the VMP group drawn for a wall reference: group g
starts at entry 330 + (g − 1) × 431 of the VMP data (
0x35ebytes per group); 0 draws nothing. Entry 46 is DS:0x21a6, switched by0x2467dand0x2468c. - Used by: Wall layouts (VMP) › What it becomes in memory, Wall properties › Built-in references, Faces and drawing order › Which faces are drawn, Screen coordinates, pixel by pixel, Where each face goes on the screen
DS:0x21c8 — Wall decoration selector
- Layout: one byte per wall reference
- Role: Selects the decoration drawn for a wall. In the initial image it
is
0xffonly for wall references 3–7 and 13–17; assigning an INF wall mapping writes 0 (no decoration) or a decoration index (overlay code at file offsets0x4772a–0x4772fand0x478dd–0x478e0). The monster move check sends a face whose selector is0xffto its door branch for a type withMONSTER_CAP_OPENS_DOORS. - Used by: Obstacles and other monsters › The move check, Wall properties › Built-in references
DS:0x2218 — Wall special type
- Layout: one byte per wall reference
- Role: Special type from the level's wall mapping (see
InfWallSpecialType); the record runner rejects values that are zero or negative. - Used by: Wall properties › Built-in references, Open a door, Level 3: reference tables, Level 6: reference tables, Level 1: reference tables › The spider quarter, Level 8: reference tables › Dran Draggore, Level 13: reference tables › The guardian of the labyrinth
DS:0x2268 — Wall properties
- Layout: 80 bytes, one per wall reference (
DS:0x2268–0x22b7, file offset0x305c8), after the three other wall tablesDS:0x2178,DS:0x21c8andDS:0x2218, also 80 bytes each - Role: Holds the
WallRuntimeFlagsof each wall reference. Initial values in the file image: 0 →0x07, 1 → 0, 2 →0x40, door groups 3–7, 8–12, 13–17 and 18–22 →0xa8,0x88,0x88,0x88,0x9f, 23 and 24 →0x03, the rest 0. Written only by the mapping assignment (0x4773d,0x47741) and the wall group toggle (0x4878f,0x48798); never reset or saved. Read with the masks0x01(party step0x1e306,0x1e338; flight step0x27bf0; spell target line0x243db; door path0x253b8),0x03(ranged trace0x1a3f1),0x04(monster moves0x19f9a,0x1a772),0x08(door side and stop, view),0x0b(floor drop ahead0x1c1a2),0x10(scene bounds),0x20(monster doors0x19fc6, door that cannot be forced0x25907),0x30and the door masks ofDS:0x5a2b(door steps), and0x80(object drawing); bit0x40is never tested. Read by the monster move check and the ranged action, among others. Every instruction of the resident image and overlays 244 to 256 with an operand in the four tables was examined; none loads their address as a pointer or copies them as a block, and no pointer to them is stored in the data segment. - Used by: Walls and doors › Faces that the level does not map, Monster behavior modes › How each mode behaves, Obstacles and other monsters › The move check, Toggle walls or a door › Behavior, Wall mapping flags › Bit 6, Wall mapping flags, Wall properties › Built-in references, Wall properties, Values passed on to other routines › The routines, Melee attacks › What stops an attack, The world, Open a door, Level maps, Tools
DS:0x5a2b — Door direction masks
- Layout: bytes indexed by a signed direction
- Role: Gives the door mask for each direction of the
door and wall step: −1, 0 and +1 select
0x20, 0 and0x10. - Used by: Wall mapping flags › Doors, The world
DS:0x5a2d — Door-forcing chances
- Layout: 19 words, indexed by strength 0 to 18: 1, 1, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 10, 11, 12
- Role: A door gives way when 1d20 is at most the word of the character's strength.
- Used by: Interacting with walls › Forcing a door, The world, Tools
DS:0x929c — Door operation slots
- Layout: 3 slots of 3 bytes
- Role: Door operations in progress, started by the
door and wall step and
advanced every 5 ticks until their endpoint. A slot
whose block word is 0 is free, so a door request on block 0 cannot be told
from a free slot (
ANOMALY-148). - Used by: Scripted walls and doors › Doors, Values passed on to other routines › The routines, Scripted walls and doors, The world
DS:0x9346 — Temporary-wall slots
- Layout: 5 slots of 6 bytes: block word (0 = free), deadline dword
- Role: Blocks turned into temporary walls by
Wall of Force (its creator
0x24440is the start routine of spell definition 25) and the counter value at which each disappears. The slots are stored, with the time remaining, in the level record of the level being left or saved, and restored with it. Their only literal accesses are the creator, the expiry routines, the walk-into test at0x1e32aand the two record copies (0x49226,0x49317): nothing resets them when the next level has no record (ANOMALY-71). - Used by: Timed updates › The table of timed updates, Loading, failures and the end of the game › Details and edge cases, Level records and level changes › Level records, Loading, failures and the end of the game, Saved games (SAV), Level records (LEVELS.TMP) › What it becomes in memory, Level 15: reference tables › Insal
DS:0x9446 — Visible blocks
- Layout: 18 words
- Role: The 18 blocks of the current view, written by
0x3d6e0in the order of the view offsets.0x1e245compares a block with the first 15, the blocks ahead of the party. - Used by: Scripted walls and doors › Walls, The dungeon view › The 18 visible blocks, Sound effects