Overview
Artifact ID: | be1974649fed01f69648c5fc1ff12617225e86a1 |
---|---|
Page Name: | Picture file format |
Date: | 2018-08-18 02:38:49 |
Original User: | zzo38 |
Parent: | 2cec602cd94a9df2351fced5db4da58be7181383 (diff) |
Next | 8ba9026577d481ca8251f4b64a8dfda4453be1a7 |
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 = Compressed; order by y asc, x asc
- 1 = Compressed; order by y asc, x desc
- 2 = Compressed; order by y desc, x asc
- 3 = Compressed; order by y desc, x desc
- 4 = Compressed; order by x asc, y asc
- 5 = Compressed; order by x desc, y asc
- 6 = Compressed; order by x asc, y desc
- 7 = Compressed; order by x desc, y desc
- 15 = Uncompressed; order by y asc, x asc
(TODO)