Module ssf

Module ssf 

Source
Expand description

SSF binary sound-set support. SSF binary reader and writer.

SSF (sound set file) resources map predefined sound-event slots to TLK string references (StrRef).

§Format Layout

+------------------------------+ 0x0000
| Header (12 bytes)            |
+------------------------------+ sound_table_offset (typically 12)
| Sound table                  |
| 28 * int32 strrefs           |
+------------------------------+ optional trailing entries
| Reserved/extra table values  |
| (usually 12 * -1)            |
+------------------------------+

§Header (12 bytes)

0x00..0x04  magic              "SSF "
0x04..0x08  version            "V1.1"
0x08..0x0C  sound_table_offset (u32)

§Sound Table Entry (4 bytes)

0x00..0x04  strref (int32)

A value of -1 indicates an unset/absent sound for that slot.

Structs§

Ssf
In-memory SSF container.

Enums§

SsfBinaryError
Errors produced while parsing or serializing SSF binary data.
SsfSoundSlot
Sound-slot identifiers for the SSF core table.

Functions§

read_ssf
Reads an SSF file from a reader.
read_ssf_from_bytes
Reads an SSF file directly from bytes.
write_ssf
Writes an SSF file to a writer.
write_ssf_to_vec
Serializes an SSF file into bytes.