-
Notifications
You must be signed in to change notification settings - Fork 13
DDF Images
Stored in the DDFIMAGE lump, or in the image.ddf file.
DDFIMAGE allows you to define images to be used in the game, and is mainly useful for using PNG and JPG images inside EDGE-Classic. Once defined here, you can then use this image in all other DDF definitions.
Each entry describes an "image" and consists of an image type and a name separated by a colon (:), enclosed in square brackets, followed by a series of commands that specify additional properties.
NOTE: When using filenames, directories must be separated by / instead of the \ character which is normally used under Windows. The reason is because the \ character has a special meaning in DDF: it is the escape character, and "\n" is used to put newlines into DDF strings.
IMAGE_DATA entries have the following format:
[ENTRY_TYPE:ENTRY_NAME] |
Where each command is as follows:
COMMAND | DESCRIPTION |
---|---|
[ENTRY_TYPE] | This can be either GFX, SPR, TEX or FLAT depending on whether the image is a graphic, a sprite, a texture or a flat. |
[ENTRY_NAME] | The name can be something entirely new e.g. MYJPG01 or it can replace an existing entry e.g. TITLEPIC. |
[IMAGE_TYPE] | This can be either COLOUR, BUILTIN, PACK, FILE, or LUMP. The most useful two are PACK (for images in an .EPK file) and LUMP (for internal wad lump images). |
[FORMAT] | Only used if the image type is LUMP and must be JPG, PNG, TGA or DOOM depending on the image to be used. |
[IMAGE_NAME] | In the case of: - LUMP and FILE it's the name of the actual file in the wadfile or on the hard drive. - COLOUR it's a hexadecimal value to define an RGB colour. - BUILTIN it's a type of lighting. |
Here are some examples of IMAGE_DATA entries:
Solid colours
|
Built-in (only used to create special images for dynamic lighting and shadows)
|
Internal/External Images
|
Internal MD2 Model skin
Up to nine skins can currently be used (1 to 9). Skins are always type SPR and follow the naming scheme [sprite base name] + "SKN" + [integer] e.g. TROOSKN3 would be the 3rd skin.
|
ADDITIONAL COMMANDS
The following is a list of additional commands that are accepted by each image entry:
COMMAND | TYPE | EXPLANATION |
---|---|---|
X_OFFSET | [integer] | The X offset for sprites. |
Y_OFFSET | [integer] | The Y offset for sprites. |
SCALE | [float] | Bigger scale makes the image bigger (cover more space) |
ASPECT | [float] | Bigger aspect makes the image wider (height is unchanged) |
FIX_TRANS | BLACKEN | Ensures that every completely transparent pixel (alpha=0) in the image is black. If you are getting a wierd green/purple/white/blue border around your PNG sprites, this fixes it! |
SPECIAL | special(#special) | A comma separated list of special flags. See below. |
IS_FONT | [bool] | Needed when using an image in conjunction with the new IMAGE DDFFONT type. Will automatically set the background to transparent (if it isn't already), as well as apply the required mip/clamping flags to the texture |
ROTATE_HUE | [integer] | Changes the hue of the given image while keeping other values the same. Valid range is -1800 to 1800. Default of 0 |
BRIGHTNESS | [integer] | Will affect HSV Saturation and Value color components for the specified image. Valid range is 0 to 255. |
SATURATION | [integer] | Will affect HSV Saturation and Value color components for the specified image. Valid range is 0 to 255. |
These allow some control over the ways the image is used.
SPECIAL | EXPLANATION |
---|---|
FORCE_PRECACHE | Force pre-cacheing an image into memory. Useful for images used in COAL or RTS. |
CROSSHAIR | For weapon crosshair sprites: center vertically on screen. |
FORCE_NOMIP | Force mipmapping to be disabled. For internal use only. |
FORCE_SMOOTH | Force smoothing to be enabled. |
FORCE_CLAMP | Force clamping (image cannot repeat). Must be used with SkyBoxes to avoid seeing the edgse of the box. |
GRAYSCALE | Will force image (for this definition) to be in grayscale even if the original lump/file isn't. |
The following is an example of a complete image entry:
//A fairly normal PNG image
[gfx:EDGETTL]
IMAGE_DATA = LUMP:PNG:"PNG001";
FIX_TRANS=BLACKEN;
DDF docs written by Andy Baker and Ziggy Gnarly, with updates by Andrew Apted, Andy Brewood and Luke Brennan. © EDGE Team, et al. 1998 - 2024.