Wall layouts (VMP)
File formats · Field reference · Schema
In brief
A VMP file tells the game how to assemble the walls of the 3D view from the blocks of the matching VCN file. It is a long list of 16-bit entries; each entry picks one block and says whether to mirror it and whether to draw it over the backdrop. It is not a map of the level.
There are five VMP files, one per dungeon style, with the same names as the
VCN files: CRIMSON, DUNG, FOREST, MEZZ and SILVER. Unlike VCN files,
they are not compressed. What each one holds and which levels use it is listed
under dungeon graphics.
Organization
The file is a count followed by that many entries. Most of an entry's bits give a block number in the VCN file, 0 standing for the backdrop; the two top bits ask for the block to be mirrored left to right and to be drawn over the backdrop block. The field reference gives the exact bits.
The file starts with 330 entries for the floor and ceiling backdrop, 22 × 15 tiles covering the whole view. One group of 431 entries per wall graphic follows, two or six groups in the original files. Each wall reference of the level map selects a group through a per-level table. The backdrop is taken from the entries before the group of wall reference 1, which no level remaps: it is always the first 330 entries (details).
Reading the file
The level's INF file names the wall layouts with the tile set; the game already uses the entries while it loads the level, to colour the backdrop blocks in EGA mode.1 The routine that reads the file is unknown: no entry of the executable reference covers it yet.
What it becomes in memory
Each level's wall mappings fill a per-level table from wall references to groups, which True Seeing also changes.2 Drawing the view copies entries into the scene; a group is cut into nine rectangles of tiles, one for each place where a wall can appear in the view: the front views at one, two and three steps ahead and the left-side views; the right side of the view reuses the left-side rectangles, mirrored. Where each face goes on the screen lists the nine rectangles and where each one is drawn.2 An entry of zero leaves that tile of the view unchanged. When the game draws a wall area mirrored, it reverses each row of the area and toggles the mirror bit of every nonzero entry.2 When it draws over the backdrop, a wall pixel whose colour is 0 lets the backdrop show through.1 The EGA mode reads the entries the same way but takes a block's colours and transparency from what was prepared when the level was loaded (display modes). Combinations that no original file uses, such as a flag on block 0, have the results listed under unusual entry values.
In the original files
The entries of the five files, counted by kind, are listed under dungeon graphics.
Example
FOREST.VMP holds 1,192 entries (a8 04): 330 for the backdrop and two
groups of 431. Four entries from the start of its first group, at file offset
0x0296 (entry 330), the beginning of the side view of the party's row:
bytes entry meaning
4c 01 0x014c block 332
4d 81 0x814d block 333, drawn over the backdrop
4e 81 0x814e block 334, drawn over the backdrop
68 01 0x0168 block 360
Related pages
- Dungeon tiles (VCN): the blocks and colour tables.
- Level maps (MAZ) and level data (INF): how a wall reference chooses its graphics.
- The dungeon view: where each part of a group is drawn.
- The world.
Sources
Locations refer to the game executable reference;
comparative sources are listed in the technical references
(REF-MW-005, REF-SCUMM-006,
REF-SCUMM-010). The files are identified in
the file inventory.