Shadowcaster cutscene

From MultimediaWiki
Jump to navigation Jump to search

This cutscene format combines compressed video data with other commands like starting/stopping external music.

Header:

 2 bytes -- 0x105
 2 bytes -- width
 2 bytes -- height
 2 bytes -- fps
 48 bytes -- unknown/unused

The rest of file is organised into chunks with 16-bit tag, 32-bit size and payload. Known chunk types are:

  • 1 -- intra RLE frame (negative value - copy, positive value - run)
  • 2 -- optionally LZSS-packed inter RLE frame (each line containing start position and the number of RLE segments to update)
  • 3 -- unpacked or LZSS-packed frame
  • 4 -- palette update
  • 16-21 -- unknown commands
  • 22 -- palette selection command (one byte is palette index)
  • 23-24 -- unknown commands
  • 25 -- repeat frame command (one byte tells how many times)
  • 32 -- set palette to all black
  • 33 -- fade in command (one byte is target palette index)
  • 34 -- fade out command
  • 35 -- unknown

Palette data is stored as the palette index followed by the number of palette segments and actual segments (number of colours to skip from previous segment, number of colours in the segment modulo 256, actual colour data).