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.|
This section is present in version 10001 files, but not in 10000 or 10005.
|uint32||SoundCount||Number of sound references defined.|
An array of SoundCount records:
|char||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, specifying the index of one sound ref defined above. A value of -1 indicates 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