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: 675214e6a2e14eea6721b98c0a06c6ed8252c094
Page Name:Picture file format
Date: 2018-08-18 06:12:00
Original User: zzo38
Parent: c7434a2e2d6c8ba54f8ad2549600afc956c90df4 (diff)
Next 05af457b25a5b6de1855fdfdc73b60f5dcd97cc9
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.

*.WAV

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