Image catalog files

Files with this format: "*.imc".

Battle sprites animation catalogue. Contains 72 frames for walking (WK) or combat (CB) or 16 frames for dying sequence (DY). Entire .IMC file is compressed using DL variant od RLE. (see reader_drle.py) Next passages are describing contents of decompressed file.

Table of Contents

Offsets

starting at 0x00

Structures

frame

Offsets

Offset: starting at 0x00

0x00: unknown array[ 24 ] of byte
Looks like pairs of words. Small numbers. Y/X frame offsets maybe.
25: unknown byte
0xff for DY files, 0x0 for other
26: unknown array[ 20 ] of byte
Unknown data. Present only in non-DY files.
  • Looks like motion-related. All zeroes for static monsters (M73, M90).
26/46: sprite_height: word
Height of sprite (height of all frames is same)
28/48: sprite_widths: array[ 8 ] of word
Sprite widths for 8 directions (frames in one direction are having the same width)
44/64: unknown array[ 16 ] of byte
8 words? Also direction related?
60/80: frame_count: word
Frame count for one direction. File contains 8 * frame_count images.
62/82: data_length: word
Size of the rest of the file beyond the frame offsets.
64/84: frame_data_offsets: array[ variable ] of word
Offsets of frame data
  • Starting beyond the end of this array
  • Divided by 16 for reason unknown. (so 'end+offset*16' is the start of frame data)

Structures

Structure: frame

Size .

0x00: width: byte
Width of image
0x01: height: byte
Height of image
0x02: image_data: array[ variable ] of byte
Encoded image data
  • Each row of image starts with byte containing count of defined pixels.
  • Next byte containing count of starting empty pixels.
  • Then follows count_of_defined_pixels long sequence of pixels (pallete index bytes) to be rendered. (zero is transparent)