2026-01-11 12:10:58 -05:00
|
|
|
// RSC Model file format - THQ Australia Engine
|
|
|
|
|
// Contains 3D model geometry in g4rc containers
|
|
|
|
|
// Big-endian (Xbox 360, Wii)
|
|
|
|
|
|
2026-01-11 16:08:46 -05:00
|
|
|
type thqa_rsc ui("THQA RSC Model", root) byteorder BE
|
2026-01-11 12:10:58 -05:00
|
|
|
{
|
|
|
|
|
criteria {
|
|
|
|
|
require ascii(bytesat(0, 4)) == "dsrc";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// RSC files have a "dsrc" header
|
2026-01-11 16:08:46 -05:00
|
|
|
magic = ascii(read(4)) ui("Magic");
|
|
|
|
|
u32 total_size ui("Total Size");
|
2026-01-11 12:10:58 -05:00
|
|
|
|
|
|
|
|
// 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);
|
2026-01-11 16:08:46 -05:00
|
|
|
g4rc_type = u32at(pos() + 4) ui("G4RC Type");
|
|
|
|
|
g4rc_size = u32at(pos() + 12) ui("G4RC Size");
|
2026-01-11 12:10:58 -05:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-01-11 16:08:46 -05:00
|
|
|
file_size = size() ui("Total File Size");
|
2026-01-11 12:10:58 -05:00
|
|
|
}
|
|
|
|
|
|
2026-01-11 16:08:46 -05:00
|
|
|
type thqa_rsc_vertex ui("RSC Vertex") byteorder BE
|
2026-01-11 12:10:58 -05:00
|
|
|
{
|
2026-01-11 16:08:46 -05:00
|
|
|
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");
|
2026-01-11 12:10:58 -05:00
|
|
|
}
|