Bay 12 CMV: Difference between revisions

From MultimediaWiki
Jump to navigation Jump to search
No edit summary
 
 
Line 36: Line 36:


===Sounds===
===Sounds===
This section is present in version 10001 files, but not in 10000 or 10005.
Sound data is present in version 10001 files, but not in 10000 or 10005.


{| style="margin: 1em 1em 1em 0pt; background: #f9f9f9; border: 1px solid #aaa; border-collapse: collapse;" border="1" cellpadding="4" cellspacing="0"
{| style="margin: 1em 1em 1em 0pt; background: #f9f9f9; border: 1px solid #aaa; border-collapse: collapse;" border="1" cellpadding="4" cellspacing="0"
Line 47: Line 47:
| SoundCount
| SoundCount
| Number of sound references defined.
| Number of sound references defined.
|}
====Sound references====
An array of ''SoundCount'' records:
{| style="margin: 1em 1em 1em 0pt; background: #f9f9f9; border: 1px solid #aaa; border-collapse: collapse;" border="1" cellpadding="4" cellspacing="0"
|-
! Type
! Name
! Description
|-
|-
| char[50]
| char[50]*''SoundCount''
| SoundName
| SoundName
| Filename (no dir or ext) of an external file which contains the sound data.
| Filename (no dir or ext) of an external file which contains the sound data.
Line 64: Line 54:


====Sound timing 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.
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===
===Frame data===

Latest revision as of 21:06, 29 April 2011

The CMV file format is used by the game Dwarf Fortress to store intro movies and player recordings.

File structure

Header

Type Name Description
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.

Sounds

Sound data is present in version 10001 files, but not in 10000 or 10005.

Type Name Description
uint32 SoundCount Number of sound references defined.
char[50]*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

Frame data is stored in zlib-compressed chunks containing a maximum of 200 frames:

Type Name Description
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:

Type Name Description
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

Related software

CMV Movie Editor