Skip to main content

Module crs

Module crs 

Source
Expand description

Compiled resources (.crs): serialized engine objects.

block    = u32 0xaaaaaaaa, u32 size, u32 version, payload, u32 0xbbbbbbbb   (size covers payload + terminator)
resource = block { u32 0x5412a91f, u32 typeId, u32 fileVersion,
                   u32 depCount, depCount x { String, u64 FILETIME }, object... }
String   = u32 n|0x80000000 then n bytes (8-bit, NUL included) | u32 n then n UTF-16 units

Original: the constructor of IO::BinaryWriter (Runtime 0x1800a9980), Object::External::Save (Runtime 0x1800be4a0), System::String::Serialize (Runtime 0x1800cc1a0).

Structs§

Header
The header of a resource.
Reader
A reader of a resource’s fields, little-endian, that knows the block structure.
Writer
The writing side of Reader (IO::BinaryWriter): little-endian values, 8-bit strings and blocks whose size is filled in when they close.

Constants§

BLOCK_END
The marker at the end of every block.
BLOCK_START
The marker at the start of every block.
MAGIC
The magic number at the start of a resource’s payload.

Functions§

header
Header only; skips the object payload.
parse
Parse a resource, handing the object payload to f (called inside the outer block).