Data File: GumpArt.mul
Index File: GumpIdx.mul
You can compute the following values from the Extra field in the index file.
Sizes:
short width = ((extra >> 16) & 0xFFFF);
short height = (extra & 0xFFFF);
Data:
int[height] lookupTable;
RLE Data...RLE stands for "run-length encoding", it is a simple form of image compression.
This implementation of the RLE compression is treated as 32-bit values, broken up into two 16-bit values
1F | 1E | 1D | 1C | 1B | 1A | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 0F | 0E | 0D | 0C | 0B | 0A | 09 | 08 | 07 | 06 | 05 | 04 | 03 | 02 | 01 | 00 |
Run | Color |
The Color field indicates which color should be repeated. The Run field represents the length of pixels:
for ( int i = 0; i < Run; i++ )
{
SetPixel( x + i, y, Color );
}
x += Run;
See Also:
- UO Color Format
- Index Files