Bay 12 CMV
- Company: Bay 12 Games
- Extension: cmv, ccmv
- Movies - DF Map Archive (download links for each are in a box on the bottom left)
The CMV file format is used by the game Dwarf Fortress to store intro movies and player recordings.
|uint32||Version||The format version used; should be >= 10000|
|uint32||Width||Width (in characters) of each frame|
|uint32||Height||Height (in characters) of each frame|
|uint32||DelayRate||How long each frame is displayed; seems to be in hundredths of a second.|
Sound data is present in version 10001 files, but not in 10000 or 10005.
|uint32||SoundCount||Number of sound references defined.|
|char*SoundCount||SoundName||Filename (no dir or ext) of an external file which contains the sound data.|
Sound timing data
An array of 3200 (16 channels x 200 frames?) 32-bit signed integers, each specifying an index into the array of sound refs defined above. An index of -1 indicates that no new sound is played at that point.
Frame data is stored in zlib-compressed chunks containing a maximum of 200 frames:
|uint32||z_size||Size of compressed data.|
|bytes||z_data||z_size bytes of compressed data.|
The uncompressed structure of each frame roughly corresponds to a text-mode screen buffer:
|char[Width*Height]||Characters||An array of characters, encoded in the CP437 character set.|
|char[Width*Height]||Attributes||Encodes the ANSI color codes for each character.|
Note that the encoding of color attributes is nonstandard:
0ibbbfff i - Foreground Intensity Bit bbb - Background Color Bits fff - Foreground Color Bits