Ravenloft ANM

From MultimediaWiki
Jump to navigation Jump to search
  • Company: DreamForge
  • Extension: ANM
  • Game: Ravenloft

This is a simple RLE-based cutscene format. The header contains 16-bit number of frames and version. Then frames consisting of one or more chunks follow.

Frame starts with 16-bit number of chunks followed by chunks, each with 16-bit type and 32-bit size.

Chunk types are:

  • 0 - VGA palette
  • 1 - clear palette command
  • 2 - intra RLE
  • 3 - inter RLE
  • 4 - repeat decoding previous chunk 16-bit times at 32-bit offset
  • 5-7 - some game engine commands
  • 8 - raw image interleaved by factor four (i.e. each line stores pixels in order 0 40 80 120 1 41 81 ...)

Intra RLE is trivial: read one-byte opcode, non-negative values mean copy length minus one, negative values mean run length minus one.

Inter RLE operates on updating columns of video: first 16-bit number is how many areas to update there are, each one starts with 16-bit left offsets and 16-bit number of segments to update. Each segment is coded as 16-bit number of pixels to skip (vertically) plus how many pixels to update (also vertically), followed by pixel values.