Skip to main content

Wall and door routines

Routines · Data · Address index

Doors and their switches, temporary walls, clicks on walls, and the walls that True Seeing and Disintegrate change. The routines page explains how the entries are written.

0x1e245 — Redraw if a block is in view​

0x24440, 0x243fc, 0x280ce — Temporary walls​

0x2467d, 0x2468c — Start and end True Seeing: switch wall-to-VMP entry 46​

0x24595 — Start Disintegrate​

0x24fc8 — Hit test of a wall click​

0x250c9 — Door and wall step​

0x252e6, 0x252f9, 0x25326 — Door operation wrappers​

0x25384 — Door side test​

0x253dc — Force a door​

  • Range: 0x253dc–0x25567
  • Role: The handler of INF_WALL_SPECIAL_FORCE_DOOR, cell 4 of the handler cells (DS:0x5a85). Arguments: block and face. It tests the click against the rectangle (40, 16)–(136, 88) (0x253f3) and returns 0 when the click falls outside and the record gate is the click value 0x40 (0x253ff). It keeps one of the slots 0–5 that pass the eligibility test with mask 0x0d (0x25415): the one with the highest strength, the last on a tie, because the comparison at 0x25425–0x25469 reads the exceptional strength of the kept character on both sides (0x2543d, 0x2545e, ANOMALY-141). With no such slot it only formats "You are not capable of forcing the door." (DS:0x5b2b) into DS:0xf16e (0x25486) and never prints it (ANOMALY-140). Otherwise it caps strength at 18 (0x254a2) and rolls 1d20 (0x254b6): the door gives way when the roll is at most the chance of that strength (0x254c3). On success it prints "You force the door." (DS:0x5b55, 0x254d1), sets the face and the opposite face to reference 8 when the face holds 51, to 18 otherwise (0x254e6–0x2553e), and requests the opening (0x25547). On failure it prints "You try to force the door but fail." (DS:0x5b6c, 0x25553). Both return 1.
  • Used by: Interacting with walls › Forcing a door, Texts, The world, Anomalies and bugs

0x25568 — Operate a door switch​

  • Range: 0x25568–0x25648
  • Role: The handler of INF_WALL_SPECIAL_DOOR_SWITCH, cell 0 of the handler cells. It computes the switch rectangle of the door graphic and tests the click against it (0x25609). When the click falls on the switch, or when the record gate is not the click value 0x40 (a key or a flying object), it toggles the door (0x25621), plays sound 6 (0x2562b) and returns 1. A click elsewhere on the door goes to the door that cannot be forced handler instead (0x2563b).
  • Used by: Sound effects › Doors and walls, The world

0x25649, 0x25693, 0x256f1, 0x2574f, 0x258cd, 0x25924 — Wall-click dispatchers​

0x27f68 — Advance door operations​