(Created page with "'''FXX''' and '''WXX''' are the image format for high resolution sprites in the Dark Forces Remaster. They replace [https://df-21.net/documentation/DFSPECS/s_fme.htm FMEs] and [https://df-21.net/documentation/DFSPECS/s_wax.htm WAXes] respectively. FXX and WXX are actually the same format, differing only in file extension. FXX/WXX are true colour with an alpha channel. FXX/WXX sprites will be loaded in place of a classic sprite if they have the same name (eg. <code>hell...") |
mNo edit summary |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
'''FXX''' and '''WXX''' are the image format for high resolution sprites in the Dark Forces Remaster. They replace [https://df-21.net/documentation/DFSPECS/s_fme.htm FMEs] and [https://df-21.net/documentation/DFSPECS/s_wax.htm WAXes] respectively. FXX and WXX are actually the same format, differing only in file extension. | '''FXX''' and '''WXX''' are the image format for high resolution sprites in the Dark Forces Remaster. They replace [https://df-21.net/documentation/DFSPECS/s_fme.htm FMEs] and [https://df-21.net/documentation/DFSPECS/s_wax.htm WAXes] respectively. FXX and WXX are actually the same format, differing only in file extension. | ||
FXX | FXX and WXX are true colour with an alpha channel. | ||
FXX | FXX and WXX sprites will be loaded in place of a classic sprite if they have the same name (eg. <code>hello.WAX</code>, <code>hello.WXX</code>). Their image(s) ''must'' be exactly double the dimensions of the image(s) in the FME or WAX they are substituting for. | ||
== File format == | |||
FXX/WXX files contain minimal metadata. The game obtains key data (widths and heights of images, offsets, animation sequences, frame rates, etc.) from the corresponding FME or WAX. | FXX/WXX files contain minimal metadata. The game obtains key data (widths and heights of images, offsets, animation sequences, frame rates, etc.) from the corresponding FME or WAX. | ||
Line 13: | Line 13: | ||
<pre> | <pre> | ||
FXX/WXX header | FXX/WXX header | ||
{ | { | ||
NumImages int32 | NumImages int32 // Number of images contained in this file | ||
ImageSizes int32[NumImages] // The values are the number of pixels in each image | ImageSizes int32[NumImages] // The values are the number of pixels in each image | ||
} | } | ||
Line 20: | Line 20: | ||
FXXs will only have one image, WXXs may have one or more corresponding to the number of images in the base WAX. | FXXs will only have one image, WXXs may have one or more corresponding to the number of images in the base WAX. | ||
The header is followed by the data for each image. | |||
=== Image data === | |||
Images are encoded simply as an array of pixels. Pixels are arranged by rows (note this is different from FMEs and WAXs where pixels are arranged by columns). For some reason, rows are arranged from right-to-left. | |||
Each pixel is a 4 byte struct: | |||
<pre> | |||
Pixel | |||
{ | |||
Red byte | |||
Blue byte | |||
Green byte | |||
Alpha byte | |||
} | |||
</pre> | |||
Each value can be between 0 and 0xFF. | |||
The way the Alpha channel is handled by the game is as follows: | |||
{| class="wikitable" | |||
|- | |||
| <code>0</code> || The pixel will be transparent | |||
|- | |||
| <code>Any value from 0x1 to 0xFE</code> || The pixel will be full-bright (fully lit in all light levels and produce bloom) | |||
|- | |||
| <code>0xFF</code> || An ordinary pixel. | |||
|} | |||
== Order of images == | |||
In a WXX file, the images are ordered corresponding to the order in which cells are encountered in a WAX, as the WAX sequences and frames are traversed. | |||
Note, this is often not the same as the order of cells in a WAX. For example, first frame of the first sequence of the Imperial Officer WAX points to the 12th cell in the WAX. Therefore the first image in the Imperial Officer WXX corresponds to the 12th cell. | |||
[[Category: Remaster Specs]] |
Latest revision as of 03:39, 12 March 2024
FXX and WXX are the image format for high resolution sprites in the Dark Forces Remaster. They replace FMEs and WAXes respectively. FXX and WXX are actually the same format, differing only in file extension.
FXX and WXX are true colour with an alpha channel.
FXX and WXX sprites will be loaded in place of a classic sprite if they have the same name (eg. hello.WAX
, hello.WXX
). Their image(s) must be exactly double the dimensions of the image(s) in the FME or WAX they are substituting for.
File format
FXX/WXX files contain minimal metadata. The game obtains key data (widths and heights of images, offsets, animation sequences, frame rates, etc.) from the corresponding FME or WAX.
Header
The FXX/WXX header is as follows.
FXX/WXX header { NumImages int32 // Number of images contained in this file ImageSizes int32[NumImages] // The values are the number of pixels in each image }
FXXs will only have one image, WXXs may have one or more corresponding to the number of images in the base WAX.
The header is followed by the data for each image.
Image data
Images are encoded simply as an array of pixels. Pixels are arranged by rows (note this is different from FMEs and WAXs where pixels are arranged by columns). For some reason, rows are arranged from right-to-left.
Each pixel is a 4 byte struct:
Pixel { Red byte Blue byte Green byte Alpha byte }
Each value can be between 0 and 0xFF.
The way the Alpha channel is handled by the game is as follows:
0 |
The pixel will be transparent |
Any value from 0x1 to 0xFE |
The pixel will be full-bright (fully lit in all light levels and produce bloom) |
0xFF |
An ordinary pixel. |
Order of images
In a WXX file, the images are ordered corresponding to the order in which cells are encountered in a WAX, as the WAX sequences and frames are traversed.
Note, this is often not the same as the order of cells in a WAX. For example, first frame of the first sequence of the Imperial Officer WAX points to the 12th cell in the WAX. Therefore the first image in the Imperial Officer WXX corresponds to the 12th cell.