Free Hero Mesh

Update of "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.
Overview

Artifact ID: 05af457b25a5b6de1855fdfdc73b60f5dcd97cc9
Page Name:Picture file format
Date: 2018-08-19 23:19:53
Original User: zzo38
Parent: 675214e6a2e14eea6721b98c0a06c6ed8252c094 (diff)
Content

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.