Wall mapping flags
InfWallMappingFlags · 1 byte, flags_raw of a wall mapping in INF
Wall properties · Wall interaction types · The engine in ten minutes
A level's INF file assigns properties to the kinds of wall it uses. Each wall mapping updates one wall reference, and this byte gives that wall's flags: whether the party and flying objects pass, whether small projectiles fly through, whether monsters are kept out, whether it is a door and in which state, and whether objects behind the wall are drawn.1
typedef enum InfWallMappingFlags {
INF_WALL_PASSAGE = 0x01, /* The party, flying objects and ranged traces pass. */
INF_WALL_SMALL_PROJECTILE_PASSAGE = 0x02, /* Lets qualifying physical projectiles through. */
INF_WALL_SUPPRESS_MONSTER_PASSAGE = 0x04, /* Clears the runtime monster-passage bit. */
INF_WALL_DOOR = 0x08, /* A door, not a solid face; selects the door faces. */
INF_WALL_DOOR_OPEN_ENDPOINT = 0x10, /* The open state of a door; an opening door stops here. */
INF_WALL_DOOR_CLOSED_ENDPOINT = 0x20, /* The closed state of a door; a closing door stops here. */
INF_WALL_BIT_6_UNKNOWN = 0x40, /* Never tested by the game. */
INF_WALL_SHOW_BLOCK_OBJECTS = 0x80 /* Allows drawing the objects behind a mapped wall. */
} InfWallMappingFlags;
From the file to the game
The loader copies the byte into the wall properties
table and inverts INF_WALL_SUPPRESS_MONSTER_PASSAGE; the other bits keep their
recorded value. A clear INF_WALL_SUPPRESS_MONSTER_PASSAGE therefore gives the
wall WALL_RUNTIME_MONSTER_PASSAGE, and a set one removes it. The monster
still has to pass the rest of the move check.
The door records can later change INF_WALL_SMALL_PROJECTILE_PASSAGE on door
references; nothing else changes the runtime value. The mapping stays in
force after the level is left, until another level maps the same reference;
see lifetime of the table. The original INF
files map references 25 to 74 only.1
Projectiles
INF_WALL_SMALL_PROJECTILE_PASSAGE lets a physical flying item advance through
the wall when its icon's shape-map entry is at least 15, even if
INF_WALL_PASSAGE is clear. The first step of a flight has another
exception. Magic flying objects take a different branch and do not get this
exception. The bit also lets a monster's ranged attack through; see
ranged attacks.2
Doors
INF_WALL_DOOR_OPEN_ENDPOINT marks where an opening door stops, and
INF_WALL_DOOR_CLOSED_ENDPOINT where a closing door stops: the door's wall reference
advances through successive values until it reaches an endpoint. Both flags
also stop an active door operation. A wall with the opening flag skips a
vertical door-clipping calculation when the scene is drawn. The closing flag
also lets a monster that opens doors use a closed door's switch, and makes a
door that cannot be forced refuse a click with "No one is able to pry this
door open.". These behaviors apply only where the surrounding code selects a
door path.3
Drawing
When a wall has a nonzero graphics mapping, INF_WALL_SHOW_BLOCK_OBJECTS lets
the drawing code continue to the block's items and flying objects. It is one
condition among others, not a guarantee that an object is visible.4
Bit 6
INF_WALL_BIT_6_UNKNOWN has no effect: no access to the runtime table tests
it. No original INF mapping sets it; the executable's initial data sets it
for wall reference 2, which therefore behaves like reference 1. An editor
should preserve it.5
Wall interactions use a separate interaction type
and a separate event mask:
BLOCK_EVENT_WALL_DECORATION has the same value as
INF_WALL_BIT_6_UNKNOWN but is not this bit. The
decoration handlers can start a script after their hit check without testing
it.5
Sources
Locations refer to the game executable reference.