MCH Format

From ModdingWiki
Jump to navigation Jump to search
MCH Format
There is no example of an image in this format — upload one!
Format typeImage
HardwareVGA
Colour depth8-bit (256 colour)
Minimum size (pixels)0×0
Maximum size (pixels)65535×65535
PaletteExternal
Plane count1
Transparent pixels?No
Hitmap pixels?No
Games

The MCH Format is used to store sprite animations, e.g. the image frames of a creature walking.

File format

Header

The file starts with an image count.

Data type Name Description
UINT16LE frameCount Number of frames in the animation

Frame entry

After the image count are frame details, repeated frameCount times.

Data type Name Description
UINT16LE width Width in pixels
UINT16LE height Height in pixels
UINT32LE offset Offset from start of file where data begins

Each frame's image data starts at offset bytes from the start of the file.

Frame image data

Frame pixel data is stored in chunks representing horizontal runs of pixels. Each chunk has this format:

Data type Name Description
BYTE x Position to start drawing
BYTE y
BYTE numPixels Number of pixels in the chunk
BYTE[numPixels] pixels Pixels using current level palette

One row's pixels may be defined by multiple chunks. The data ends when x == 0xFF.

Tools

The following tools are able to work with files in this format.

Name PlatformView images in this format? Convert/export to another file/format? Import from another file/format? Access hidden data? Edit metadata? Notes
Camoto ?NoNoNoN/A

Credits

This file format was reverse engineered by Malvineous and Ceidwad. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)