Skip to main content

Wall references with built-in effects

SpecialWallReference · byte, a value of wall_references in LevelBlockRuntime and of the MAZ cells

The dungeon view · The game clock · The world

Most wall references get their look and properties from the level's INF wall mappings. Four references are also recognized by the game's code, whatever the level: a block side holding one of them gets extra drawing or extra rules. A search of every comparison of a wall with a fixed value found no other.

/* Wall references that the game's code treats specially (EOB II DOS). */
typedef enum SpecialWallReference {
WALL_REFERENCE_CLEARED_ON_ENTRY = 26, /* On its north side: the block's four sides are cleared when the party enters. */
WALL_REFERENCE_TELEPORTER = 44, /* Animated sparkles drawn in the block (teleporter: inferred name). */
WALL_REFERENCE_ILLUSION = 46, /* Not drawn while True Seeing lasts. */
WALL_REFERENCE_TEMPORARY_WALL = 74 /* Wall of Force: removed when the party walks into it, or when it expires. */
} SpecialWallReference;

What each one does​

  • WALL_REFERENCE_CLEARED_ON_ENTRY. When the party moves into a block whose north side (side 0) holds this reference, the game sets the four sides of the block to 0, so the block no longer has walls. Only side 0 is tested. See in the original levels below for what this reference is used for.
  • WALL_REFERENCE_ILLUSION. The start routine of True Seeing sets the VMP group of this reference to 0, which stops it from being drawn, and its end routine sets it back to 1, so the wall vanishes from view while the spell lasts. Its passage rules are not changed.
  • WALL_REFERENCE_TELEPORTER. When the front face of a visible block, the side turned towards the party, holds this reference, the view draws two layers of 13 small sparkle shapes in the block, at positions that depend on its distance. The periodic wall animation swaps the two sparkle shapes, so the sparkles shimmer. See teleporters.
  • WALL_REFERENCE_TEMPORARY_WALL. The start routine of Wall of Force sets all four sides of the block ahead to this reference when it creates a temporary wall, and resets them to 0 when the wall expires. A party step into such a block removes the wall and lets the party through (moving the party), but only when one of the five temporary-wall slots holds the block: a face given this reference by the map or a script has no slot and stops the party, as level 15's barriers do. The view draws it as a grid of shimmering shapes; see temporary walls. The start routine of Disintegrate, after acting on a monster in front of the party, also clears the four sides of the block ahead when its front face is a temporary wall; it does not free the temporary wall's slot.

The periodic wall animation runs every 10 ticks and redraws the view only when one of the 18 visible blocks shows a teleporter or a temporary wall (timed updates).

The cleared-on-entry reference in the original levels​

What the designers meant the barrier for is not recorded anywhere and is not claimed here.

Every original level that uses reference 26 maps it the same way: VMP group 0, which draws nothing, no decoration, no special action, and INF flags 0x07, so at run time the reference has WALL_RUNTIME_PASSAGE and WALL_RUNTIME_SMALL_PROJECTILE_PASSAGE but not WALL_RUNTIME_MONSTER_PASSAGE (InfWallMappingFlags, WallRuntimeFlags). It is therefore an invisible side that the party and flying objects cross, but that no monster can cross: a move into a block tests the destination's side turned toward the mover, for the party and for monsters alike.

In the maps, reference 26 always fills all four sides of a block. 72 blocks are built this way, in levels 1, 2, 3, 6, 7, 8, 9, 11, 12 and 14 (none in levels 4, 5, 10, 13 and 15; level 16 uses the level 15 map). Most of them are corridor or room blocks with two or three open neighbours. Such a block keeps monsters out until the party first walks into it, or is moved into it: the party-move routine then sets its four sides to 0, an ordinary open floor, and monsters can enter from then on. The cleared sides are part of the level's walls, so they stay cleared after the party leaves the level, and in a saved game.

Scripts also write the reference: level 7 sets the walls of [23:07] to it, and level 9 sets [26:28] and [26:30] to it, then to 0, in one sequence. Positions are written [XX:YY], column then row, with block = YY × 32 + XX.

Sources​

Locations refer to the game executable reference; comparative sources are listed in the technical references.

The party move; the True Seeing routines; the Disintegrate start, with the initial definition table; the object pass, which calls the teleporter drawing and the temporary-wall drawing; the temporary walls; the step test; the timed-callback handlers. The use of reference 26 comes from the wall mappings of the 16 INF files, the cells of the 15 MAZ files and the decoded level scripts; see saving and restoring for the walls kept in a level's record. Comparative sources: drawTeleporter, drawWallOfForce, _teleporterWallId and EoBCoreEngine::moveParty in REF-SCUMM-016; spellCallback_start_trueSeeing and spellCallback_end_trueSeeing (engine/magic_eob.cpp) in REF-SCUMM-013.