60 lines
1.1 KiB
Plaintext
60 lines
1.1 KiB
Plaintext
|
|
// RSC Model file format - THQ Australia Engine
|
||
|
|
// Contains 3D model geometry in g4rc containers
|
||
|
|
// Big-endian (Xbox 360, Wii)
|
||
|
|
|
||
|
|
type thqa_rsc [root, display="THQA RSC Model"] byteorder BE
|
||
|
|
{
|
||
|
|
criteria {
|
||
|
|
require ascii(bytesat(0, 4)) == "dsrc";
|
||
|
|
}
|
||
|
|
|
||
|
|
// RSC files have a "dsrc" header
|
||
|
|
magic = ascii(read(4));
|
||
|
|
|
||
|
|
ui("magic", "Magic");
|
||
|
|
u32 total_size;
|
||
|
|
|
||
|
|
ui("total_size", "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 Type");
|
||
|
|
g4rc_size = u32at(pos() + 12);
|
||
|
|
|
||
|
|
ui("g4rc_size", "G4RC Size");
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
file_size = size();
|
||
|
|
|
||
|
|
|
||
|
|
ui("file_size", "Total File Size");
|
||
|
|
}
|
||
|
|
|
||
|
|
type thqa_rsc_vertex [display="RSC Vertex"] byteorder BE
|
||
|
|
{
|
||
|
|
f32 pos_x;
|
||
|
|
|
||
|
|
ui("pos_x", "Position X");
|
||
|
|
f32 pos_y;
|
||
|
|
|
||
|
|
ui("pos_y", "Position Y");
|
||
|
|
f32 pos_z;
|
||
|
|
|
||
|
|
ui("pos_z", "Position Z");
|
||
|
|
u32 packed_normal;
|
||
|
|
|
||
|
|
ui("packed_normal", "Packed Normal");
|
||
|
|
f32 uv_u;
|
||
|
|
|
||
|
|
ui("uv_u", "UV U");
|
||
|
|
f32 uv_v;
|
||
|
|
|
||
|
|
ui("uv_v", "UV V");
|
||
|
|
}
|