XPlor/definitions/thqa/rsc.xscript
njohnson 7b1f5d34a1 Consolidate XScript definitions with byte order inheritance
- Volition VPP: Unified BE/LE types using inheritance pattern
- THQA PAK: Child types now inherit byte order from parent
- Various XScript definition updates and fixes

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 16:08:46 -05:00

37 lines
919 B
Plaintext

// RSC Model file format - THQ Australia Engine
// Contains 3D model geometry in g4rc containers
// Big-endian (Xbox 360, Wii)
type thqa_rsc ui("THQA RSC Model", root) byteorder BE
{
criteria {
require ascii(bytesat(0, 4)) == "dsrc";
}
// RSC files have a "dsrc" header
magic = ascii(read(4)) ui("Magic");
u32 total_size ui("Total Size");
// Look for g4rc blocks if there's more data
if (pos() + 4 <= size()) {
search_magic = ascii(read(4));
if (search_magic == "g4rc") {
seek(pos() - 4);
g4rc_type = u32at(pos() + 4) ui("G4RC Type");
g4rc_size = u32at(pos() + 12) ui("G4RC Size");
}
}
file_size = size() ui("Total File Size");
}
type thqa_rsc_vertex ui("RSC Vertex") byteorder BE
{
f32 pos_x ui("Position X");
f32 pos_y ui("Position Y");
f32 pos_z ui("Position Z");
u32 packed_normal ui("Packed Normal");
f32 uv_u ui("UV U");
f32 uv_v ui("UV V");
}