New glDoom Lumps

The purpose of this document is to describe new
lumps that enable advanced rendering and other
enhancements in glDoom using the normal Doom WAD's.

The data in the lumps provided with glDoom may
have to be modified for total or partial conversions
to "look" right if the advanced rendering options
like light-maps, dynamic lighting and transparency
are to be used.

The same is true of the other "control" lumps if
the advanced features they control need to be
modified for your patch wads or conversions.

There are X types of new lumps for the Doom wads.
They are:


1. music control
2. ambient sounds
3. transparency
4. light emitters
5. light (dark) maps
6. game text
7. local level messages
8. level control
9. gravity map
10. player skin
11. 3D model (with skin)
12. texture animations
13. things2
14. waddata


1. Music control

This lump is similar to the lump used in Hexen but
contains more information including preferred CD
tracks. It controls what music is played on the
levels in an IWAD is designed so that part of it
can be overridden without having to override the
entire file with a PWAD.

What this means is that you can include a music
control lump in a single level and it will control
only the music for that level.  Or you can include
a music control lump for a group of levels in a PWAD
and still leave the "game" music intact without
having to add it to your music control lump.

2. Ambient sounds

This lump contains a list of ambient sounds for
a level.  Each sound gives the name of the sound
effect to be looped when the player is within the
distance defined by the radius of the sound from
the position given in the lump. When the player
is at the "center" of the effect it is the loudest
and it tapers off to nothing at the radius.

By putting two sounds within each other's radii,
you can have smooth transitions from one ambient
sound to another or a combination of the two.

3. Transparency

This lump give the names of the sprites which
should be "translucent" and what the the translucence
factor should be. (from 0 to 255) From 0 being
completely transparent to 255 being completely opaque.

The sprite_name field is the 8 byte frame-specific
sprite name. (i.e. PLAYD3D7 )

The colors field is a 4 byte value in RGBA format
(red, green, blue, alpha) that denotes the color of
light to be emitted by the sprite if it is a light
source (indicated by the luminous field).  The color
fields red, green and blue are the same as the rgb
palette values and have the same range (0 to 255 with
0 being "off").

The alpha byte of the colors field indicates the amount
of opacity of the sprite.  A value of 0 makes the object
completely transparent.  A value of 255 makes the object
completely opaque.

The luminous field indicates whether the sprite is "self
illuminating". Any value other than 0 indicates that the
sprite emits light and the value (up to 255) indicates
the intensity of that light. (actually its radius)

The format is:

Data Type   Field Name   Description
========================================================
char[8]     sprite_name  Name of sprite, frame specific
char[4]     colors       Light color and alpha setting
int (4)     luminous     Is this sprite self-illuminating


4. Light emitters

This lump lists the light emitting textures, sprites
and flats in the game and describes their light emission
properties.

There are two classes of light emitters. Static and
dynamic.  There are also two types of light sources:
point and surface.

Static light sources emit light all the time (they can
be variable) and do not move.  The textures that contain
lights in Doom are of the class static. Static light
sources can be either point sources or lighting surfaces.
Static light sources are used to light levels by creating
light maps for the level.

Dynamic light sources emit light when they are present
but are of only one type. They are always "point" light
sources.  All visible projectiles in Doom will be of the
dynamic light source class.

Both classes of light sources have a specified intensity
and color.

5. Light maps

The static light source class is used to generate the
static lighting for Doom levels. These are be in the
form of light maps ("dark maps" is a more accurate term).
These surface maps are precalculated lighting from the
light sources defined for the levels.  Both the light
emitting textures defined in the light emitters and
light sources which are independent of textures are
used to create the light maps for the levels.  The
texture independent light sources are defined in the
things2 lump for each level.

6. Game text

This lump is to support modification of the game in a
way that makes changing the game text "non-invasive"
meaning that individual game messages can be replaced
with new text with no program changes required and
no legacy program support (like dehacked) required.

This is also a good way to add new languages to the
game by creating a new game text lump for each language.

7.  Local level messages

Rather than try to create linkages between "things"
and text messages, a better idea is to create messages
that can be displayed when certain trigger lines are
crossed or bounding boxes are entered or left.

The messages are also coded for player skill levels.

8. Level control

The level control lump can control a number of things
about individual levels.  The things that can be
controlled in the level control lump are:

next level (standard)
next level (secret)
music selection
game settings (i.e. gravity?)
extension types

9. Gravity map (things2?)

This lump contains the gravity settings for individual
sectors in your game map.

10. Player skin

This lump is a set of textures to be used for a player
in a multiplayer game.

11. This lump contains a 3D model to be used in the
game as well as animation information and the "skin"
of the model with texture coordinates.

This model is an IK (inverse kinematic) model which
uses the bone and skin approach. The animations are
used to describe the body as three separate "units"
consisting of the "base", "torso" and "head".

This is still in its nascent stages of development.

12. Texture animations.

This lump gives lists of texture animations.  The
animation is performed if the texture for a wall,
ceiling or floor is part of one of the animation lists.

It is also possible to link a "switch" texture to
an "animation" texture so that when you turn on a
switch it starts an animation.

13. Things2

This new lump is for new things that can be added
to the levels. With this new lump, the old things
remain the same and no new code is required to
parse the old things to prevent interpreting new
things incorrectly.

The new things2 lump has an identifier for which
port "standard" the new things use.  glDoom uses
0x1994 as its identifier.  Any other identifier
means that the things2 lump uses definitions from
another port which the current program can use if
it knows how.

14. WadData

This new lump contains information about the origin
of the wad.

The information it contains is:

1. Game Type
2. Number of "episodes"
3. Number of levels per episode
4. Author information


