Koshan Conspiracy AND

From MultimediaWiki
Jump to navigation Jump to search

This is a simple RLE-based animation format used for cutscenes in The Koshan Conspiracy game.

File header:

 2 bytes - unknown
 2 bytes - width
 2 bytes - height
 768 bytes - VGA palette
 2 bytes - number of frames
 2*N bytes - frame sizes

Frames are coded on line basis with the following opcodes:

  • 0x00-0x7F -- repeat next byte value 1-128 times
  • 0x80-0xBF -- repeat next byte value 1-64 times and then read next single pixel value
  • 0xC0-0xDF -- repeat next byte value 1-32 times and then read next pixel value and repeat it twice
  • 0xE0-0xEF -- repeat next byte value 1-16 times and then read next pixel value and repeat it three times
  • 0xF0-0xFE -- read next 2-16 pixel values
  • 0xFF -- end of line