Skip to main content

Spots and wall decorations

The dungeon view · Items and flying objects · Wall decorations (DEC)

In brief​

After the walls, the game draws the objects of each visible block. Items, monsters and flying objects stand on one of five spots of their block, its four corners and its centre, at a fixed offset for each visible block. Wall decorations come from the level's DEC data, which places each one for ten positions of a face; the faces of the view use them, some mirrored.

Where objects are drawn​

After the walls, the game draws, for each visible block in the object order, its wall decorations, the items on its floor, its monsters (the 15 blocks ahead only) and its flying objects. All positions below are pixels from the top-left corner of the view. A shape's size comes from its header: height in pixels, width in 8-pixel columns.1

The five spots of a block​

Items, monsters and flying objects stand on one of five spots of their block: its four corners and its centre. The game converts a position in the block (0 north-west, 1 north-east, 2 south-west, 3 south-east) into a spot as seen by the party:

FacingNorth-westNorth-eastSouth-westSouth-east
Northfar leftfar rightnear leftnear right
Eastnear leftfar leftnear rightfar right
Southnear rightnear leftfar rightfar left
Westfar rightnear rightfar leftnear left

Each spot has a fixed offset per visible block, added to (88, 124) for items and to (88, 127) for monsters:

BlockFar leftFar rightNear leftNear rightCentre
00−111, −63−95, −63−139, −59−117, −59−120, −61
01−76, −63−60, −63−95, −59−74, −59−80, −61
02−43, −63−27, −63−53, −59−31, −59−40, −61
03−8, −638, −63−10, −5910, −590, −61
0427, −6343, −6331, −5953, −5940, −61
0560, −6376, −6374, −5995, −5980, −61
0695, −63111, −63117, −59139, −59120, −61
07−118, −53−92, −53−152, −45−120, −45−118, −50
08−66, −53−40, −53−84, −45−51, −45−59, −50
09−13, −5313, −53−16, −4516, −450, −50
1040, −5366, −5351, −4584, −4559, −50
1192, −53118, −53120, −45152, −45118, −50
12−110, −35−67, −35−140, −22−83, −22−98, −30
13−22, −3522, −35−27, −2227, −220, −30
1467, −35110, −3583, −22140, −2298, −30
15−128, −4128, −4−128, −66128, −66128, 0
16−38, −438, −4−38, −6638, −660, 0
17−128, −4128, −4−128, −66128, −66128, 0
The view with the five spots of every visible block: outlines join the corner spots of each block, colored by distance; hollow dots mark corners where items are not drawn.
The five spots of every visible block, where the game draws objects.

For the party's row, the "far" spots are the front half of the block and the "near" spots its back half, which lies behind the viewer.

Wall decorations​

A wall reference can carry a chain of decorations from the level's DEC data. Each decoration gives a rectangle and an (x, y) placement for ten positions; the visible faces use them as follows, a negative position meaning that the decoration is drawn mirrored:

DEC positionFaceHorizontal shift
1block 16, the side behind the party0
2front faces of 12, 13, 14−128, 0, +128
3front faces of 07 to 11−160, −80, 0, +80, +160
4front faces of 01 to 05−96, −48, 0, +48, +96
5, −5right-hand face of 15, left-hand face of 17none
6, −6right-hand face of 12, left-hand face of 14none
7, −7right-hand face of 08, left-hand face of 10none
8, −8right-hand face of 02, left-hand face of 04none
9, −9right-hand face of 07, left-hand face of 11none
10, −10right-hand face of 01, left-hand face of 05none

Blocks 00 and 06 carry no decorations, and blocks 03, 09 and 13 none on their sides. For each block the side face is decorated first, then the front face; each decoration of the chain is drawn in turn:

p = abs(position) − 1 # DEC entry 0 to 9
if rectangle[p] == none: skip
shift = 0
if front face (positions 1 to 4):
shift = centre spot x of the block if flags & 4 else horizontal shift above
if flags & 1 or (flags & 2 and backdrop mirrored): position = −position
if position > 0: x = placement_x[p] + shift # normal
else: x = 176 − placement_x[p] + shift − 8 × width # mirrored
y = placement_y[p]

Sources​

Locations refer to the game executable reference; comparative sources are listed in the technical references. The figures are drawn from the values listed on these pages, with no game graphics, by make_view_figures.py.

Footnotes​

  1. The object pass draws decorations, floor items, monsters and flying objects, with the spot table, the item tables, the decoration tables, the monster tables and the flying-object tables, with the flight shapes and the thrown shapes that the item and thrown shape loader cuts. The level's door graphics come from the door records loader, which calls the door shape loader and the wall group toggle; the sparkle and temporary-wall shapes from the decoration shape loader and its rectangles. Shapes are reduced by the scale step of the VGA display driver, reached through the driver function table. The door records of the sixteen level files were read with the INF schema. Comparative source: REF-SCUMM-016, drawSceneShapes, drawDecorations, drawBlockItems, drawMonsters, drawFlyingObjects, initLevelData, loadDoorShapes, drawDoorIntern, scaleShape, scaleShapeStep and scaleShapeProcessLine4Bit. ↩