Free Hero Mesh

Picture file format
Login
This is a mirror of the main repository for Free Hero Mesh. New tickets and changes will not be accepted at this mirror.

This document describes the format of the .xclass files. This file is a Hamster archive; all numbers are small-endian (except lump sizes). The possible lumps are mentioned below.

Despite the page title, this file contains both pictures and sounds.

*.IMG

Replace the asterisk with the name of the picture (which is case-insensitive; this name is used in the .class file to identify the picture).

This lump has a header, as follows:

Encoding formats:

After the header, each picture is encoded (with no terminators or separators), in order. If the uncompressed format is used, it is just a list of pixels (one byte per pixel; indexed colour). If the compressed formats are used, then it is the sequence of commands as follows:

If there is more than one picture variant, it will automatically decide which one to load, based on the imageSize and altImage resources. Integer scaling may be used to make the pictures larger than specified in this file if a picture of the correct size cannot be found; it will not attempt to shrink pictures or to enlarge them by any factor other than an integer, though.

The default palette is in the "colorpalette" file in the source respository; however, note that colour zero is transparent (a placeholder colour is specified in that file for use with displaying with an opaque background).

*.WAV

Replace the asterisk with the name of the sound. The data of this lump is a RIFF WAVE file.