A Viewport Overlay
Using DSAs you can add graphic overlays to your dungeon. The overlay
graphics are stored in file CSBGraphics.dat and each has a number. Th
&OVERLAY word in your DSA code selects an overlay and provides
information as to what percentage of the original viewport is to be displayed
and what percentage of the Overlay. For example, you might select 90%
viewport and 10% Overlay to give a slightly hazy effect of fog. If you were
to select 100% overlay then you would not be able to see anything in the
original viewport graphic. There is a demonstration of using Overlays to create the
appearance of being under water.
The &OVERLAY word requires 5 parameters, like this:
0 50 0 0 12 &OVERLAY
p1 = flags
- 0x0001 = p4 is the overlay transparent color.
- 0x0002 - Overlay should be mirrored left to right
p2 = 50 = transparency
p3 = 0 = timeout (if non-zero - Number of ticks of clock before overlay is
p4 = various uses
- if p1 & 0x0001 then this is the overlay transparent color. Which of
the 256 colors should be transparent. Value 0 through 255.
p5 = 12 = overlay number
The overlays themselves are stored in CSBGraphics.dat as type 'Viewport
Overlay'. Each must be a 256-color bitmap (.bmp) format and be exactly 224
pixels wide by 136 pixels high.
There is also a capability of changing the Viewport