Overview
Artifact ID: | cebb3a30638a72ea8274ae675881651f58a70fe9 |
---|---|
Page Name: | Picture file format |
Date: | 2018-08-18 02:19:11 |
Original User: | zzo38 |
Next | 2cec602cd94a9df2351fced5db4da58be7181383 |
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:
- The low nybble of the first byte of the header specifies how many picture variants there are (from 1 to 15).
- After that is a number of bytes equal to the number of picture variants; each one is a number from 1 to 255 indicating the picture size (the width and height are both equal to this number, so the pictures are always square).
- After that is a number of bytes equal to half of the number of picture variants, rounding down. The first picture uses the high nybble of the first byte of the header; other than that, in this section, they use one nybble, where the low nybbles come first. These specify the encoding format.
Encoding formats:
- 0 =
- 1 =
- 2 =
- 3 =
- 4 =
- 5 =
- 6 =
- 7 =
- 15 = Uncompressed
(TODO)