SRD

From Spiral Framework
Revision as of 09:55, 17 October 2018 by CaptainSwag101 (talk | contribs) (Added brief info about more SRD entry types)
Jump to navigation Jump to search
SRD
TypeReference Format
SystemSteam
Applicable TitlesDanganronpa V3: Killing Harmony
Credityukinogatari/Danganronpa-Tools
Default SignednessUnsigned
Default EndiannessBoth Little-Endian and Big-Endian
Implementation Status80%

SRD (Or Spike Reference Descriptor as it is theorised to stand for) is a file format that stores information about an object, typically models. Each entry in the file has a different piece of information about the end product.

SRD "archives" themselves are very simple; they're simply a collection of SRD entries, one after another.

SRD entries all follow a simple pattern; a 4 byte string (although it could be read as a number) for the data type. This is followed by a 4 byte Big Endian int for the data length, then a 4 byte BE int for the subdata length, then a 4 byte padding number.

Alignment

All "blocks" in a SRD file and entry are aligned to 16 bytes. This means, if a entry is only 10 bytes, there will be 6 bytes of padding. If the entry is 125 bytes, then there will be 3 bytes of padding. Both the main data block and subdata block are subjected to this padding.

Entry Types

CFH (Content File Header)

This is always the first entry in an SRD file, and its third UInt32BE parameter (probably?) specifies the number of RSF entries contained within.

TXI (Texture Information)

This entry contains information about textures, put bluntly.

TXR (Texture Resource/Reference)

This contains info about a texture resource, and usually are followed by RSI entries which provide the actual filename of the texture resource.

RSI (Resource Information)

Seems to describe a filename entry for a previously-referenced content type.

SCN (Scene)

Seems to be related to 3D models.

MSH (Mesh)

Contains mesh information for a 3D model.

VTX (Vertex)

Contains vertex information for a 3D model.

MAT (Material)

Contains material information for a 3D model.

CT0 (Content Terminator)

This marks the end of the SRD file, as well as some multi-entry pieces such as TXR+RSI entries.