XPlor/definitions/asura/chunks/rttc_chunk.xscript

84 lines
1.5 KiB
Plaintext
Raw Normal View History

// RTTC - Rotation/Transform Track Chunk
// Contains rotation and transformation animation data
// Found in .cut files
type rttc_chunk [display="RTTC Rotation Track"] byteorder BE
{
// Standard 16-byte Asura chunk header
chunk_id = ascii(read(4));
u32 chunk_size;
u32 version;
u32 flags;
chunk_id = chunk_id;
ui("chunk_id", "Chunk ID");
chunk_size = chunk_size;
ui("chunk_size", "Chunk Size");
version = version;
ui("version", "Version");
flags = flags;
ui("flags", "Flags");
// Track entry count
u32 entry_count;
entry_count = entry_count;
ui("entry_count", "Entry Count");
// Keyframe count
u32 keyframe_count;
keyframe_count = keyframe_count;
ui("keyframe_count", "Keyframe Count");
// Target name (null-terminated)
target_name = cstring();
target_name = target_name;
ui("target_name", "Target Name");
// Use target name for display (clean removes non-printable chars)
set_name(clean(target_name));
// Position (3 floats)
f32 pos_x;
f32 pos_y;
f32 pos_z;
pos_x = pos_x;
ui("pos_x", "Position X");
pos_y = pos_y;
ui("pos_y", "Position Y");
pos_z = pos_z;
ui("pos_z", "Position Z");
// Rotation quaternion (4 floats)
f32 rot_x;
f32 rot_y;
f32 rot_z;
f32 rot_w;
rot_x = rot_x;
ui("rot_x", "Rotation X");
rot_y = rot_y;
ui("rot_y", "Rotation Y");
rot_z = rot_z;
ui("rot_z", "Rotation Z");
rot_w = rot_w;
ui("rot_w", "Rotation W");
}