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>
This commit is contained in:
parent
39230139b9
commit
7b1f5d34a1
@ -1,13 +1,12 @@
|
||||
// American locale file (Big Endian, Sniper Elite, AVP, etc.)
|
||||
// Direct Asura archive
|
||||
|
||||
type amBE [root, display="American Locale (Big Endian)"] byteorder BE
|
||||
type amBE ui("American Locale (Big Endian)", root) byteorder BE
|
||||
{
|
||||
criteria {
|
||||
require _ext == "ambe";
|
||||
require ascii(bytesat(0, 8)) == "Asura ";
|
||||
}
|
||||
|
||||
archive = parse_here("asura_archive");
|
||||
ui("archive", "Asura Archive");
|
||||
archive = parse_here("asura_archive") ui("Asura Archive");
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
// Asset Resource file (Big Endian, Sniper Elite, AVP, etc.)
|
||||
// Can be raw Asura archive or XMemCompressed
|
||||
|
||||
type asrBE [root, display="Asset Resource (Big Endian)"] byteorder BE
|
||||
type asrBE ui("Asset Resource (Big Endian)", root) byteorder BE
|
||||
{
|
||||
criteria {
|
||||
require _ext == "asrbe";
|
||||
@ -14,36 +14,21 @@ type asrBE [root, display="Asset Resource (Big Endian)"] byteorder BE
|
||||
|
||||
// Check if XMemCompressed
|
||||
sig = u32at(0);
|
||||
is_compressed = (sig == 0x0FF512ED || sig == 0x0FF512EE);
|
||||
is_compressed = is_compressed;
|
||||
|
||||
ui("is_compressed", "XMem Compressed");
|
||||
is_compressed = (sig == 0x0FF512ED || sig == 0x0FF512EE) ui("XMem Compressed");
|
||||
|
||||
if (is_compressed) {
|
||||
// Read signature info for display
|
||||
u32 xmem_signature;
|
||||
u32 xmem_flags;
|
||||
xmem_signature = xmem_signature;
|
||||
u32 xmem_signature ui("XMem Signature");
|
||||
u32 xmem_flags ui("XMem Flags");
|
||||
|
||||
ui("xmem_signature", "XMem Signature");
|
||||
xmem_flags = xmem_flags;
|
||||
|
||||
ui("xmem_flags", "XMem Flags");
|
||||
|
||||
compressed_size = size();
|
||||
compressed_size = compressed_size;
|
||||
|
||||
ui("compressed_size", "Compressed Size");
|
||||
compressed_size = size() ui("Compressed Size");
|
||||
|
||||
// Read entire file and decompress
|
||||
seek(0);
|
||||
compressed_data = read(EOF);
|
||||
decompressed_data = compressed_data |> xmem;
|
||||
|
||||
decompressed_size = len(decompressed_data);
|
||||
decompressed_size = decompressed_size;
|
||||
|
||||
ui("decompressed_size", "Decompressed Size");
|
||||
decompressed_size = len(decompressed_data) ui("Decompressed Size");
|
||||
|
||||
// Export decompressed data
|
||||
write_file(_basename + ".asura", decompressed_data);
|
||||
@ -52,13 +37,11 @@ type asrBE [root, display="Asset Resource (Big Endian)"] byteorder BE
|
||||
if (decompressed_size > 8) {
|
||||
dec_sig = ascii(bytesof(decompressed_data, 0, 8));
|
||||
if (dec_sig == "Asura ") {
|
||||
archive = decompressed_data |> parse asura_archive;
|
||||
ui("archive", "Archive Contents");
|
||||
archive = decompressed_data |> parse asura_archive ui("Archive Contents");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Parse as raw Asura archive
|
||||
archive = parse_here("asura_archive");
|
||||
ui("archive", "Asura Archive");
|
||||
archive = parse_here("asura_archive") ui("Asura Archive");
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// Used by Rebellion games: Sniper Elite series, AVP 2010, etc.
|
||||
// Archives contain chunks like FCSR (resources), TSXT (textures), LFSR (lists), etc.
|
||||
|
||||
type asura_archive [display="Asura Archive"] byteorder BE
|
||||
type asura_archive ui("Asura Archive") byteorder BE
|
||||
{
|
||||
criteria {
|
||||
// Match "Asura " signature (8 bytes with trailing spaces)
|
||||
@ -16,10 +16,7 @@ type asura_archive [display="Asura Archive"] byteorder BE
|
||||
set_name(base_name + ".asr");
|
||||
|
||||
// Asura signature
|
||||
signature = ascii(read(8));
|
||||
signature = signature;
|
||||
|
||||
ui("signature", "Signature");
|
||||
signature = ascii(read(8)) ui("Signature");
|
||||
|
||||
// Track chunk indices (separate counter per type for naming)
|
||||
chunk_index = 0;
|
||||
@ -59,8 +56,7 @@ type asura_archive [display="Asura Archive"] byteorder BE
|
||||
if (peek_size == 0 || peek_size > size() - chunk_start) {
|
||||
remaining = size() - pos();
|
||||
if (remaining > 0) {
|
||||
raw_tail = read(remaining);
|
||||
ui("raw_tail", "Raw Tail Data");
|
||||
raw_tail = read(remaining) ui("Raw Tail Data");
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -162,8 +158,5 @@ type asura_archive [display="Asura Archive"] byteorder BE
|
||||
|
||||
// Restore archive name and show total count
|
||||
set_name(base_name + ".asr");
|
||||
chunk_count = chunk_index;
|
||||
chunk_count = chunk_count;
|
||||
|
||||
ui("chunk_count", "Total Chunks");
|
||||
chunk_count = chunk_index ui("Total Chunks");
|
||||
}
|
||||
|
||||
@ -1,165 +1,71 @@
|
||||
// Asura Engine chunk structure
|
||||
// Used by Rebellion games: Sniper Elite, AVP 2010, etc.
|
||||
|
||||
type asura_chunk [display="Asura Chunk"] byteorder BE
|
||||
type asura_chunk ui("Asura Chunk") byteorder BE
|
||||
{
|
||||
// Chunk header: 4-byte ID + 4-byte size + 4-byte version + 4-byte flags
|
||||
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");
|
||||
chunk_id = ascii(read(4)) ui("Chunk ID");
|
||||
u32 chunk_size ui("Chunk Size");
|
||||
u32 version ui("Version");
|
||||
u32 flags ui("Flags");
|
||||
|
||||
// Calculate remaining data size
|
||||
data_size = chunk_size - 16;
|
||||
|
||||
if (data_size > 0) {
|
||||
data = read(data_size);
|
||||
ui("data", "Chunk Data");
|
||||
data = read(data_size) ui("Chunk Data");
|
||||
}
|
||||
}
|
||||
|
||||
type asura_fcsr_chunk [display="FCSR Resource Chunk"] byteorder BE
|
||||
type asura_fcsr_chunk ui("FCSR Resource Chunk") byteorder BE
|
||||
{
|
||||
// FCSR 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");
|
||||
chunk_id = ascii(read(4)) ui("Chunk ID");
|
||||
u32 chunk_size ui("Chunk Size");
|
||||
u32 version ui("Version");
|
||||
u32 flags ui("Flags");
|
||||
|
||||
// Resource info
|
||||
u32 resource_type;
|
||||
u32 unknown1;
|
||||
u32 resource_size;
|
||||
|
||||
resource_type = resource_type;
|
||||
|
||||
|
||||
ui("resource_type", "Resource Type");
|
||||
unknown1 = unknown1;
|
||||
|
||||
ui("unknown1", "Unknown1");
|
||||
resource_size = resource_size;
|
||||
|
||||
ui("resource_size", "Resource Size");
|
||||
u32 resource_type ui("Resource Type");
|
||||
u32 unknown1 ui("Unknown1");
|
||||
u32 resource_size ui("Resource Size");
|
||||
|
||||
// Read null-terminated name
|
||||
name = cstring();
|
||||
name = name;
|
||||
|
||||
ui("name", "Resource Name");
|
||||
name = cstring() ui("Resource Name");
|
||||
}
|
||||
|
||||
type asura_lfsr_chunk [display="LFSR List Resource Chunk"] byteorder BE
|
||||
type asura_lfsr_chunk ui("LFSR List Resource Chunk") byteorder BE
|
||||
{
|
||||
// LFSR chunk header (list of file references)
|
||||
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");
|
||||
chunk_id = ascii(read(4)) ui("Chunk ID");
|
||||
u32 chunk_size ui("Chunk Size");
|
||||
u32 version ui("Version");
|
||||
u32 flags ui("Flags");
|
||||
|
||||
// Number of entries
|
||||
u32 entry_count;
|
||||
entry_count = entry_count;
|
||||
|
||||
ui("entry_count", "Entry Count");
|
||||
u32 entry_count ui("Entry Count");
|
||||
}
|
||||
|
||||
type asura_tsxt_chunk [display="TSXT Texture Set Chunk"] byteorder BE
|
||||
type asura_tsxt_chunk ui("TSXT Texture Set Chunk") byteorder BE
|
||||
{
|
||||
// TSXT chunk header (texture set)
|
||||
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");
|
||||
chunk_id = ascii(read(4)) ui("Chunk ID");
|
||||
u32 chunk_size ui("Chunk Size");
|
||||
u32 version ui("Version");
|
||||
u32 flags ui("Flags");
|
||||
|
||||
// Texture count
|
||||
u32 texture_count;
|
||||
texture_count = texture_count;
|
||||
|
||||
ui("texture_count", "Texture Count");
|
||||
u32 texture_count ui("Texture Count");
|
||||
}
|
||||
|
||||
type asura_stsa_chunk [display="STSA Asset List Chunk"] byteorder BE
|
||||
type asura_stsa_chunk ui("STSA Asset List Chunk") byteorder BE
|
||||
{
|
||||
// STSA chunk header (asset list - reversed ASTS)
|
||||
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");
|
||||
chunk_id = ascii(read(4)) ui("Chunk ID");
|
||||
u32 chunk_size ui("Chunk Size");
|
||||
u32 version ui("Version");
|
||||
u32 flags ui("Flags");
|
||||
|
||||
// File count
|
||||
u32 file_count;
|
||||
file_count = file_count;
|
||||
|
||||
ui("file_count", "File Count");
|
||||
u32 file_count ui("File Count");
|
||||
}
|
||||
|
||||
@ -2,68 +2,32 @@
|
||||
// Contains camera settings for cutscenes
|
||||
// Found in .cut files
|
||||
|
||||
type catc_chunk [display="CATC Camera"] byteorder BE
|
||||
type catc_chunk ui("CATC Camera") 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");
|
||||
chunk_id = ascii(read(4)) ui("Chunk ID");
|
||||
u32 chunk_size ui("Chunk Size");
|
||||
u32 version ui("Version");
|
||||
u32 flags ui("Flags");
|
||||
|
||||
// Unknown fields
|
||||
u32 unknown1;
|
||||
u32 unknown2;
|
||||
|
||||
// Camera name (null-terminated)
|
||||
camera_name = cstring();
|
||||
camera_name = camera_name;
|
||||
|
||||
ui("camera_name", "Camera Name");
|
||||
camera_name = cstring() ui("Camera Name");
|
||||
|
||||
// Use camera name for display (clean removes non-printable chars)
|
||||
set_name(clean(camera_name));
|
||||
|
||||
// Camera ID/reference
|
||||
u32 camera_id;
|
||||
camera_id = camera_id;
|
||||
|
||||
ui("camera_id", "Camera ID");
|
||||
u32 camera_id ui("Camera ID");
|
||||
|
||||
// Frame range
|
||||
u32 start_frame;
|
||||
u32 end_frame;
|
||||
|
||||
start_frame = start_frame;
|
||||
|
||||
|
||||
ui("start_frame", "Start Frame");
|
||||
end_frame = end_frame;
|
||||
|
||||
ui("end_frame", "End Frame");
|
||||
u32 start_frame ui("Start Frame");
|
||||
u32 end_frame ui("End Frame");
|
||||
|
||||
// Camera settings
|
||||
u32 camera_flags;
|
||||
f32 fov;
|
||||
|
||||
camera_flags = camera_flags;
|
||||
|
||||
|
||||
ui("camera_flags", "Camera Flags");
|
||||
fov = fov;
|
||||
|
||||
ui("fov", "Field of View");
|
||||
u32 camera_flags ui("Camera Flags");
|
||||
f32 fov ui("Field of View");
|
||||
}
|
||||
|
||||
@ -2,52 +2,24 @@
|
||||
// Contains embedded file data with path and type information
|
||||
// Primary chunk type for storing assets in Asura archives
|
||||
|
||||
type fcsr_chunk [display="FCSR Resource"] byteorder BE
|
||||
type fcsr_chunk ui("FCSR Resource") byteorder BE
|
||||
{
|
||||
// Save chunk start position
|
||||
chunk_start = pos();
|
||||
|
||||
// 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");
|
||||
chunk_id = ascii(read(4)) ui("Chunk ID");
|
||||
u32 chunk_size ui("Chunk Size");
|
||||
u32 version ui("Version");
|
||||
u32 flags ui("Flags");
|
||||
|
||||
// Resource metadata
|
||||
u32 resource_type;
|
||||
u32 unknown1;
|
||||
u32 resource_size;
|
||||
|
||||
resource_type = resource_type;
|
||||
|
||||
|
||||
ui("resource_type", "Resource Type");
|
||||
unknown1 = unknown1;
|
||||
|
||||
ui("unknown1", "Unknown");
|
||||
resource_size = resource_size;
|
||||
|
||||
ui("resource_size", "Resource Size");
|
||||
u32 resource_type ui("Resource Type");
|
||||
u32 unknown1 ui("Unknown");
|
||||
u32 resource_size ui("Resource Size");
|
||||
|
||||
// Resource file path (null-terminated)
|
||||
resource_path = cstring();
|
||||
resource_path = resource_path;
|
||||
|
||||
ui("resource_path", "Resource Path");
|
||||
resource_path = cstring() ui("Resource Path");
|
||||
|
||||
// Get filename from path and set as chunk name for tree display
|
||||
export_name = basename(resource_path);
|
||||
|
||||
@ -2,39 +2,19 @@
|
||||
// Contains mesh and game object settings
|
||||
// Found in .ent files
|
||||
|
||||
type gsms_chunk [display="GSMS Game Settings"] byteorder BE
|
||||
type gsms_chunk ui("GSMS Game Settings") 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");
|
||||
chunk_id = ascii(read(4)) ui("Chunk ID");
|
||||
u32 chunk_size ui("Chunk Size");
|
||||
u32 version ui("Version");
|
||||
u32 flags ui("Flags");
|
||||
|
||||
// Entry count
|
||||
u32 entry_count;
|
||||
entry_count = entry_count;
|
||||
|
||||
ui("entry_count", "Entry Count");
|
||||
u32 entry_count ui("Entry Count");
|
||||
|
||||
// Unknown field
|
||||
u32 unknown1;
|
||||
unknown1 = unknown1;
|
||||
|
||||
ui("unknown1", "Unknown1");
|
||||
u32 unknown1 ui("Unknown1");
|
||||
|
||||
// Each entry appears to be 24 bytes:
|
||||
// - 4 bytes: flags/type
|
||||
|
||||
@ -2,49 +2,23 @@
|
||||
// Contains entity definitions and properties
|
||||
// Found in .ent files
|
||||
|
||||
type itne_chunk [display="ITNE Entity"] byteorder BE
|
||||
type itne_chunk ui("ITNE Entity") 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");
|
||||
chunk_id = ascii(read(4)) ui("Chunk ID");
|
||||
u32 chunk_size ui("Chunk Size");
|
||||
u32 version ui("Version");
|
||||
u32 flags ui("Flags");
|
||||
|
||||
// Entity ID
|
||||
u32 entity_id;
|
||||
entity_id = entity_id;
|
||||
|
||||
ui("entity_id", "Entity ID");
|
||||
u32 entity_id ui("Entity ID");
|
||||
|
||||
// Entity type/class
|
||||
u32 entity_type;
|
||||
entity_type = entity_type;
|
||||
|
||||
ui("entity_type", "Entity Type");
|
||||
u32 entity_type ui("Entity Type");
|
||||
|
||||
// Property count
|
||||
u32 property_count;
|
||||
property_count = property_count;
|
||||
|
||||
ui("property_count", "Property Count");
|
||||
u32 property_count ui("Property Count");
|
||||
|
||||
// Entity flags
|
||||
u32 entity_flags;
|
||||
entity_flags = entity_flags;
|
||||
|
||||
ui("entity_flags", "Entity Flags");
|
||||
u32 entity_flags ui("Entity Flags");
|
||||
}
|
||||
|
||||
@ -2,43 +2,23 @@
|
||||
// Contains references to other files/archives
|
||||
// Common in .cut, .ent, and other Asura files
|
||||
|
||||
type lfsr_chunk [display="LFSR List Reference"] byteorder BE
|
||||
type lfsr_chunk ui("LFSR List Reference") 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");
|
||||
chunk_id = ascii(read(4)) ui("Chunk ID");
|
||||
u32 chunk_size ui("Chunk Size");
|
||||
u32 version ui("Version");
|
||||
u32 flags ui("Flags");
|
||||
|
||||
// Number of file references
|
||||
u32 entry_count;
|
||||
entry_count = entry_count;
|
||||
|
||||
ui("entry_count", "Entry Count");
|
||||
u32 entry_count ui("Entry Count");
|
||||
|
||||
// Get type-specific index for naming
|
||||
idx = ctx_get("_lfsr_idx");
|
||||
|
||||
// Read file reference path (null-terminated string)
|
||||
if (entry_count > 0) {
|
||||
ref_path = cstring();
|
||||
ref_path = ref_path;
|
||||
|
||||
ui("ref_path", "Reference Path");
|
||||
ref_path = cstring() ui("Reference Path");
|
||||
}
|
||||
|
||||
// Set indexed name (format: lfsr.0, lfsr.1, etc.)
|
||||
|
||||
@ -2,43 +2,20 @@
|
||||
// Contains pose and animation keyframe data
|
||||
// Found in .cut files
|
||||
|
||||
type pose_chunk [display="POSE Animation Pose"] byteorder BE
|
||||
type pose_chunk ui("POSE Animation Pose") 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");
|
||||
chunk_id = ascii(read(4)) ui("Chunk ID");
|
||||
u32 chunk_size ui("Chunk Size");
|
||||
u32 version ui("Version");
|
||||
u32 flags ui("Flags");
|
||||
|
||||
// Bone/joint count
|
||||
u32 bone_count;
|
||||
bone_count = bone_count;
|
||||
|
||||
ui("bone_count", "Bone Count");
|
||||
u32 bone_count ui("Bone Count");
|
||||
|
||||
// Frame number
|
||||
u32 frame;
|
||||
frame = frame;
|
||||
|
||||
ui("frame", "Frame");
|
||||
u32 frame ui("Frame");
|
||||
|
||||
// Pose flags
|
||||
u32 pose_flags;
|
||||
pose_flags = pose_flags;
|
||||
|
||||
ui("pose_flags", "Pose Flags");
|
||||
u32 pose_flags ui("Pose Flags");
|
||||
}
|
||||
|
||||
@ -2,43 +2,20 @@
|
||||
// Contains previous frame vector data for interpolation
|
||||
// Found in .cut files
|
||||
|
||||
type pvet_chunk [display="PVET Previous Vector"] byteorder BE
|
||||
type pvet_chunk ui("PVET Previous Vector") 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");
|
||||
chunk_id = ascii(read(4)) ui("Chunk ID");
|
||||
u32 chunk_size ui("Chunk Size");
|
||||
u32 version ui("Version");
|
||||
u32 flags ui("Flags");
|
||||
|
||||
// Track type
|
||||
u32 track_type;
|
||||
track_type = track_type;
|
||||
|
||||
ui("track_type", "Track Type");
|
||||
u32 track_type ui("Track Type");
|
||||
|
||||
// Entry count
|
||||
u32 entry_count;
|
||||
entry_count = entry_count;
|
||||
|
||||
ui("entry_count", "Entry Count");
|
||||
u32 entry_count ui("Entry Count");
|
||||
|
||||
// Keyframe count
|
||||
u32 keyframe_count;
|
||||
keyframe_count = keyframe_count;
|
||||
|
||||
ui("keyframe_count", "Keyframe Count");
|
||||
u32 keyframe_count ui("Keyframe Count");
|
||||
}
|
||||
|
||||
@ -2,82 +2,34 @@
|
||||
// Contains rotation and transformation animation data
|
||||
// Found in .cut files
|
||||
|
||||
type rttc_chunk [display="RTTC Rotation Track"] byteorder BE
|
||||
type rttc_chunk ui("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");
|
||||
chunk_id = ascii(read(4)) ui("Chunk ID");
|
||||
u32 chunk_size ui("Chunk Size");
|
||||
u32 version ui("Version");
|
||||
u32 flags ui("Flags");
|
||||
|
||||
// Track entry count
|
||||
u32 entry_count;
|
||||
entry_count = entry_count;
|
||||
|
||||
ui("entry_count", "Entry Count");
|
||||
u32 entry_count ui("Entry Count");
|
||||
|
||||
// Keyframe count
|
||||
u32 keyframe_count;
|
||||
keyframe_count = keyframe_count;
|
||||
|
||||
ui("keyframe_count", "Keyframe Count");
|
||||
u32 keyframe_count ui("Keyframe Count");
|
||||
|
||||
// Target name (null-terminated)
|
||||
target_name = cstring();
|
||||
target_name = target_name;
|
||||
|
||||
ui("target_name", "Target Name");
|
||||
target_name = cstring() ui("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");
|
||||
f32 pos_x ui("Position X");
|
||||
f32 pos_y ui("Position Y");
|
||||
f32 pos_z ui("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");
|
||||
f32 rot_x ui("Rotation X");
|
||||
f32 rot_y ui("Rotation Y");
|
||||
f32 rot_z ui("Rotation Z");
|
||||
f32 rot_w ui("Rotation W");
|
||||
}
|
||||
|
||||
@ -2,40 +2,20 @@
|
||||
// Contains asset/file listings
|
||||
// Found in audio streaming archives (.asr files)
|
||||
|
||||
type stsa_chunk [display="STSA Asset List"] byteorder BE
|
||||
type stsa_chunk ui("STSA Asset List") 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");
|
||||
chunk_id = ascii(read(4)) ui("Chunk ID");
|
||||
u32 chunk_size ui("Chunk Size");
|
||||
u32 version ui("Version");
|
||||
u32 flags ui("Flags");
|
||||
|
||||
// File/asset count
|
||||
u32 file_count;
|
||||
file_count = file_count;
|
||||
|
||||
ui("file_count", "File Count");
|
||||
u32 file_count ui("File Count");
|
||||
|
||||
// Sniper Elite III+ has an extra field indicating internal (0) or external (1) files
|
||||
// Check version to determine format
|
||||
if (version >= 3) {
|
||||
u32 external_flag;
|
||||
external_flag = external_flag;
|
||||
|
||||
ui("external_flag", "External Flag");
|
||||
u32 external_flag ui("External Flag");
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,60 +2,29 @@
|
||||
// Contains cutscene structure and scene data
|
||||
// Found in .cut files
|
||||
|
||||
type stuc_chunk [display="STUC Cutscene Structure"] byteorder BE
|
||||
type stuc_chunk ui("STUC Cutscene Structure") 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");
|
||||
chunk_id = ascii(read(4)) ui("Chunk ID");
|
||||
u32 chunk_size ui("Chunk Size");
|
||||
u32 version ui("Version");
|
||||
u32 flags ui("Flags");
|
||||
|
||||
// Scene entry count
|
||||
u32 entry_count;
|
||||
entry_count = entry_count;
|
||||
|
||||
ui("entry_count", "Entry Count");
|
||||
u32 entry_count ui("Entry Count");
|
||||
|
||||
// Unknown fields
|
||||
u32 unknown1;
|
||||
u32 unknown2;
|
||||
|
||||
// Scene name (null-terminated)
|
||||
scene_name = cstring();
|
||||
scene_name = scene_name;
|
||||
|
||||
ui("scene_name", "Scene Name");
|
||||
scene_name = cstring() ui("Scene Name");
|
||||
|
||||
// Use scene name for display (clean removes non-printable chars)
|
||||
set_name(clean(scene_name));
|
||||
|
||||
// Position data (3 floats for X, Y, Z)
|
||||
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");
|
||||
f32 pos_x ui("Position X");
|
||||
f32 pos_y ui("Position Y");
|
||||
f32 pos_z ui("Position Z");
|
||||
}
|
||||
|
||||
@ -2,46 +2,23 @@
|
||||
// Contains camera target tracking data
|
||||
// Found in .cut files
|
||||
|
||||
type tatc_chunk [display="TATC Target Camera"] byteorder BE
|
||||
type tatc_chunk ui("TATC Target Camera") 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");
|
||||
chunk_id = ascii(read(4)) ui("Chunk ID");
|
||||
u32 chunk_size ui("Chunk Size");
|
||||
u32 version ui("Version");
|
||||
u32 flags ui("Flags");
|
||||
|
||||
// Target name (null-terminated)
|
||||
target_name = cstring();
|
||||
target_name = target_name;
|
||||
|
||||
ui("target_name", "Target Name");
|
||||
target_name = cstring() ui("Target Name");
|
||||
|
||||
// Use target name for display (clean removes non-printable chars)
|
||||
set_name(clean(target_name));
|
||||
|
||||
// Track entry count
|
||||
u32 entry_count;
|
||||
entry_count = entry_count;
|
||||
|
||||
ui("entry_count", "Entry Count");
|
||||
u32 entry_count ui("Entry Count");
|
||||
|
||||
// Keyframe count
|
||||
u32 keyframe_count;
|
||||
keyframe_count = keyframe_count;
|
||||
|
||||
ui("keyframe_count", "Keyframe Count");
|
||||
u32 keyframe_count ui("Keyframe Count");
|
||||
}
|
||||
|
||||
@ -2,43 +2,23 @@
|
||||
// Contains texture set information and references
|
||||
// Found in .tsBE files
|
||||
|
||||
type tsxt_chunk [display="TSXT Texture Set"] byteorder BE
|
||||
type tsxt_chunk ui("TSXT Texture Set") 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");
|
||||
chunk_id = ascii(read(4)) ui("Chunk ID");
|
||||
u32 chunk_size ui("Chunk Size");
|
||||
u32 version ui("Version");
|
||||
u32 flags ui("Flags");
|
||||
|
||||
// Texture count
|
||||
u32 texture_count;
|
||||
texture_count = texture_count;
|
||||
|
||||
ui("texture_count", "Texture Count");
|
||||
u32 texture_count ui("Texture Count");
|
||||
|
||||
// Get type-specific index for naming
|
||||
idx = ctx_get("_tsxt_idx");
|
||||
|
||||
// Reference to external texture archive
|
||||
if (texture_count > 0) {
|
||||
texture_archive_path = cstring();
|
||||
texture_archive_path = texture_archive_path;
|
||||
|
||||
ui("texture_archive_path", "Texture Archive");
|
||||
texture_archive_path = cstring() ui("Texture Archive");
|
||||
}
|
||||
|
||||
// Set indexed name (format: tsxt.0, tsxt.1, etc.)
|
||||
|
||||
@ -2,43 +2,20 @@
|
||||
// Contains target track attribute data
|
||||
// Found in .cut files
|
||||
|
||||
type ttat_chunk [display="TTAT Target Attribute"] byteorder BE
|
||||
type ttat_chunk ui("TTAT Target Attribute") 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");
|
||||
chunk_id = ascii(read(4)) ui("Chunk ID");
|
||||
u32 chunk_size ui("Chunk Size");
|
||||
u32 version ui("Version");
|
||||
u32 flags ui("Flags");
|
||||
|
||||
// Track type identifier
|
||||
u32 track_type;
|
||||
track_type = track_type;
|
||||
|
||||
ui("track_type", "Track Type");
|
||||
u32 track_type ui("Track Type");
|
||||
|
||||
// Entry count
|
||||
u32 entry_count;
|
||||
entry_count = entry_count;
|
||||
|
||||
ui("entry_count", "Entry Count");
|
||||
u32 entry_count ui("Entry Count");
|
||||
|
||||
// Attribute flags
|
||||
u32 attribute_flags;
|
||||
attribute_flags = attribute_flags;
|
||||
|
||||
ui("attribute_flags", "Attribute Flags");
|
||||
u32 attribute_flags ui("Attribute Flags");
|
||||
}
|
||||
|
||||
@ -2,53 +2,22 @@
|
||||
// Contains track vector entry data for animations
|
||||
// Found in .cut files
|
||||
|
||||
type tvet_chunk [display="TVET Track Vector Entry"] byteorder BE
|
||||
type tvet_chunk ui("TVET Track Vector Entry") 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");
|
||||
chunk_id = ascii(read(4)) ui("Chunk ID");
|
||||
u32 chunk_size ui("Chunk Size");
|
||||
u32 version ui("Version");
|
||||
u32 flags ui("Flags");
|
||||
|
||||
// Entry index
|
||||
u32 entry_index;
|
||||
entry_index = entry_index;
|
||||
|
||||
ui("entry_index", "Entry Index");
|
||||
u32 entry_index ui("Entry Index");
|
||||
|
||||
// Vector data (3 floats)
|
||||
f32 vec_x;
|
||||
f32 vec_y;
|
||||
f32 vec_z;
|
||||
|
||||
vec_x = vec_x;
|
||||
|
||||
|
||||
ui("vec_x", "Vector X");
|
||||
vec_y = vec_y;
|
||||
|
||||
ui("vec_y", "Vector Y");
|
||||
vec_z = vec_z;
|
||||
|
||||
ui("vec_z", "Vector Z");
|
||||
f32 vec_x ui("Vector X");
|
||||
f32 vec_y ui("Vector Y");
|
||||
f32 vec_z ui("Vector Z");
|
||||
|
||||
// Time/frame reference
|
||||
u32 frame;
|
||||
frame = frame;
|
||||
|
||||
ui("frame", "Frame");
|
||||
u32 frame ui("Frame");
|
||||
}
|
||||
|
||||
@ -2,41 +2,21 @@
|
||||
// Contains texture path references
|
||||
// Found in .ent files
|
||||
|
||||
type txet_chunk [display="TXET Texture References"] byteorder BE
|
||||
type txet_chunk ui("TXET Texture References") 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");
|
||||
chunk_id = ascii(read(4)) ui("Chunk ID");
|
||||
u32 chunk_size ui("Chunk Size");
|
||||
u32 version ui("Version");
|
||||
u32 flags ui("Flags");
|
||||
|
||||
// Number of texture references
|
||||
u32 texture_count;
|
||||
texture_count = texture_count;
|
||||
|
||||
ui("texture_count", "Texture Count");
|
||||
u32 texture_count ui("Texture Count");
|
||||
|
||||
// Texture paths are null-terminated strings concatenated together
|
||||
// Read first texture path as example
|
||||
if (texture_count > 0) {
|
||||
first_texture = cstring();
|
||||
first_texture = first_texture;
|
||||
|
||||
ui("first_texture", "First Texture");
|
||||
first_texture = cstring() ui("First Texture");
|
||||
|
||||
// Use basename for display
|
||||
set_name(basename(first_texture));
|
||||
|
||||
@ -2,52 +2,26 @@
|
||||
// Contains user-defined camera track data
|
||||
// Found in .cut files
|
||||
|
||||
type ucat_chunk [display="UCAT User Camera Track"] byteorder BE
|
||||
type ucat_chunk ui("UCAT User Camera 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");
|
||||
chunk_id = ascii(read(4)) ui("Chunk ID");
|
||||
u32 chunk_size ui("Chunk Size");
|
||||
u32 version ui("Version");
|
||||
u32 flags ui("Flags");
|
||||
|
||||
// Camera name (null-terminated)
|
||||
camera_name = cstring();
|
||||
camera_name = camera_name;
|
||||
|
||||
ui("camera_name", "Camera Name");
|
||||
camera_name = cstring() ui("Camera Name");
|
||||
|
||||
// Use camera name for display (clean removes non-printable chars)
|
||||
set_name(clean(camera_name));
|
||||
|
||||
// Track entry count
|
||||
u32 entry_count;
|
||||
entry_count = entry_count;
|
||||
|
||||
ui("entry_count", "Entry Count");
|
||||
u32 entry_count ui("Entry Count");
|
||||
|
||||
// Keyframe count
|
||||
u32 keyframe_count;
|
||||
keyframe_count = keyframe_count;
|
||||
|
||||
ui("keyframe_count", "Keyframe Count");
|
||||
u32 keyframe_count ui("Keyframe Count");
|
||||
|
||||
// Camera type/mode
|
||||
u32 camera_mode;
|
||||
camera_mode = camera_mode;
|
||||
|
||||
ui("camera_mode", "Camera Mode");
|
||||
u32 camera_mode ui("Camera Mode");
|
||||
}
|
||||
|
||||
@ -2,52 +2,26 @@
|
||||
// Contains user-defined vector track data
|
||||
// Found in .cut files
|
||||
|
||||
type uvet_chunk [display="UVET User Vector Track"] byteorder BE
|
||||
type uvet_chunk ui("UVET User Vector 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");
|
||||
chunk_id = ascii(read(4)) ui("Chunk ID");
|
||||
u32 chunk_size ui("Chunk Size");
|
||||
u32 version ui("Version");
|
||||
u32 flags ui("Flags");
|
||||
|
||||
// Track name (null-terminated)
|
||||
track_name = cstring();
|
||||
track_name = track_name;
|
||||
|
||||
ui("track_name", "Track Name");
|
||||
track_name = cstring() ui("Track Name");
|
||||
|
||||
// Use track name for display (clean removes non-printable chars)
|
||||
set_name(clean(track_name));
|
||||
|
||||
// Entry count
|
||||
u32 entry_count;
|
||||
entry_count = entry_count;
|
||||
|
||||
ui("entry_count", "Entry Count");
|
||||
u32 entry_count ui("Entry Count");
|
||||
|
||||
// Keyframe count
|
||||
u32 keyframe_count;
|
||||
keyframe_count = keyframe_count;
|
||||
|
||||
ui("keyframe_count", "Keyframe Count");
|
||||
u32 keyframe_count ui("Keyframe Count");
|
||||
|
||||
// Vector type (position, scale, etc.)
|
||||
u32 vector_type;
|
||||
vector_type = vector_type;
|
||||
|
||||
ui("vector_type", "Vector Type");
|
||||
u32 vector_type ui("Vector Type");
|
||||
}
|
||||
|
||||
@ -2,59 +2,25 @@
|
||||
// Contains vector or vertex animation data
|
||||
// Found in .cut files
|
||||
|
||||
type vetc_chunk [display="VETC Vector Track"] byteorder BE
|
||||
type vetc_chunk ui("VETC Vector 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");
|
||||
chunk_id = ascii(read(4)) ui("Chunk ID");
|
||||
u32 chunk_size ui("Chunk Size");
|
||||
u32 version ui("Version");
|
||||
u32 flags ui("Flags");
|
||||
|
||||
// Track type
|
||||
u32 track_type;
|
||||
track_type = track_type;
|
||||
|
||||
ui("track_type", "Track Type");
|
||||
u32 track_type ui("Track Type");
|
||||
|
||||
// Unknown fields
|
||||
u32 unknown1;
|
||||
u32 unknown2;
|
||||
u32 unknown3;
|
||||
|
||||
unknown1 = unknown1;
|
||||
|
||||
|
||||
ui("unknown1", "Unknown1");
|
||||
unknown2 = unknown2;
|
||||
|
||||
ui("unknown2", "Unknown2");
|
||||
unknown3 = unknown3;
|
||||
|
||||
ui("unknown3", "Unknown3");
|
||||
u32 unknown1 ui("Unknown1");
|
||||
u32 unknown2 ui("Unknown2");
|
||||
u32 unknown3 ui("Unknown3");
|
||||
|
||||
// Entry count
|
||||
u32 entry_count;
|
||||
entry_count = entry_count;
|
||||
|
||||
ui("entry_count", "Entry Count");
|
||||
u32 entry_count ui("Entry Count");
|
||||
|
||||
// Keyframe count
|
||||
u32 keyframe_count;
|
||||
keyframe_count = keyframe_count;
|
||||
|
||||
ui("keyframe_count", "Keyframe Count");
|
||||
u32 keyframe_count ui("Keyframe Count");
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
// Cutscene file (Sniper Elite, AVP, etc.)
|
||||
// Direct Asura archive with LFSR list chunks
|
||||
|
||||
type cut [root, display="Cutscene"] byteorder BE
|
||||
type cut ui("Cutscene", root) byteorder BE
|
||||
{
|
||||
criteria {
|
||||
require _ext == "cut";
|
||||
@ -10,6 +10,5 @@ type cut [root, display="Cutscene"] byteorder BE
|
||||
}
|
||||
|
||||
// Parse as Asura archive
|
||||
archive = parse_here("asura_archive");
|
||||
ui("archive", "Asura Archive");
|
||||
archive = parse_here("asura_archive") ui("Asura Archive");
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
// English locale file (Big Endian, Sniper Elite, AVP, etc.)
|
||||
// Direct Asura archive
|
||||
|
||||
type enBE [root, display="English Locale (Big Endian)"] byteorder BE
|
||||
type enBE ui("English Locale (Big Endian)", root) byteorder BE
|
||||
{
|
||||
criteria {
|
||||
require _ext == "enbe";
|
||||
@ -10,6 +10,5 @@ type enBE [root, display="English Locale (Big Endian)"] byteorder BE
|
||||
}
|
||||
|
||||
// Parse as Asura archive
|
||||
archive = parse_here("asura_archive");
|
||||
ui("archive", "Asura Archive");
|
||||
archive = parse_here("asura_archive") ui("Asura Archive");
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
// Entity file (Sniper Elite, AVP, etc.)
|
||||
// Direct Asura archive with LFSR list chunks
|
||||
|
||||
type ent [root, display="Entity"] byteorder BE
|
||||
type ent ui("Entity", root) byteorder BE
|
||||
{
|
||||
criteria {
|
||||
require _ext == "ent";
|
||||
@ -10,6 +10,5 @@ type ent [root, display="Entity"] byteorder BE
|
||||
}
|
||||
|
||||
// Parse as Asura archive
|
||||
archive = parse_here("asura_archive");
|
||||
ui("archive", "Asura Archive");
|
||||
archive = parse_here("asura_archive") ui("Asura Archive");
|
||||
}
|
||||
|
||||
@ -1,13 +1,12 @@
|
||||
// French locale file (Big Endian, Sniper Elite, AVP, etc.)
|
||||
// Direct Asura archive
|
||||
|
||||
type frBE [root, display="French Locale (Big Endian)"] byteorder BE
|
||||
type frBE ui("French Locale (Big Endian)", root) byteorder BE
|
||||
{
|
||||
criteria {
|
||||
require _ext == "frbe";
|
||||
require ascii(bytesat(0, 8)) == "Asura ";
|
||||
}
|
||||
|
||||
archive = parse_here("asura_archive");
|
||||
ui("archive", "Asura Archive");
|
||||
archive = parse_here("asura_archive") ui("Asura Archive");
|
||||
}
|
||||
|
||||
@ -1,13 +1,12 @@
|
||||
// German locale file (Big Endian, Sniper Elite, AVP, etc.)
|
||||
// Direct Asura archive
|
||||
|
||||
type geBE [root, display="German Locale (Big Endian)"] byteorder BE
|
||||
type geBE ui("German Locale (Big Endian)", root) byteorder BE
|
||||
{
|
||||
criteria {
|
||||
require _ext == "gebe";
|
||||
require ascii(bytesat(0, 8)) == "Asura ";
|
||||
}
|
||||
|
||||
archive = parse_here("asura_archive");
|
||||
ui("archive", "Asura Archive");
|
||||
archive = parse_here("asura_archive") ui("Asura Archive");
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
// GUI file (Big Endian, Sniper Elite, AVP, etc.)
|
||||
// XMemCompressed data containing Asura archive
|
||||
|
||||
type guiBE [root, display="GUI (Big Endian)"] byteorder BE
|
||||
type guiBE ui("GUI (Big Endian)", root) byteorder BE
|
||||
{
|
||||
criteria {
|
||||
require _ext == "guibe";
|
||||
@ -13,14 +13,8 @@ type guiBE [root, display="GUI (Big Endian)"] byteorder BE
|
||||
}
|
||||
|
||||
// Read signature info for display
|
||||
u32 xmem_signature;
|
||||
u32 xmem_flags;
|
||||
xmem_signature = xmem_signature;
|
||||
|
||||
ui("xmem_signature", "XMem Signature");
|
||||
xmem_flags = xmem_flags;
|
||||
|
||||
ui("xmem_flags", "XMem Flags");
|
||||
u32 xmem_signature ui("XMem Signature");
|
||||
u32 xmem_flags ui("XMem Flags");
|
||||
|
||||
seek(0);
|
||||
|
||||
@ -33,12 +27,9 @@ type guiBE [root, display="GUI (Big Endian)"] byteorder BE
|
||||
|
||||
// Check if decompressed data is an Asura archive
|
||||
dec_sig = ascii(bytesof(decompressed_data, 0, 8));
|
||||
is_asura = (dec_sig == "Asura ");
|
||||
|
||||
ui("is_asura", "Is Asura Archive");
|
||||
is_asura = (dec_sig == "Asura ") ui("Is Asura Archive");
|
||||
|
||||
if (is_asura) {
|
||||
archive = decompressed_data |> parse asura_archive;
|
||||
ui("archive", "Asura Archive");
|
||||
archive = decompressed_data |> parse asura_archive ui("Asura Archive");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,13 +1,12 @@
|
||||
// Italian locale file (Big Endian, Sniper Elite, AVP, etc.)
|
||||
// Direct Asura archive
|
||||
|
||||
type itBE [root, display="Italian Locale (Big Endian)"] byteorder BE
|
||||
type itBE ui("Italian Locale (Big Endian)", root) byteorder BE
|
||||
{
|
||||
criteria {
|
||||
require _ext == "itbe";
|
||||
require ascii(bytesat(0, 8)) == "Asura ";
|
||||
}
|
||||
|
||||
archive = parse_here("asura_archive");
|
||||
ui("archive", "Asura Archive");
|
||||
archive = parse_here("asura_archive") ui("Asura Archive");
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
// Map file (Big Endian, Sniper Elite, AVP, etc.)
|
||||
// XMemCompressed data containing Asura archive
|
||||
|
||||
type mapBE [root, display="Map (Big Endian)"] byteorder BE
|
||||
type mapBE ui("Map (Big Endian)", root) byteorder BE
|
||||
{
|
||||
criteria {
|
||||
require _ext == "mapbe";
|
||||
@ -13,14 +13,8 @@ type mapBE [root, display="Map (Big Endian)"] byteorder BE
|
||||
}
|
||||
|
||||
// Read signature info for display
|
||||
u32 xmem_signature;
|
||||
u32 xmem_flags;
|
||||
xmem_signature = xmem_signature;
|
||||
|
||||
ui("xmem_signature", "XMem Signature");
|
||||
xmem_flags = xmem_flags;
|
||||
|
||||
ui("xmem_flags", "XMem Flags");
|
||||
u32 xmem_signature ui("XMem Signature");
|
||||
u32 xmem_flags ui("XMem Flags");
|
||||
|
||||
seek(0);
|
||||
|
||||
@ -33,12 +27,9 @@ type mapBE [root, display="Map (Big Endian)"] byteorder BE
|
||||
|
||||
// Check if decompressed data is an Asura archive
|
||||
dec_sig = ascii(bytesof(decompressed_data, 0, 8));
|
||||
is_asura = (dec_sig == "Asura ");
|
||||
|
||||
ui("is_asura", "Is Asura Archive");
|
||||
is_asura = (dec_sig == "Asura ") ui("Is Asura Archive");
|
||||
|
||||
if (is_asura) {
|
||||
archive = decompressed_data |> parse asura_archive;
|
||||
ui("archive", "Asura Archive");
|
||||
archive = decompressed_data |> parse asura_archive ui("Asura Archive");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,13 +1,12 @@
|
||||
// Russian locale file (Big Endian, Sniper Elite, AVP, etc.)
|
||||
// Direct Asura archive
|
||||
|
||||
type ruBE [root, display="Russian Locale (Big Endian)"] byteorder BE
|
||||
type ruBE ui("Russian Locale (Big Endian)", root) byteorder BE
|
||||
{
|
||||
criteria {
|
||||
require _ext == "rube";
|
||||
require ascii(bytesat(0, 8)) == "Asura ";
|
||||
}
|
||||
|
||||
archive = parse_here("asura_archive");
|
||||
ui("archive", "Asura Archive");
|
||||
archive = parse_here("asura_archive") ui("Asura Archive");
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
// Sprite/Scene file (Big Endian, Sniper Elite, AVP, etc.)
|
||||
// Direct Asura archive
|
||||
|
||||
type spBE [root, display="Sprite/Scene (Big Endian)"] byteorder BE
|
||||
type spBE ui("Sprite/Scene (Big Endian)", root) byteorder BE
|
||||
{
|
||||
criteria {
|
||||
require _ext == "spbe";
|
||||
@ -10,6 +10,5 @@ type spBE [root, display="Sprite/Scene (Big Endian)"] byteorder BE
|
||||
}
|
||||
|
||||
// Parse as Asura archive
|
||||
archive = parse_here("asura_archive");
|
||||
ui("archive", "Asura Archive");
|
||||
archive = parse_here("asura_archive") ui("Asura Archive");
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
// Streaming Sound Map file (Big Endian, Sniper Elite, AVP, etc.)
|
||||
// Direct Asura archive with STSA asset list chunks
|
||||
|
||||
type ssmBE [root, display="Streaming Sound Map (Big Endian)"] byteorder BE
|
||||
type ssmBE ui("Streaming Sound Map (Big Endian)", root) byteorder BE
|
||||
{
|
||||
criteria {
|
||||
require _ext == "ssmbe";
|
||||
@ -10,6 +10,5 @@ type ssmBE [root, display="Streaming Sound Map (Big Endian)"] byteorder BE
|
||||
}
|
||||
|
||||
// Parse as Asura archive
|
||||
archive = parse_here("asura_archive");
|
||||
ui("archive", "Asura Archive");
|
||||
archive = parse_here("asura_archive") ui("Asura Archive");
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
// Texture Set file (Big Endian, Sniper Elite, AVP, etc.)
|
||||
// Direct Asura archive with TSXT chunks
|
||||
|
||||
type tsBE [root, display="Texture Set"] byteorder BE
|
||||
type tsBE ui("Texture Set", root) byteorder BE
|
||||
{
|
||||
criteria {
|
||||
require _ext == "tsbe";
|
||||
@ -10,6 +10,5 @@ type tsBE [root, display="Texture Set"] byteorder BE
|
||||
}
|
||||
|
||||
// Parse as Asura archive
|
||||
archive = parse_here("asura_archive");
|
||||
ui("archive", "Asura Archive");
|
||||
archive = parse_here("asura_archive") ui("Asura Archive");
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
// Xbox 360 compressed archive (Sniper Elite, AVP, etc.)
|
||||
// XMemCompressed data containing Asura archive
|
||||
|
||||
type xbox360 [root, display="Xbox 360 Archive"] byteorder BE
|
||||
type xbox360 ui("Xbox 360 Archive", root) byteorder BE
|
||||
{
|
||||
criteria {
|
||||
require _ext == "xbox360";
|
||||
@ -11,20 +11,11 @@ type xbox360 [root, display="Xbox 360 Archive"] byteorder BE
|
||||
}
|
||||
|
||||
// Read signature info for display
|
||||
u32 xmem_signature;
|
||||
u32 xmem_flags;
|
||||
xmem_signature = xmem_signature;
|
||||
|
||||
ui("xmem_signature", "XMem Signature");
|
||||
xmem_flags = xmem_flags;
|
||||
|
||||
ui("xmem_flags", "XMem Flags");
|
||||
u32 xmem_signature ui("XMem Signature");
|
||||
u32 xmem_flags ui("XMem Flags");
|
||||
|
||||
// File size info
|
||||
compressed_size = size();
|
||||
compressed_size = compressed_size;
|
||||
|
||||
ui("compressed_size", "Compressed Size");
|
||||
compressed_size = size() ui("Compressed Size");
|
||||
|
||||
// Read entire file - decompressor handles header parsing
|
||||
seek(0);
|
||||
@ -33,29 +24,19 @@ type xbox360 [root, display="Xbox 360 Archive"] byteorder BE
|
||||
// Decompress with XMemDecompress (handles header internally)
|
||||
decompressed_data = compressed_data |> xmem;
|
||||
|
||||
decompressed_size = len(decompressed_data);
|
||||
decompressed_size = decompressed_size;
|
||||
|
||||
ui("decompressed_size", "Decompressed Size");
|
||||
decompressed_size = len(decompressed_data) ui("Decompressed Size");
|
||||
|
||||
// Export decompressed data for inspection
|
||||
write_file(_basename + ".asura", decompressed_data);
|
||||
|
||||
// Check decompressed data signature
|
||||
if (decompressed_size > 8) {
|
||||
dec_sig = ascii(bytesof(decompressed_data, 0, 8));
|
||||
dec_sig = dec_sig;
|
||||
dec_sig = ascii(bytesof(decompressed_data, 0, 8)) ui("Decompressed Signature");
|
||||
|
||||
ui("dec_sig", "Decompressed Signature");
|
||||
|
||||
is_asura = (dec_sig == "Asura ");
|
||||
is_asura = is_asura;
|
||||
|
||||
ui("is_asura", "Is Asura Archive");
|
||||
is_asura = (dec_sig == "Asura ") ui("Is Asura Archive");
|
||||
|
||||
if (is_asura) {
|
||||
archive = decompressed_data |> parse asura_archive;
|
||||
ui("archive", "Archive Contents");
|
||||
archive = decompressed_data |> parse asura_archive ui("Archive Contents");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
// Xbox 360 texture archive (Sniper Elite, AVP, etc.)
|
||||
// Direct Asura archive (not compressed)
|
||||
|
||||
type xbox360_textures [root, display="Xbox 360 Textures"] byteorder BE
|
||||
type xbox360_textures ui("Xbox 360 Textures", root) byteorder BE
|
||||
{
|
||||
criteria {
|
||||
require _ext == "xbox360_textures";
|
||||
@ -10,6 +10,5 @@ type xbox360_textures [root, display="Xbox 360 Textures"] byteorder BE
|
||||
}
|
||||
|
||||
// Parse as Asura archive
|
||||
archive = parse_here("asura_archive");
|
||||
ui("archive", "Asura Archive");
|
||||
archive = parse_here("asura_archive") ui("Asura Archive");
|
||||
}
|
||||
|
||||
@ -1,10 +1,7 @@
|
||||
type assetheader
|
||||
{
|
||||
u32 raw_type;
|
||||
i32 asset_ptr;
|
||||
|
||||
ui("raw_type", "Raw Type");
|
||||
ui("asset_ptr", "Asset Ptr");
|
||||
u32 raw_type ui("Raw Type");
|
||||
i32 asset_ptr ui("Asset Ptr");
|
||||
|
||||
// Lookup asset type name based on game/platform globals
|
||||
asset_type = "UNKNOWN";
|
||||
@ -47,7 +44,7 @@ type assetheader
|
||||
if (raw_type == 0x20) { asset_type = "stringtable"; }
|
||||
}
|
||||
|
||||
ui("asset_type", "Asset Type");
|
||||
asset_type = asset_type ui("Asset Type");
|
||||
|
||||
// Set display name to asset type
|
||||
set_name(asset_type);
|
||||
|
||||
@ -1,18 +1,11 @@
|
||||
type assetlist [display="Asset List"]
|
||||
type assetlist ui("Asset List")
|
||||
{
|
||||
const PTR_INLINE = -1;
|
||||
|
||||
u32 stringlist_count;
|
||||
ui("stringlist_count", "String List Count");
|
||||
|
||||
i32 stringlist_ptr;
|
||||
ui("stringlist_ptr", "String List Ptr");
|
||||
|
||||
u32 asset_count;
|
||||
ui("asset_count", "Asset Count");
|
||||
|
||||
i32 assets_ptr;
|
||||
ui("assets_ptr", "Assets Ptr");
|
||||
u32 stringlist_count ui("String List Count");
|
||||
i32 stringlist_ptr ui("String List Ptr");
|
||||
u32 asset_count ui("Asset Count");
|
||||
i32 assets_ptr ui("Assets Ptr");
|
||||
|
||||
// Parse string list inline
|
||||
stringlist = 0;
|
||||
|
||||
@ -1,16 +1,8 @@
|
||||
type columninfo [display="Column Info"]
|
||||
type columninfo ui("Column Info")
|
||||
{
|
||||
// columnInfo_s - 16 bytes total
|
||||
i32 pos;
|
||||
|
||||
ui("pos", "Pos");
|
||||
i32 width;
|
||||
|
||||
ui("width", "Width");
|
||||
i32 max_chars;
|
||||
|
||||
ui("max_chars", "Max Chars");
|
||||
i32 alignment;
|
||||
|
||||
ui("alignment", "Alignment");
|
||||
i32 pos ui("Pos");
|
||||
i32 width ui("Width");
|
||||
i32 max_chars ui("Max Chars");
|
||||
i32 alignment ui("Alignment");
|
||||
}
|
||||
|
||||
@ -1,13 +1,8 @@
|
||||
type d3dindexbuffer [display="D3D Index Buffer"]
|
||||
type d3dindexbuffer ui("D3D Index Buffer")
|
||||
{
|
||||
// D3D Resource base (24 bytes)
|
||||
resource = parse_here("d3dresource");
|
||||
|
||||
u32 address;
|
||||
|
||||
|
||||
ui("address", "Address");
|
||||
u32 size;
|
||||
|
||||
ui("size", "Size");
|
||||
u32 address ui("Address");
|
||||
u32 size ui("Size");
|
||||
}
|
||||
|
||||
@ -1,21 +1,9 @@
|
||||
type d3dresource [display="D3D Resource"]
|
||||
type d3dresource ui("D3D Resource")
|
||||
{
|
||||
u32 common;
|
||||
|
||||
ui("common", "Common");
|
||||
u32 reference_count;
|
||||
|
||||
ui("reference_count", "Reference Count");
|
||||
u32 fence;
|
||||
|
||||
ui("fence", "Fence");
|
||||
u32 read_fence;
|
||||
|
||||
ui("read_fence", "Read Fence");
|
||||
u32 identifier;
|
||||
|
||||
ui("identifier", "Identifier");
|
||||
u32 base_flush;
|
||||
|
||||
ui("base_flush", "Base Flush");
|
||||
u32 common ui("Common");
|
||||
u32 reference_count ui("Reference Count");
|
||||
u32 fence ui("Fence");
|
||||
u32 read_fence ui("Read Fence");
|
||||
u32 identifier ui("Identifier");
|
||||
u32 base_flush ui("Base Flush");
|
||||
}
|
||||
|
||||
@ -1,13 +1,9 @@
|
||||
type d3dvertexbuffer [display="D3D Vertex Buffer"]
|
||||
type d3dvertexbuffer ui("D3D Vertex Buffer")
|
||||
{
|
||||
// D3D Resource base (24 bytes)
|
||||
resource = parse_here("d3dresource");
|
||||
|
||||
|
||||
// GPU Vertex Fetch Constant / Raw Request (8 bytes - 2 x u32 packed bitfields)
|
||||
u32 fetch_w0;
|
||||
|
||||
ui("fetch_w0", "Fetch W0");
|
||||
u32 fetch_w1;
|
||||
|
||||
ui("fetch_w1", "Fetch W1");
|
||||
u32 fetch_w0 ui("Fetch W0");
|
||||
u32 fetch_w1 ui("Fetch W1");
|
||||
}
|
||||
|
||||
@ -1,28 +1,12 @@
|
||||
type editfielddef [display="Edit Field Def"]
|
||||
type editfielddef ui("Edit Field Def")
|
||||
{
|
||||
// editFieldDef_s - 32 bytes total
|
||||
f32 min_val;
|
||||
|
||||
ui("min_val", "Min Val");
|
||||
f32 max_val;
|
||||
|
||||
ui("max_val", "Max Val");
|
||||
f32 def_val;
|
||||
|
||||
ui("def_val", "Def Val");
|
||||
f32 range;
|
||||
|
||||
ui("range", "Range");
|
||||
i32 max_chars;
|
||||
|
||||
ui("max_chars", "Max Chars");
|
||||
i32 max_chars_goto_next;
|
||||
|
||||
ui("max_chars_goto_next", "Max Chars Goto Next");
|
||||
i32 max_paint_chars;
|
||||
|
||||
ui("max_paint_chars", "Max Paint Chars");
|
||||
i32 paint_offset;
|
||||
|
||||
ui("paint_offset", "Paint Offset");
|
||||
f32 min_val ui("Min Val");
|
||||
f32 max_val ui("Max Val");
|
||||
f32 def_val ui("Def Val");
|
||||
f32 range ui("Range");
|
||||
i32 max_chars ui("Max Chars");
|
||||
i32 max_chars_goto_next ui("Max Chars Goto Next");
|
||||
i32 max_paint_chars ui("Max Paint Chars");
|
||||
i32 paint_offset ui("Paint Offset");
|
||||
}
|
||||
|
||||
@ -1,29 +1,23 @@
|
||||
type expressionentry [display="Expression Entry"]
|
||||
type expressionentry ui("Expression Entry")
|
||||
{
|
||||
const PTR_INLINE = -1;
|
||||
|
||||
// int type - EET_OPERATOR(0) or EET_OPERAND(1)
|
||||
i32 entry_type;
|
||||
ui("entry_type", "Type");
|
||||
i32 entry_type ui("Type");
|
||||
|
||||
// entryInternalData union - 8 bytes
|
||||
if (entry_type == 0) {
|
||||
// Operator
|
||||
i32 op_code;
|
||||
ui("op_code", "Op Code");
|
||||
i32 op_code ui("Op Code");
|
||||
skip 4;
|
||||
} else {
|
||||
// Operand - dataType (4) + value union (4)
|
||||
i32 data_type;
|
||||
ui("data_type", "Data Type");
|
||||
|
||||
i32 value_raw;
|
||||
ui("value_raw", "Value/Ptr");
|
||||
i32 data_type ui("Data Type");
|
||||
i32 value_raw ui("Value/Ptr");
|
||||
|
||||
// If data_type == 2 (STRING) and value is -1, string is inline
|
||||
if (data_type == 2 && value_raw == PTR_INLINE) {
|
||||
string_val = cstring();
|
||||
ui("string_val", "String Value");
|
||||
string_val = cstring() ui("String Value");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
type fastfile [root, display="Fast File"] byteorder LE
|
||||
type fastfile ui("Fast File", root) byteorder LE
|
||||
{
|
||||
criteria {
|
||||
// Simplified: just check file extension for now
|
||||
@ -6,11 +6,11 @@ type fastfile [root, display="Fast File"] byteorder LE
|
||||
}
|
||||
|
||||
// Read header bytes needed for detection
|
||||
company_s = ascii(bytesat(0, 2));
|
||||
filetype_s = ascii(bytesat(2, 2));
|
||||
company_s = ascii(bytesat(0, 2)) ui("Company");
|
||||
filetype_s = ascii(bytesat(2, 2)) ui("File Type");
|
||||
signage_s = ascii(bytesat(4, 1));
|
||||
magic_s = ascii(bytesat(5, 3));
|
||||
version_i = u32at(8);
|
||||
magic_s = ascii(bytesat(5, 3)) ui("Magic");
|
||||
version_i = u32at(8) ui("Version");
|
||||
|
||||
// Detect game based on header signature
|
||||
detected_game = "UNKNOWN";
|
||||
@ -50,30 +50,9 @@ type fastfile [root, display="Fast File"] byteorder LE
|
||||
ctx_set("company", company_s);
|
||||
|
||||
// ---- UI fields ----
|
||||
company_s = company_s;
|
||||
|
||||
ui("company_s", "Company");
|
||||
filetype_s = filetype_s;
|
||||
|
||||
ui("filetype_s", "File Type");
|
||||
is_unsigned = (signage_s == "u");
|
||||
|
||||
ui("is_unsigned", "Is Unsigned");
|
||||
magic_s = magic_s;
|
||||
|
||||
ui("magic_s", "Magic");
|
||||
version_i = version_i;
|
||||
|
||||
ui("version_i", "Version");
|
||||
game_s = detected_game;
|
||||
|
||||
ui("game_s", "Game");
|
||||
platform_s = detected_platform;
|
||||
|
||||
ui("platform_s", "Platform");
|
||||
platform_u32 = platform_u32;
|
||||
|
||||
ui("platform_u32", "Platform ID");
|
||||
is_unsigned = (signage_s == "u") ui("Is Unsigned");
|
||||
game_s = detected_game ui("Game");
|
||||
platform_s = detected_platform ui("Platform");
|
||||
|
||||
if (version_i == 5) {
|
||||
byteorder LE;
|
||||
@ -91,7 +70,7 @@ type fastfile [root, display="Fast File"] byteorder LE
|
||||
u8 v0a;
|
||||
u8 v0b;
|
||||
|
||||
u32 platform_u32;
|
||||
u32 platform_u32 ui("Platform ID");
|
||||
|
||||
// Read and decompress zone file
|
||||
compressed_zone = read(EOF);
|
||||
|
||||
@ -1,29 +1,25 @@
|
||||
type font [display="Font"]
|
||||
type font ui("Font")
|
||||
{
|
||||
const PTR_INLINE = -1;
|
||||
|
||||
i32 name_ptr;
|
||||
ui("name_ptr", "Name Ptr");
|
||||
|
||||
i32 pixel_height;
|
||||
ui("pixel_height", "Pixel Height");
|
||||
|
||||
i32 glyph_count;
|
||||
ui("glyph_count", "Glyph Count");
|
||||
|
||||
i32 material_ptr;
|
||||
ui("material_ptr", "Material Ptr");
|
||||
|
||||
i32 glow_material_ptr;
|
||||
ui("glow_material_ptr", "Glow Material Ptr");
|
||||
|
||||
i32 glyphs_ptr;
|
||||
ui("glyphs_ptr", "Glyphs Ptr");
|
||||
i32 name_ptr ui("Name Ptr");
|
||||
i32 pixel_height ui("Pixel Height");
|
||||
i32 glyph_count ui("Glyph Count");
|
||||
i32 material_ptr ui("Material Ptr");
|
||||
i32 glow_material_ptr ui("Glow Material Ptr");
|
||||
i32 glyphs_ptr ui("Glyphs Ptr");
|
||||
|
||||
// Inline data
|
||||
inline cstring name when name_ptr [ui="Name", set_name];
|
||||
inline material material when material_ptr;
|
||||
inline material glow_material when glow_material_ptr;
|
||||
if (name_ptr == PTR_INLINE) {
|
||||
name = cstring() ui("Name");
|
||||
set_name(name);
|
||||
}
|
||||
if (material_ptr == PTR_INLINE) {
|
||||
material = parse_here("material");
|
||||
}
|
||||
if (glow_material_ptr == PTR_INLINE) {
|
||||
glow_material = parse_here("material");
|
||||
}
|
||||
|
||||
if (glyphs_ptr == PTR_INLINE && glyph_count > 0) {
|
||||
array[glyph_count] glyphs: glyph;
|
||||
|
||||
@ -1,44 +1,20 @@
|
||||
type gfxcell [display="GFX Cell"]
|
||||
type gfxcell ui("GFX Cell")
|
||||
{
|
||||
// Bounds (6 floats)
|
||||
mins = read(12);
|
||||
mins = read(12) ui("Mins");
|
||||
maxs = read(12) ui("Maxs");
|
||||
|
||||
ui("mins", "Mins");
|
||||
maxs = read(12);
|
||||
i32 aabb_tree_count ui("AABB Tree Count");
|
||||
i32 aabb_tree_ptr ui("AABB Tree Ptr");
|
||||
|
||||
ui("maxs", "Maxs");
|
||||
|
||||
i32 aabb_tree_count;
|
||||
i32 portal_count ui("Portal Count");
|
||||
i32 portals_ptr ui("Portals Ptr");
|
||||
|
||||
|
||||
ui("aabb_tree_count", "AABB Tree Count");
|
||||
i32 aabb_tree_ptr;
|
||||
i32 cull_group_count ui("Cull Group Count");
|
||||
i32 cull_groups_ptr ui("Cull Groups Ptr");
|
||||
|
||||
ui("aabb_tree_ptr", "AABB Tree Ptr");
|
||||
|
||||
i32 portal_count;
|
||||
u8 reflection_probe_count ui("Reflection Probe Count");
|
||||
i32 reflection_probes_ptr ui("Reflection Probes Ptr");
|
||||
|
||||
|
||||
ui("portal_count", "Portal Count");
|
||||
i32 portals_ptr;
|
||||
|
||||
ui("portals_ptr", "Portals Ptr");
|
||||
|
||||
i32 cull_group_count;
|
||||
|
||||
|
||||
ui("cull_group_count", "Cull Group Count");
|
||||
i32 cull_groups_ptr;
|
||||
|
||||
ui("cull_groups_ptr", "Cull Groups Ptr");
|
||||
|
||||
u8 reflection_probe_count;
|
||||
|
||||
|
||||
ui("reflection_probe_count", "Reflection Probe Count");
|
||||
i32 reflection_probes_ptr;
|
||||
|
||||
ui("reflection_probes_ptr", "Reflection Probes Ptr");
|
||||
|
||||
// Note: Array data would be parsed if pointers are valid
|
||||
}
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
type gfxdrawsurf [display="GFX Draw Surf"]
|
||||
type gfxdrawsurf ui("GFX Draw Surf")
|
||||
{
|
||||
// 64-bit packed bitfield containing rendering pipeline information
|
||||
u64 fields;
|
||||
ui("fields", "Fields");
|
||||
u64 fields ui("Fields");
|
||||
}
|
||||
|
||||
@ -1,37 +1,20 @@
|
||||
type gfximageloaddef [display="GFX Image Load Def"]
|
||||
type gfximageloaddef ui("GFX Image Load Def")
|
||||
{
|
||||
u8 level_count;
|
||||
|
||||
ui("level_count", "Level Count");
|
||||
u8 flags;
|
||||
|
||||
ui("flags", "Flags");
|
||||
u8 level_count ui("Level Count");
|
||||
u8 flags ui("Flags");
|
||||
|
||||
// Dimensions (3 x u16)
|
||||
u16 dimension_0;
|
||||
u16 dimension_0 ui("Dimension 0");
|
||||
u16 dimension_1 ui("Dimension 1");
|
||||
u16 dimension_2 ui("Dimension 2");
|
||||
|
||||
ui("dimension_0", "Dimension 0");
|
||||
u16 dimension_1;
|
||||
|
||||
ui("dimension_1", "Dimension 1");
|
||||
u16 dimension_2;
|
||||
|
||||
ui("dimension_2", "Dimension 2");
|
||||
|
||||
u32 format;
|
||||
|
||||
|
||||
ui("format", "Format");
|
||||
u32 format ui("Format");
|
||||
|
||||
// Resource size - when inline, this contains the size of pixel data that follows
|
||||
i32 resource_size;
|
||||
|
||||
ui("resource_size", "Resource Size");
|
||||
i32 resource_size ui("Resource Size");
|
||||
|
||||
// Read pixel data if present (resource_size > 0 indicates inline data)
|
||||
if (resource_size > 0) {
|
||||
pixel_data = read(resource_size);
|
||||
|
||||
ui("pixel_data", "Pixel Data");
|
||||
pixel_data = read(resource_size) ui("Pixel Data");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,46 +1,32 @@
|
||||
type gfxlight [display="GFX Light"]
|
||||
type gfxlight ui("GFX Light")
|
||||
{
|
||||
const PTR_INLINE = -1;
|
||||
|
||||
u8 light_type;
|
||||
ui("light_type", "Type");
|
||||
|
||||
u8 can_use_shadow_map;
|
||||
ui("can_use_shadow_map", "Can Use Shadow Map");
|
||||
u8 light_type ui("Type");
|
||||
u8 can_use_shadow_map ui("Can Use Shadow Map");
|
||||
|
||||
skip 2; // padding
|
||||
|
||||
// Color (3 floats)
|
||||
color = read(12);
|
||||
ui("color", "Color RGB");
|
||||
color = read(12) ui("Color RGB");
|
||||
|
||||
// Direction (3 floats)
|
||||
dir = read(12);
|
||||
ui("dir", "Direction");
|
||||
dir = read(12) ui("Direction");
|
||||
|
||||
// Origin (3 floats)
|
||||
origin = read(12);
|
||||
ui("origin", "Origin");
|
||||
origin = read(12) ui("Origin");
|
||||
|
||||
// Other params
|
||||
radius = read(4);
|
||||
ui("radius", "Radius");
|
||||
radius = read(4) ui("Radius");
|
||||
cos_half_fov_outer = read(4) ui("Cos Half FOV Outer");
|
||||
cos_half_fov_inner = read(4) ui("Cos Half FOV Inner");
|
||||
|
||||
cos_half_fov_outer = read(4);
|
||||
ui("cos_half_fov_outer", "Cos Half FOV Outer");
|
||||
|
||||
cos_half_fov_inner = read(4);
|
||||
ui("cos_half_fov_inner", "Cos Half FOV Inner");
|
||||
|
||||
i32 exponent;
|
||||
ui("exponent", "Exponent");
|
||||
|
||||
u32 spot_shadow_index;
|
||||
ui("spot_shadow_index", "Spot Shadow Index");
|
||||
|
||||
i32 def_ptr;
|
||||
ui("def_ptr", "Def Ptr");
|
||||
i32 exponent ui("Exponent");
|
||||
u32 spot_shadow_index ui("Spot Shadow Index");
|
||||
i32 def_ptr ui("Def Ptr");
|
||||
|
||||
// Inline data
|
||||
inline gfxlightdef def when def_ptr;
|
||||
if (def_ptr == PTR_INLINE) {
|
||||
def = parse_here("gfxlightdef");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,16 +1,17 @@
|
||||
type gfxlightdef [display="GFX Light Def"]
|
||||
type gfxlightdef ui("GFX Light Def")
|
||||
{
|
||||
const PTR_INLINE = -1;
|
||||
|
||||
i32 name_ptr;
|
||||
ui("name_ptr", "Name Ptr");
|
||||
i32 name_ptr ui("Name Ptr");
|
||||
|
||||
// Attenuation (GfxLightImage)
|
||||
attenuation = parse_here("gfxlightimage");
|
||||
|
||||
u32 lmap_lookup_start;
|
||||
ui("lmap_lookup_start", "LMap Lookup Start");
|
||||
u32 lmap_lookup_start ui("LMap Lookup Start");
|
||||
|
||||
// Inline data
|
||||
inline cstring name when name_ptr [ui="Name", set_name];
|
||||
if (name_ptr == PTR_INLINE) {
|
||||
name = cstring() ui("Name");
|
||||
set_name(name);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,56 +1,25 @@
|
||||
type gfxlightgrid [display="GFX Light Grid"]
|
||||
type gfxlightgrid ui("GFX Light Grid")
|
||||
{
|
||||
// PC version: 56 bytes (mins/maxs are uint16_t[3], not float[3])
|
||||
u8 has_light_regions;
|
||||
|
||||
ui("has_light_regions", "Has Light Regions");
|
||||
u8 has_light_regions ui("Has Light Regions");
|
||||
skip(3); // padding
|
||||
|
||||
u32 sun_primary_light_index;
|
||||
|
||||
|
||||
ui("sun_primary_light_index", "Sun Primary Light Index");
|
||||
u32 sun_primary_light_index ui("Sun Primary Light Index");
|
||||
|
||||
// Bounds are uint16_t[3] on PC (6 bytes each)
|
||||
mins = read(6);
|
||||
mins = read(6) ui("Mins");
|
||||
maxs = read(6) ui("Maxs");
|
||||
|
||||
ui("mins", "Mins");
|
||||
maxs = read(6);
|
||||
u32 row_axis ui("Row Axis");
|
||||
u32 col_axis ui("Col Axis");
|
||||
|
||||
ui("maxs", "Maxs");
|
||||
i32 row_data_start_ptr ui("Row Data Start Ptr");
|
||||
u32 raw_row_data_size ui("Raw Row Data Size");
|
||||
i32 raw_row_data_ptr ui("Raw Row Data Ptr");
|
||||
|
||||
u32 row_axis;
|
||||
u32 entry_count ui("Entry Count");
|
||||
i32 entries_ptr ui("Entries Ptr");
|
||||
|
||||
|
||||
ui("row_axis", "Row Axis");
|
||||
u32 col_axis;
|
||||
|
||||
ui("col_axis", "Col Axis");
|
||||
|
||||
i32 row_data_start_ptr;
|
||||
|
||||
|
||||
ui("row_data_start_ptr", "Row Data Start Ptr");
|
||||
u32 raw_row_data_size;
|
||||
|
||||
ui("raw_row_data_size", "Raw Row Data Size");
|
||||
i32 raw_row_data_ptr;
|
||||
|
||||
ui("raw_row_data_ptr", "Raw Row Data Ptr");
|
||||
|
||||
u32 entry_count;
|
||||
|
||||
|
||||
ui("entry_count", "Entry Count");
|
||||
i32 entries_ptr;
|
||||
|
||||
ui("entries_ptr", "Entries Ptr");
|
||||
|
||||
u32 color_count;
|
||||
|
||||
|
||||
ui("color_count", "Color Count");
|
||||
i32 colors_ptr;
|
||||
|
||||
ui("colors_ptr", "Colors Ptr");
|
||||
u32 color_count ui("Color Count");
|
||||
i32 colors_ptr ui("Colors Ptr");
|
||||
}
|
||||
|
||||
@ -1,15 +1,14 @@
|
||||
type gfxlightimage [display="GFX Light Image"]
|
||||
type gfxlightimage ui("GFX Light Image")
|
||||
{
|
||||
const PTR_INLINE = -1;
|
||||
|
||||
i32 image_ptr;
|
||||
ui("image_ptr", "Image Ptr");
|
||||
|
||||
u8 sampler_state;
|
||||
ui("sampler_state", "Sampler State");
|
||||
i32 image_ptr ui("Image Ptr");
|
||||
u8 sampler_state ui("Sampler State");
|
||||
|
||||
skip 3; // padding
|
||||
|
||||
// Inline data
|
||||
inline image image when image_ptr;
|
||||
if (image_ptr == PTR_INLINE) {
|
||||
image = parse_here("image");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,14 +1,15 @@
|
||||
type gfxlightmaparray [display="GFX Lightmap Array"]
|
||||
type gfxlightmaparray ui("GFX Lightmap Array")
|
||||
{
|
||||
const PTR_INLINE = -1;
|
||||
|
||||
i32 primary_ptr;
|
||||
ui("primary_ptr", "Primary Ptr");
|
||||
|
||||
i32 secondary_ptr;
|
||||
ui("secondary_ptr", "Secondary Ptr");
|
||||
i32 primary_ptr ui("Primary Ptr");
|
||||
i32 secondary_ptr ui("Secondary Ptr");
|
||||
|
||||
// Inline data
|
||||
inline image primary when primary_ptr;
|
||||
inline image secondary when secondary_ptr;
|
||||
if (primary_ptr == PTR_INLINE) {
|
||||
primary = parse_here("image");
|
||||
}
|
||||
if (secondary_ptr == PTR_INLINE) {
|
||||
secondary = parse_here("image");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,25 +1,16 @@
|
||||
type gfxpixelshaderloaddef [display="GFX Pixel Shader Load Def"]
|
||||
type gfxpixelshaderloaddef ui("GFX Pixel Shader Load Def")
|
||||
{
|
||||
// Shader program bytecode
|
||||
u32 program_size;
|
||||
|
||||
ui("program_size", "Program Size");
|
||||
u32 program_size ui("Program Size");
|
||||
|
||||
if (program_size > 0) {
|
||||
program = read(program_size);
|
||||
|
||||
ui("program", "Program");
|
||||
program = read(program_size) ui("Program");
|
||||
}
|
||||
|
||||
u32 micro_code_size;
|
||||
|
||||
|
||||
ui("micro_code_size", "Micro Code Size");
|
||||
u32 micro_code_size ui("Micro Code Size");
|
||||
|
||||
// Note: micro_code_size is always 0 for PC platform
|
||||
if (micro_code_size > 0) {
|
||||
micro_code = read(micro_code_size);
|
||||
|
||||
ui("micro_code", "Micro Code");
|
||||
micro_code = read(micro_code_size) ui("Micro Code");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,10 +1,8 @@
|
||||
type gfxreflectionprobe [display="GFX Reflection Probe"]
|
||||
type gfxreflectionprobe ui("GFX Reflection Probe")
|
||||
{
|
||||
// Origin (3 floats = 12 bytes)
|
||||
origin = read(12);
|
||||
origin = read(12) ui("Origin");
|
||||
|
||||
ui("origin", "Origin");
|
||||
|
||||
// Reflection image
|
||||
reflection_image = parse_here("image");
|
||||
}
|
||||
|
||||
@ -1,9 +1,5 @@
|
||||
type gfxstatebits [display="GFX State Bits"]
|
||||
type gfxstatebits ui("GFX State Bits")
|
||||
{
|
||||
u32 load_bits_0;
|
||||
|
||||
ui("load_bits_0", "Load Bits 0");
|
||||
u32 load_bits_1;
|
||||
|
||||
ui("load_bits_1", "Load Bits 1");
|
||||
u32 load_bits_0 ui("Load Bits 0");
|
||||
u32 load_bits_1 ui("Load Bits 1");
|
||||
}
|
||||
|
||||
@ -1,24 +1,12 @@
|
||||
type gfxstreamingaabbtree [display="GFX Streaming AABB Tree"]
|
||||
type gfxstreamingaabbtree ui("GFX Streaming AABB Tree")
|
||||
{
|
||||
u16 first_item;
|
||||
u16 first_item ui("First Item");
|
||||
u16 item_count ui("Item Count");
|
||||
u16 first_child ui("First Child");
|
||||
u16 child_count ui("Child Count");
|
||||
|
||||
ui("first_item", "First Item");
|
||||
u16 item_count;
|
||||
|
||||
ui("item_count", "Item Count");
|
||||
u16 first_child;
|
||||
|
||||
ui("first_child", "First Child");
|
||||
u16 child_count;
|
||||
|
||||
ui("child_count", "Child Count");
|
||||
|
||||
// Bounds (6 floats)
|
||||
// Note: Using read() since we don't have float type yet
|
||||
mins = read(12);
|
||||
|
||||
ui("mins", "Mins");
|
||||
maxs = read(12);
|
||||
|
||||
ui("maxs", "Maxs");
|
||||
mins = read(12) ui("Mins");
|
||||
maxs = read(12) ui("Maxs");
|
||||
}
|
||||
|
||||
@ -1,12 +1,11 @@
|
||||
type gfxtexture [display="GFX Texture"]
|
||||
type gfxtexture ui("GFX Texture")
|
||||
{
|
||||
const PTR_INLINE = -1;
|
||||
const PTR_INLINE_STREAMING = -2;
|
||||
|
||||
// GfxTexture is a union of different texture types
|
||||
// For inline data (-1 or -2), parse load def
|
||||
i32 base_map_ptr;
|
||||
ui("base_map_ptr", "Base Map Ptr");
|
||||
i32 base_map_ptr ui("Base Map Ptr");
|
||||
|
||||
if (base_map_ptr == PTR_INLINE || base_map_ptr == PTR_INLINE_STREAMING) {
|
||||
load_def = parse_here("gfximageloaddef");
|
||||
|
||||
@ -1,13 +1,9 @@
|
||||
type gfxvertexshaderloaddef [display="GFX Vertex Shader Load Def"]
|
||||
type gfxvertexshaderloaddef ui("GFX Vertex Shader Load Def")
|
||||
{
|
||||
// Shader program bytecode
|
||||
u32 program_size;
|
||||
|
||||
ui("program_size", "Program Size");
|
||||
u32 program_size ui("Program Size");
|
||||
|
||||
if (program_size > 0) {
|
||||
program = read(program_size);
|
||||
|
||||
ui("program", "Program");
|
||||
program = read(program_size) ui("Program");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
type gfxworld [display="GFX World"]
|
||||
type gfxworld ui("GFX World")
|
||||
{
|
||||
const PTR_INLINE = -1;
|
||||
|
||||
@ -7,56 +7,34 @@ type gfxworld [display="GFX World"]
|
||||
// ========================================
|
||||
|
||||
// Name pointers (8 bytes)
|
||||
i32 name_ptr;
|
||||
ui("name_ptr", "Name Ptr");
|
||||
|
||||
i32 basename_ptr;
|
||||
ui("basename_ptr", "Base Name Ptr");
|
||||
i32 name_ptr ui("Name Ptr");
|
||||
i32 basename_ptr ui("Base Name Ptr");
|
||||
|
||||
// Counts and indices (16 bytes)
|
||||
i32 plane_count;
|
||||
ui("plane_count", "Plane Count");
|
||||
|
||||
i32 node_count;
|
||||
ui("node_count", "Node Count");
|
||||
|
||||
i32 index_count;
|
||||
ui("index_count", "Index Count");
|
||||
|
||||
i32 indices_ptr;
|
||||
ui("indices_ptr", "Indices Ptr");
|
||||
i32 plane_count ui("Plane Count");
|
||||
i32 node_count ui("Node Count");
|
||||
i32 index_count ui("Index Count");
|
||||
i32 indices_ptr ui("Indices Ptr");
|
||||
|
||||
// PC has no D3DIndexBuffer - just surfaceCount + unk (8 bytes)
|
||||
i32 surface_count;
|
||||
ui("surface_count", "Surface Count");
|
||||
|
||||
i32 unk;
|
||||
ui("unk", "Unknown");
|
||||
i32 surface_count ui("Surface Count");
|
||||
i32 unk ui("Unknown");
|
||||
|
||||
// Sky data (16 bytes)
|
||||
i32 sky_surf_count;
|
||||
ui("sky_surf_count", "Sky Surf Count");
|
||||
|
||||
i32 sky_start_surfs_ptr;
|
||||
ui("sky_start_surfs_ptr", "Sky Start Surfs Ptr");
|
||||
|
||||
i32 sky_image_ptr;
|
||||
ui("sky_image_ptr", "Sky Image Ptr");
|
||||
|
||||
u8 sky_sampler_state;
|
||||
ui("sky_sampler_state", "Sky Sampler State");
|
||||
i32 sky_surf_count ui("Sky Surf Count");
|
||||
i32 sky_start_surfs_ptr ui("Sky Start Surfs Ptr");
|
||||
i32 sky_image_ptr ui("Sky Image Ptr");
|
||||
u8 sky_sampler_state ui("Sky Sampler State");
|
||||
|
||||
skip 3; // padding
|
||||
|
||||
// Vertex data (4 + 8 = 12 bytes)
|
||||
u32 vertex_count;
|
||||
ui("vertex_count", "Vertex Count");
|
||||
u32 vertex_count ui("Vertex Count");
|
||||
|
||||
vertex_data = parse_here("gfxworldvertexdata");
|
||||
|
||||
// Vertex layer data (4 + 8 = 12 bytes)
|
||||
u32 vertex_layer_data_size;
|
||||
ui("vertex_layer_data_size", "Vertex Layer Data Size");
|
||||
u32 vertex_layer_data_size ui("Vertex Layer Data Size");
|
||||
|
||||
vertex_layer_data = parse_here("gfxworldvertexlayerdata");
|
||||
|
||||
@ -64,118 +42,63 @@ type gfxworld [display="GFX World"]
|
||||
sun_parse = parse_here("sunlightparseparams");
|
||||
|
||||
// Sun light pointer (4 bytes)
|
||||
i32 sun_light_ptr;
|
||||
ui("sun_light_ptr", "Sun Light Ptr");
|
||||
i32 sun_light_ptr ui("Sun Light Ptr");
|
||||
|
||||
// Sun color from BSP (12 bytes)
|
||||
sun_color = read(12);
|
||||
ui("sun_color", "Sun Color");
|
||||
sun_color = read(12) ui("Sun Color");
|
||||
|
||||
// Light counts and reflection probes (24 bytes)
|
||||
u32 sun_primary_light_index;
|
||||
ui("sun_primary_light_index", "Sun Primary Light Index");
|
||||
|
||||
u32 primary_light_count;
|
||||
ui("primary_light_count", "Primary Light Count");
|
||||
|
||||
i32 cull_group_count;
|
||||
ui("cull_group_count", "Cull Group Count");
|
||||
|
||||
u32 reflection_probe_count;
|
||||
ui("reflection_probe_count", "Reflection Probe Count");
|
||||
|
||||
i32 reflection_probes_ptr;
|
||||
ui("reflection_probes_ptr", "Reflection Probes Ptr");
|
||||
|
||||
i32 reflection_probe_textures_ptr;
|
||||
ui("reflection_probe_textures_ptr", "Reflection Probe Textures Ptr");
|
||||
u32 sun_primary_light_index ui("Sun Primary Light Index");
|
||||
u32 primary_light_count ui("Primary Light Count");
|
||||
i32 cull_group_count ui("Cull Group Count");
|
||||
u32 reflection_probe_count ui("Reflection Probe Count");
|
||||
i32 reflection_probes_ptr ui("Reflection Probes Ptr");
|
||||
i32 reflection_probe_textures_ptr ui("Reflection Probe Textures Ptr");
|
||||
|
||||
// DPVS planes - EMBEDDED (16 bytes)
|
||||
dpvs_planes = parse_here("gfxworlddpvsplanes");
|
||||
|
||||
// Cells and lightmaps (16 bytes)
|
||||
i32 cell_bits_count;
|
||||
ui("cell_bits_count", "Cell Bits Count");
|
||||
|
||||
i32 cells_ptr;
|
||||
ui("cells_ptr", "Cells Ptr");
|
||||
|
||||
i32 lightmap_count;
|
||||
ui("lightmap_count", "Lightmap Count");
|
||||
|
||||
i32 lightmaps_ptr;
|
||||
ui("lightmaps_ptr", "Lightmaps Ptr");
|
||||
i32 cell_bits_count ui("Cell Bits Count");
|
||||
i32 cells_ptr ui("Cells Ptr");
|
||||
i32 lightmap_count ui("Lightmap Count");
|
||||
i32 lightmaps_ptr ui("Lightmaps Ptr");
|
||||
|
||||
// Light grid - EMBEDDED (56 bytes on PC - mins/maxs are uint16)
|
||||
light_grid = parse_here("gfxlightgrid");
|
||||
|
||||
// Texture pointers (16 bytes)
|
||||
i32 lightmaps_primary_ptr;
|
||||
ui("lightmaps_primary_ptr", "Lightmaps Primary Ptr");
|
||||
|
||||
i32 lightmaps_secondary_ptr;
|
||||
ui("lightmaps_secondary_ptr", "Lightmaps Secondary Ptr");
|
||||
|
||||
i32 model_count;
|
||||
ui("model_count", "Model Count");
|
||||
|
||||
i32 models_ptr;
|
||||
ui("models_ptr", "Models Ptr");
|
||||
i32 lightmaps_primary_ptr ui("Lightmaps Primary Ptr");
|
||||
i32 lightmaps_secondary_ptr ui("Lightmaps Secondary Ptr");
|
||||
i32 model_count ui("Model Count");
|
||||
i32 models_ptr ui("Models Ptr");
|
||||
|
||||
// Bounds (24 bytes)
|
||||
mins = read(12);
|
||||
ui("mins", "Mins");
|
||||
|
||||
maxs = read(12);
|
||||
ui("maxs", "Maxs");
|
||||
mins = read(12) ui("Mins");
|
||||
maxs = read(12) ui("Maxs");
|
||||
|
||||
// Checksum and material memory (12 bytes)
|
||||
u32 checksum;
|
||||
ui("checksum", "Checksum");
|
||||
|
||||
i32 material_memory_count;
|
||||
ui("material_memory_count", "Material Memory Count");
|
||||
|
||||
i32 material_memory_ptr;
|
||||
ui("material_memory_ptr", "Material Memory Ptr");
|
||||
u32 checksum ui("Checksum");
|
||||
i32 material_memory_count ui("Material Memory Count");
|
||||
i32 material_memory_ptr ui("Material Memory Ptr");
|
||||
|
||||
// Sun flare - EMBEDDED (96 bytes)
|
||||
sun_flare = parse_here("sunflare");
|
||||
|
||||
// Outdoor lookup matrix (64 bytes)
|
||||
outdoor_lookup_matrix = read(64);
|
||||
ui("outdoor_lookup_matrix", "Outdoor Lookup Matrix");
|
||||
outdoor_lookup_matrix = read(64) ui("Outdoor Lookup Matrix");
|
||||
|
||||
// Final pointers (40 bytes)
|
||||
i32 outdoor_image_ptr;
|
||||
ui("outdoor_image_ptr", "Outdoor Image Ptr");
|
||||
|
||||
i32 cell_caster_bits_ptr;
|
||||
ui("cell_caster_bits_ptr", "Cell Caster Bits Ptr");
|
||||
|
||||
i32 scene_dyn_model_ptr;
|
||||
ui("scene_dyn_model_ptr", "Scene Dyn Model Ptr");
|
||||
|
||||
i32 scene_dyn_brush_ptr;
|
||||
ui("scene_dyn_brush_ptr", "Scene Dyn Brush Ptr");
|
||||
|
||||
i32 primary_light_ent_shadow_vis_ptr;
|
||||
ui("primary_light_ent_shadow_vis_ptr", "Primary Light Ent Shadow Vis Ptr");
|
||||
|
||||
i32 primary_light_dyn_ent_shadow_vis_ptr_0;
|
||||
ui("primary_light_dyn_ent_shadow_vis_ptr_0", "Primary Light Dyn Ent Shadow Vis Ptr 0");
|
||||
|
||||
i32 primary_light_dyn_ent_shadow_vis_ptr_1;
|
||||
ui("primary_light_dyn_ent_shadow_vis_ptr_1", "Primary Light Dyn Ent Shadow Vis Ptr 1");
|
||||
|
||||
i32 primary_light_for_model_dyn_ent_ptr;
|
||||
ui("primary_light_for_model_dyn_ent_ptr", "Primary Light For Model Dyn Ent Ptr");
|
||||
|
||||
i32 shadow_geom_ptr;
|
||||
ui("shadow_geom_ptr", "Shadow Geom Ptr");
|
||||
|
||||
i32 light_region_ptr;
|
||||
ui("light_region_ptr", "Light Region Ptr");
|
||||
i32 outdoor_image_ptr ui("Outdoor Image Ptr");
|
||||
i32 cell_caster_bits_ptr ui("Cell Caster Bits Ptr");
|
||||
i32 scene_dyn_model_ptr ui("Scene Dyn Model Ptr");
|
||||
i32 scene_dyn_brush_ptr ui("Scene Dyn Brush Ptr");
|
||||
i32 primary_light_ent_shadow_vis_ptr ui("Primary Light Ent Shadow Vis Ptr");
|
||||
i32 primary_light_dyn_ent_shadow_vis_ptr_0 ui("Primary Light Dyn Ent Shadow Vis Ptr 0");
|
||||
i32 primary_light_dyn_ent_shadow_vis_ptr_1 ui("Primary Light Dyn Ent Shadow Vis Ptr 1");
|
||||
i32 primary_light_for_model_dyn_ent_ptr ui("Primary Light For Model Dyn Ent Ptr");
|
||||
i32 shadow_geom_ptr ui("Shadow Geom Ptr");
|
||||
i32 light_region_ptr ui("Light Region Ptr");
|
||||
|
||||
// DPVS static - EMBEDDED (104 bytes on PC - has 3 extra fields)
|
||||
dpvs = parse_here("gfxworlddpvsstatic");
|
||||
@ -188,26 +111,33 @@ type gfxworld [display="GFX World"]
|
||||
// ========================================
|
||||
|
||||
// Parse names if inline
|
||||
inline cstring name when name_ptr [ui="Name", set_name];
|
||||
inline cstring basename when basename_ptr [ui="Base Name"];
|
||||
if (name_ptr == PTR_INLINE) {
|
||||
name = cstring() ui("Name");
|
||||
set_name(name);
|
||||
}
|
||||
if (basename_ptr == PTR_INLINE) {
|
||||
basename = cstring() ui("Base Name");
|
||||
}
|
||||
|
||||
// Indices array - only if inline (ptr == -1)
|
||||
if (indices_ptr == PTR_INLINE && index_count > 0) {
|
||||
indices = read(index_count * 2);
|
||||
ui("indices", "Indices");
|
||||
indices = read(index_count * 2) ui("Indices");
|
||||
}
|
||||
|
||||
// Sky start surfs - only if inline
|
||||
if (sky_start_surfs_ptr == PTR_INLINE && sky_surf_count > 0) {
|
||||
sky_start_surfs = read(sky_surf_count * 4);
|
||||
ui("sky_start_surfs", "Sky Start Surfs");
|
||||
sky_start_surfs = read(sky_surf_count * 4) ui("Sky Start Surfs");
|
||||
}
|
||||
|
||||
// Sky image - only if inline
|
||||
inline image sky_image when sky_image_ptr;
|
||||
if (sky_image_ptr == PTR_INLINE) {
|
||||
sky_image = parse_here("image");
|
||||
}
|
||||
|
||||
// Sun light - only if inline
|
||||
inline gfxlight sun_light when sun_light_ptr;
|
||||
if (sun_light_ptr == PTR_INLINE) {
|
||||
sun_light = parse_here("gfxlight");
|
||||
}
|
||||
|
||||
// Reflection probes - only if inline
|
||||
if (reflection_probes_ptr == PTR_INLINE && reflection_probe_count > 0) {
|
||||
|
||||
@ -1,44 +1,20 @@
|
||||
type gfxworlddpvsdynamic [display="GFX World DPVS Dynamic"]
|
||||
type gfxworlddpvsdynamic ui("GFX World DPVS Dynamic")
|
||||
{
|
||||
// Fixed fields - dynEntClientWordCount[2] and dynEntClientCount[2]
|
||||
u32 dyn_ent_client_word_count_0;
|
||||
u32 dyn_ent_client_word_count_0 ui("Dyn Ent Client Word Count 0");
|
||||
u32 dyn_ent_client_word_count_1 ui("Dyn Ent Client Word Count 1");
|
||||
u32 dyn_ent_client_count_0 ui("Dyn Ent Client Count 0");
|
||||
u32 dyn_ent_client_count_1 ui("Dyn Ent Client Count 1");
|
||||
|
||||
ui("dyn_ent_client_word_count_0", "Dyn Ent Client Word Count 0");
|
||||
u32 dyn_ent_client_word_count_1;
|
||||
|
||||
ui("dyn_ent_client_word_count_1", "Dyn Ent Client Word Count 1");
|
||||
u32 dyn_ent_client_count_0;
|
||||
|
||||
ui("dyn_ent_client_count_0", "Dyn Ent Client Count 0");
|
||||
u32 dyn_ent_client_count_1;
|
||||
|
||||
ui("dyn_ent_client_count_1", "Dyn Ent Client Count 1");
|
||||
|
||||
// Pointers
|
||||
i32 dyn_ent_cell_bits_ptr_0;
|
||||
i32 dyn_ent_cell_bits_ptr_0 ui("Dyn Ent Cell Bits Ptr 0");
|
||||
i32 dyn_ent_cell_bits_ptr_1 ui("Dyn Ent Cell Bits Ptr 1");
|
||||
i32 dyn_ent_vis_data_ptr_0_0 ui("Dyn Ent Vis Data Ptr 0-0");
|
||||
i32 dyn_ent_vis_data_ptr_0_1 ui("Dyn Ent Vis Data Ptr 0-1");
|
||||
i32 dyn_ent_vis_data_ptr_0_2 ui("Dyn Ent Vis Data Ptr 0-2");
|
||||
i32 dyn_ent_vis_data_ptr_1_0 ui("Dyn Ent Vis Data Ptr 1-0");
|
||||
i32 dyn_ent_vis_data_ptr_1_1 ui("Dyn Ent Vis Data Ptr 1-1");
|
||||
i32 dyn_ent_vis_data_ptr_1_2 ui("Dyn Ent Vis Data Ptr 1-2");
|
||||
|
||||
ui("dyn_ent_cell_bits_ptr_0", "Dyn Ent Cell Bits Ptr 0");
|
||||
i32 dyn_ent_cell_bits_ptr_1;
|
||||
|
||||
ui("dyn_ent_cell_bits_ptr_1", "Dyn Ent Cell Bits Ptr 1");
|
||||
i32 dyn_ent_vis_data_ptr_0_0;
|
||||
|
||||
ui("dyn_ent_vis_data_ptr_0_0", "Dyn Ent Vis Data Ptr 0-0");
|
||||
i32 dyn_ent_vis_data_ptr_0_1;
|
||||
|
||||
ui("dyn_ent_vis_data_ptr_0_1", "Dyn Ent Vis Data Ptr 0-1");
|
||||
i32 dyn_ent_vis_data_ptr_0_2;
|
||||
|
||||
ui("dyn_ent_vis_data_ptr_0_2", "Dyn Ent Vis Data Ptr 0-2");
|
||||
i32 dyn_ent_vis_data_ptr_1_0;
|
||||
|
||||
ui("dyn_ent_vis_data_ptr_1_0", "Dyn Ent Vis Data Ptr 1-0");
|
||||
i32 dyn_ent_vis_data_ptr_1_1;
|
||||
|
||||
ui("dyn_ent_vis_data_ptr_1_1", "Dyn Ent Vis Data Ptr 1-1");
|
||||
i32 dyn_ent_vis_data_ptr_1_2;
|
||||
|
||||
ui("dyn_ent_vis_data_ptr_1_2", "Dyn Ent Vis Data Ptr 1-2");
|
||||
|
||||
// Note: Full array parsing not implemented
|
||||
}
|
||||
|
||||
@ -1,18 +1,10 @@
|
||||
type gfxworlddpvsplanes [display="GFX World DPVS Planes"]
|
||||
type gfxworlddpvsplanes ui("GFX World DPVS Planes")
|
||||
{
|
||||
// Fixed header fields
|
||||
i32 cell_count;
|
||||
i32 cell_count ui("Cell Count");
|
||||
i32 planes_ptr ui("Planes Ptr");
|
||||
i32 nodes_ptr ui("Nodes Ptr");
|
||||
i32 scene_ent_cell_bits_ptr ui("Scene Ent Cell Bits Ptr");
|
||||
|
||||
ui("cell_count", "Cell Count");
|
||||
i32 planes_ptr;
|
||||
|
||||
ui("planes_ptr", "Planes Ptr");
|
||||
i32 nodes_ptr;
|
||||
|
||||
ui("nodes_ptr", "Nodes Ptr");
|
||||
i32 scene_ent_cell_bits_ptr;
|
||||
|
||||
ui("scene_ent_cell_bits_ptr", "Scene Ent Cell Bits Ptr");
|
||||
|
||||
// Note: Arrays are parsed separately based on pointers
|
||||
}
|
||||
|
||||
@ -1,84 +1,32 @@
|
||||
type gfxworlddpvsstatic [display="GFX World DPVS Static"]
|
||||
type gfxworlddpvsstatic ui("GFX World DPVS Static")
|
||||
{
|
||||
// PC version: 104 bytes (has 3 extra fields vs 360)
|
||||
u32 smodel_count;
|
||||
|
||||
ui("smodel_count", "SModel Count");
|
||||
u32 static_surface_count;
|
||||
|
||||
ui("static_surface_count", "Static Surface Count");
|
||||
u32 lit_surfs_begin;
|
||||
|
||||
ui("lit_surfs_begin", "Lit Surfs Begin");
|
||||
u32 lit_surfs_end;
|
||||
|
||||
ui("lit_surfs_end", "Lit Surfs End");
|
||||
u32 decal_surfs_begin;
|
||||
|
||||
ui("decal_surfs_begin", "Decal Surfs Begin");
|
||||
u32 decal_surfs_end;
|
||||
|
||||
ui("decal_surfs_end", "Decal Surfs End");
|
||||
u32 emissive_surfs_begin;
|
||||
|
||||
ui("emissive_surfs_begin", "Emissive Surfs Begin");
|
||||
u32 emissive_surfs_end;
|
||||
|
||||
ui("emissive_surfs_end", "Emissive Surfs End");
|
||||
u32 unk;
|
||||
|
||||
ui("unk", "Unknown");
|
||||
u32 lod_data_count;
|
||||
|
||||
ui("lod_data_count", "LOD Data Count");
|
||||
u32 surface_casts_sun_shadow_count;
|
||||
|
||||
ui("surface_casts_sun_shadow_count", "Surface Casts Sun Shadow Count");
|
||||
u32 smodel_count ui("SModel Count");
|
||||
u32 static_surface_count ui("Static Surface Count");
|
||||
u32 lit_surfs_begin ui("Lit Surfs Begin");
|
||||
u32 lit_surfs_end ui("Lit Surfs End");
|
||||
u32 decal_surfs_begin ui("Decal Surfs Begin");
|
||||
u32 decal_surfs_end ui("Decal Surfs End");
|
||||
u32 emissive_surfs_begin ui("Emissive Surfs Begin");
|
||||
u32 emissive_surfs_end ui("Emissive Surfs End");
|
||||
u32 unk ui("Unknown");
|
||||
u32 lod_data_count ui("LOD Data Count");
|
||||
u32 surface_casts_sun_shadow_count ui("Surface Casts Sun Shadow Count");
|
||||
|
||||
// Pointers to arrays
|
||||
i32 smodel_vis_data_ptr_0;
|
||||
|
||||
ui("smodel_vis_data_ptr_0", "SModel Vis Data Ptr 0");
|
||||
i32 smodel_vis_data_ptr_1;
|
||||
|
||||
ui("smodel_vis_data_ptr_1", "SModel Vis Data Ptr 1");
|
||||
i32 smodel_vis_data_ptr_2;
|
||||
|
||||
ui("smodel_vis_data_ptr_2", "SModel Vis Data Ptr 2");
|
||||
i32 surface_vis_data_ptr_0;
|
||||
|
||||
ui("surface_vis_data_ptr_0", "Surface Vis Data Ptr 0");
|
||||
i32 surface_vis_data_ptr_1;
|
||||
|
||||
ui("surface_vis_data_ptr_1", "Surface Vis Data Ptr 1");
|
||||
i32 surface_vis_data_ptr_2;
|
||||
|
||||
ui("surface_vis_data_ptr_2", "Surface Vis Data Ptr 2");
|
||||
i32 lod_data_ptr;
|
||||
|
||||
ui("lod_data_ptr", "LOD Data Ptr");
|
||||
i32 sorted_surf_index_ptr;
|
||||
|
||||
ui("sorted_surf_index_ptr", "Sorted Surf Index Ptr");
|
||||
i32 smodel_insts_ptr;
|
||||
|
||||
ui("smodel_insts_ptr", "SModel Insts Ptr");
|
||||
i32 surfaces_ptr;
|
||||
|
||||
ui("surfaces_ptr", "Surfaces Ptr");
|
||||
i32 cull_groups_ptr;
|
||||
|
||||
ui("cull_groups_ptr", "Cull Groups Ptr");
|
||||
i32 smodel_draw_insts_ptr;
|
||||
|
||||
ui("smodel_draw_insts_ptr", "SModel Draw Insts Ptr");
|
||||
i32 surface_materials_ptr;
|
||||
|
||||
ui("surface_materials_ptr", "Surface Materials Ptr");
|
||||
i32 surface_casts_sun_shadow_ptr;
|
||||
|
||||
ui("surface_casts_sun_shadow_ptr", "Surface Casts Sun Shadow Ptr");
|
||||
i32 usage_count;
|
||||
|
||||
ui("usage_count", "Usage Count");
|
||||
i32 smodel_vis_data_ptr_0 ui("SModel Vis Data Ptr 0");
|
||||
i32 smodel_vis_data_ptr_1 ui("SModel Vis Data Ptr 1");
|
||||
i32 smodel_vis_data_ptr_2 ui("SModel Vis Data Ptr 2");
|
||||
i32 surface_vis_data_ptr_0 ui("Surface Vis Data Ptr 0");
|
||||
i32 surface_vis_data_ptr_1 ui("Surface Vis Data Ptr 1");
|
||||
i32 surface_vis_data_ptr_2 ui("Surface Vis Data Ptr 2");
|
||||
i32 lod_data_ptr ui("LOD Data Ptr");
|
||||
i32 sorted_surf_index_ptr ui("Sorted Surf Index Ptr");
|
||||
i32 smodel_insts_ptr ui("SModel Insts Ptr");
|
||||
i32 surfaces_ptr ui("Surfaces Ptr");
|
||||
i32 cull_groups_ptr ui("Cull Groups Ptr");
|
||||
i32 smodel_draw_insts_ptr ui("SModel Draw Insts Ptr");
|
||||
i32 surface_materials_ptr ui("Surface Materials Ptr");
|
||||
i32 surface_casts_sun_shadow_ptr ui("Surface Casts Sun Shadow Ptr");
|
||||
i32 usage_count ui("Usage Count");
|
||||
}
|
||||
|
||||
@ -1,18 +1,10 @@
|
||||
type gfxworldstreaminfo [display="GFX World Stream Info"]
|
||||
type gfxworldstreaminfo ui("GFX World Stream Info")
|
||||
{
|
||||
// Fixed 16-byte header (embedded in GfxWorld header)
|
||||
i32 aabb_tree_count;
|
||||
|
||||
ui("aabb_tree_count", "AABB Tree Count");
|
||||
i32 aabb_trees_ptr;
|
||||
|
||||
ui("aabb_trees_ptr", "AABB Trees Ptr");
|
||||
i32 leaf_ref_count;
|
||||
|
||||
ui("leaf_ref_count", "Leaf Ref Count");
|
||||
i32 leaf_refs_ptr;
|
||||
|
||||
ui("leaf_refs_ptr", "Leaf Refs Ptr");
|
||||
i32 aabb_tree_count ui("AABB Tree Count");
|
||||
i32 aabb_trees_ptr ui("AABB Trees Ptr");
|
||||
i32 leaf_ref_count ui("Leaf Ref Count");
|
||||
i32 leaf_refs_ptr ui("Leaf Refs Ptr");
|
||||
|
||||
// Note: Arrays are parsed separately after the main header
|
||||
}
|
||||
|
||||
@ -1,10 +1,6 @@
|
||||
type gfxworldvertexdata [display="GFX World Vertex Data"]
|
||||
type gfxworldvertexdata ui("GFX World Vertex Data")
|
||||
{
|
||||
// PC version: 8 bytes (2 pointers)
|
||||
i32 vertices_ptr;
|
||||
|
||||
ui("vertices_ptr", "Vertices Ptr");
|
||||
i32 world_vb_ptr;
|
||||
|
||||
ui("world_vb_ptr", "World VB Ptr");
|
||||
i32 vertices_ptr ui("Vertices Ptr");
|
||||
i32 world_vb_ptr ui("World VB Ptr");
|
||||
}
|
||||
|
||||
@ -1,10 +1,6 @@
|
||||
type gfxworldvertexlayerdata [display="GFX World Vertex Layer Data"]
|
||||
type gfxworldvertexlayerdata ui("GFX World Vertex Layer Data")
|
||||
{
|
||||
// PC version: 8 bytes (2 pointers)
|
||||
i32 data_ptr;
|
||||
|
||||
ui("data_ptr", "Data Ptr");
|
||||
i32 layer_vb_ptr;
|
||||
|
||||
ui("layer_vb_ptr", "Layer VB Ptr");
|
||||
i32 data_ptr ui("Data Ptr");
|
||||
i32 layer_vb_ptr ui("Layer VB Ptr");
|
||||
}
|
||||
|
||||
@ -1,32 +1,16 @@
|
||||
type glyph [display="Glyph"]
|
||||
type glyph ui("Glyph")
|
||||
{
|
||||
u16 letter;
|
||||
|
||||
ui("letter", "Letter");
|
||||
i8 x0;
|
||||
|
||||
ui("x0", "X0");
|
||||
i8 y0;
|
||||
|
||||
ui("y0", "Y0");
|
||||
i8 dx;
|
||||
|
||||
ui("dx", "DX");
|
||||
i8 pixel_width;
|
||||
|
||||
ui("pixel_width", "Pixel Width");
|
||||
i8 pixel_height;
|
||||
|
||||
ui("pixel_height", "Pixel Height");
|
||||
i8 pitch;
|
||||
|
||||
ui("pitch", "Pitch");
|
||||
u16 letter ui("Letter");
|
||||
i8 x0 ui("X0");
|
||||
i8 y0 ui("Y0");
|
||||
i8 dx ui("DX");
|
||||
i8 pixel_width ui("Pixel Width");
|
||||
i8 pixel_height ui("Pixel Height");
|
||||
i8 pitch ui("Pitch");
|
||||
|
||||
// UV coordinates (4 floats = 16 bytes)
|
||||
// Read as raw bytes since we don't have float type yet
|
||||
uv_coords = read(16);
|
||||
|
||||
ui("uv_coords", "UV Coords");
|
||||
uv_coords = read(16) ui("UV Coords");
|
||||
|
||||
// Padding to align to 32 bytes total (8 + 16 = 24, need 8 more)
|
||||
skip(8);
|
||||
|
||||
@ -1,53 +1,29 @@
|
||||
type image [display="Image"]
|
||||
type image ui("Image")
|
||||
{
|
||||
const PTR_INLINE = -1;
|
||||
const PTR_INLINE_LOADDEF = -2;
|
||||
|
||||
// GfxImage struct - 32 bytes total on PC COD4
|
||||
u32 map_type;
|
||||
ui("map_type", "Map Type");
|
||||
|
||||
i32 texture_ptr;
|
||||
ui("texture_ptr", "Texture Ptr");
|
||||
|
||||
u8 picmip_0;
|
||||
ui("picmip_0", "Picmip 0");
|
||||
|
||||
u8 picmip_1;
|
||||
ui("picmip_1", "Picmip 1");
|
||||
|
||||
u8 semantic;
|
||||
ui("semantic", "Semantic");
|
||||
|
||||
u8 track;
|
||||
ui("track", "Track");
|
||||
|
||||
u32 card_memory_0;
|
||||
ui("card_memory_0", "Card Memory 0");
|
||||
|
||||
u32 card_memory_1;
|
||||
ui("card_memory_1", "Card Memory 1");
|
||||
|
||||
u16 width;
|
||||
ui("width", "Width");
|
||||
|
||||
u16 height;
|
||||
ui("height", "Height");
|
||||
|
||||
u16 depth;
|
||||
ui("depth", "Depth");
|
||||
|
||||
u8 category;
|
||||
ui("category", "Category");
|
||||
|
||||
u8 delay_load_pixels;
|
||||
ui("delay_load_pixels", "Delay Load Pixels");
|
||||
|
||||
i32 name_ptr;
|
||||
ui("name_ptr", "Name Ptr");
|
||||
u32 map_type ui("Map Type");
|
||||
i32 texture_ptr ui("Texture Ptr");
|
||||
u8 picmip_0 ui("Picmip 0");
|
||||
u8 picmip_1 ui("Picmip 1");
|
||||
u8 semantic ui("Semantic");
|
||||
u8 track ui("Track");
|
||||
u32 card_memory_0 ui("Card Memory 0");
|
||||
u32 card_memory_1 ui("Card Memory 1");
|
||||
u16 width ui("Width");
|
||||
u16 height ui("Height");
|
||||
u16 depth ui("Depth");
|
||||
u8 category ui("Category");
|
||||
u8 delay_load_pixels ui("Delay Load Pixels");
|
||||
i32 name_ptr ui("Name Ptr");
|
||||
|
||||
// Inline data
|
||||
inline cstring name when name_ptr [ui="Name", set_name];
|
||||
if (name_ptr == PTR_INLINE) {
|
||||
name = cstring() ui("Name");
|
||||
set_name(name);
|
||||
}
|
||||
|
||||
// GfxImageLoadDef parsed if texture ptr is -1 or -2 (inline data)
|
||||
if (texture_ptr == PTR_INLINE || texture_ptr == PTR_INLINE_LOADDEF) {
|
||||
|
||||
@ -1,195 +1,137 @@
|
||||
type itemdef [display="Item Def"]
|
||||
type itemdef ui("Item Def")
|
||||
{
|
||||
const PTR_INLINE = -1;
|
||||
|
||||
// itemDef_s struct - ~368 bytes fixed
|
||||
|
||||
// WindowDef_t embedded
|
||||
window = parse_here("windowdef");
|
||||
ui("window", "Window");
|
||||
window = parse_here("windowdef") ui("Window");
|
||||
|
||||
// Text Rect
|
||||
text_rect = parse_here("rectdef");
|
||||
ui("text_rect", "Text Rect");
|
||||
text_rect = parse_here("rectdef") ui("Text Rect");
|
||||
|
||||
// Item Properties
|
||||
i32 item_type;
|
||||
ui("item_type", "Type");
|
||||
|
||||
i32 data_type;
|
||||
ui("data_type", "Data Type");
|
||||
|
||||
i32 alignment;
|
||||
ui("alignment", "Alignment");
|
||||
|
||||
i32 font_enum;
|
||||
ui("font_enum", "Font Enum");
|
||||
|
||||
i32 text_align_mode;
|
||||
ui("text_align_mode", "Text Align Mode");
|
||||
|
||||
f32 text_align_x;
|
||||
ui("text_align_x", "Text Align X");
|
||||
|
||||
f32 text_align_y;
|
||||
ui("text_align_y", "Text Align Y");
|
||||
|
||||
f32 text_scale;
|
||||
ui("text_scale", "Text Scale");
|
||||
|
||||
i32 text_style;
|
||||
ui("text_style", "Text Style");
|
||||
|
||||
i32 game_msg_window_index;
|
||||
ui("game_msg_window_index", "Game Msg Window Index");
|
||||
|
||||
i32 game_msg_window_mode;
|
||||
ui("game_msg_window_mode", "Game Msg Window Mode");
|
||||
i32 item_type ui("Type");
|
||||
i32 data_type ui("Data Type");
|
||||
i32 alignment ui("Alignment");
|
||||
i32 font_enum ui("Font Enum");
|
||||
i32 text_align_mode ui("Text Align Mode");
|
||||
f32 text_align_x ui("Text Align X");
|
||||
f32 text_align_y ui("Text Align Y");
|
||||
f32 text_scale ui("Text Scale");
|
||||
i32 text_style ui("Text Style");
|
||||
i32 game_msg_window_index ui("Game Msg Window Index");
|
||||
i32 game_msg_window_mode ui("Game Msg Window Mode");
|
||||
|
||||
// Pointers
|
||||
i32 text_ptr;
|
||||
ui("text_ptr", "Text Ptr");
|
||||
|
||||
i32 item_flags;
|
||||
ui("item_flags", "Item Flags");
|
||||
|
||||
i32 parent_ptr;
|
||||
ui("parent_ptr", "Parent Ptr");
|
||||
|
||||
i32 mouse_enter_text_ptr;
|
||||
ui("mouse_enter_text_ptr", "Mouse Enter Text Ptr");
|
||||
|
||||
i32 mouse_exit_text_ptr;
|
||||
ui("mouse_exit_text_ptr", "Mouse Exit Text Ptr");
|
||||
|
||||
i32 mouse_enter_ptr;
|
||||
ui("mouse_enter_ptr", "Mouse Enter Ptr");
|
||||
|
||||
i32 mouse_exit_ptr;
|
||||
ui("mouse_exit_ptr", "Mouse Exit Ptr");
|
||||
|
||||
i32 action_ptr;
|
||||
ui("action_ptr", "Action Ptr");
|
||||
|
||||
i32 on_accept_ptr;
|
||||
ui("on_accept_ptr", "On Accept Ptr");
|
||||
|
||||
i32 on_focus_ptr;
|
||||
ui("on_focus_ptr", "On Focus Ptr");
|
||||
|
||||
i32 leave_focus_ptr;
|
||||
ui("leave_focus_ptr", "Leave Focus Ptr");
|
||||
|
||||
i32 dvar_ptr;
|
||||
ui("dvar_ptr", "Dvar Ptr");
|
||||
|
||||
i32 dvar_test_ptr;
|
||||
ui("dvar_test_ptr", "Dvar Test Ptr");
|
||||
|
||||
i32 on_key_ptr;
|
||||
ui("on_key_ptr", "On Key Ptr");
|
||||
|
||||
i32 enable_dvar_ptr;
|
||||
ui("enable_dvar_ptr", "Enable Dvar Ptr");
|
||||
|
||||
i32 dvar_flags;
|
||||
ui("dvar_flags", "Dvar Flags");
|
||||
|
||||
i32 focus_sound_ptr;
|
||||
ui("focus_sound_ptr", "Focus Sound Ptr");
|
||||
|
||||
f32 special;
|
||||
ui("special", "Special");
|
||||
|
||||
i32 cursor_pos;
|
||||
ui("cursor_pos", "Cursor Pos");
|
||||
|
||||
i32 type_data_ptr;
|
||||
ui("type_data_ptr", "Type Data Ptr");
|
||||
|
||||
i32 image_track;
|
||||
ui("image_track", "Image Track");
|
||||
i32 text_ptr ui("Text Ptr");
|
||||
i32 item_flags ui("Item Flags");
|
||||
i32 parent_ptr ui("Parent Ptr");
|
||||
i32 mouse_enter_text_ptr ui("Mouse Enter Text Ptr");
|
||||
i32 mouse_exit_text_ptr ui("Mouse Exit Text Ptr");
|
||||
i32 mouse_enter_ptr ui("Mouse Enter Ptr");
|
||||
i32 mouse_exit_ptr ui("Mouse Exit Ptr");
|
||||
i32 action_ptr ui("Action Ptr");
|
||||
i32 on_accept_ptr ui("On Accept Ptr");
|
||||
i32 on_focus_ptr ui("On Focus Ptr");
|
||||
i32 leave_focus_ptr ui("Leave Focus Ptr");
|
||||
i32 dvar_ptr ui("Dvar Ptr");
|
||||
i32 dvar_test_ptr ui("Dvar Test Ptr");
|
||||
i32 on_key_ptr ui("On Key Ptr");
|
||||
i32 enable_dvar_ptr ui("Enable Dvar Ptr");
|
||||
i32 dvar_flags ui("Dvar Flags");
|
||||
i32 focus_sound_ptr ui("Focus Sound Ptr");
|
||||
f32 special ui("Special");
|
||||
i32 cursor_pos ui("Cursor Pos");
|
||||
i32 type_data_ptr ui("Type Data Ptr");
|
||||
i32 image_track ui("Image Track");
|
||||
|
||||
// Expressions
|
||||
visible_exp = parse_here("statement");
|
||||
ui("visible_exp", "Visible Exp");
|
||||
|
||||
text_exp = parse_here("statement");
|
||||
ui("text_exp", "Text Exp");
|
||||
|
||||
material_exp = parse_here("statement");
|
||||
ui("material_exp", "Material Exp");
|
||||
|
||||
rect_x_exp = parse_here("statement");
|
||||
ui("rect_x_exp", "Rect X Exp");
|
||||
|
||||
rect_y_exp = parse_here("statement");
|
||||
ui("rect_y_exp", "Rect Y Exp");
|
||||
|
||||
rect_w_exp = parse_here("statement");
|
||||
ui("rect_w_exp", "Rect W Exp");
|
||||
|
||||
rect_h_exp = parse_here("statement");
|
||||
ui("rect_h_exp", "Rect H Exp");
|
||||
|
||||
forecolor_a_exp = parse_here("statement");
|
||||
ui("forecolor_a_exp", "Forecolor A Exp");
|
||||
visible_exp = parse_here("statement") ui("Visible Exp");
|
||||
text_exp = parse_here("statement") ui("Text Exp");
|
||||
material_exp = parse_here("statement") ui("Material Exp");
|
||||
rect_x_exp = parse_here("statement") ui("Rect X Exp");
|
||||
rect_y_exp = parse_here("statement") ui("Rect Y Exp");
|
||||
rect_w_exp = parse_here("statement") ui("Rect W Exp");
|
||||
rect_h_exp = parse_here("statement") ui("Rect H Exp");
|
||||
forecolor_a_exp = parse_here("statement") ui("Forecolor A Exp");
|
||||
|
||||
// ============ INLINE DATA ============
|
||||
|
||||
// Window inline data
|
||||
_win_name_ptr = get(window, "name_ptr");
|
||||
if (_win_name_ptr == PTR_INLINE) {
|
||||
name = cstring();
|
||||
ui("name", "Name");
|
||||
name = cstring() ui("Name");
|
||||
}
|
||||
|
||||
_win_group_ptr = get(window, "group_ptr");
|
||||
if (_win_group_ptr == PTR_INLINE) {
|
||||
group = cstring();
|
||||
ui("group", "Group");
|
||||
group = cstring() ui("Group");
|
||||
}
|
||||
|
||||
_win_bg_ptr = get(window, "background_ptr");
|
||||
if (_win_bg_ptr == PTR_INLINE) {
|
||||
background = parse_here("material");
|
||||
ui("background", "Background");
|
||||
background = parse_here("material") ui("Background");
|
||||
}
|
||||
|
||||
// Simple inline strings
|
||||
inline cstring text when text_ptr [ui="Text"];
|
||||
inline cstring mouse_enter_text when mouse_enter_text_ptr [ui="Mouse Enter Text"];
|
||||
inline cstring mouse_exit_text when mouse_exit_text_ptr [ui="Mouse Exit Text"];
|
||||
inline cstring mouse_enter when mouse_enter_ptr [ui="Mouse Enter"];
|
||||
inline cstring mouse_exit when mouse_exit_ptr [ui="Mouse Exit"];
|
||||
inline cstring action when action_ptr [ui="Action"];
|
||||
inline cstring on_accept when on_accept_ptr [ui="On Accept"];
|
||||
inline cstring on_focus when on_focus_ptr [ui="On Focus"];
|
||||
inline cstring leave_focus when leave_focus_ptr [ui="Leave Focus"];
|
||||
inline cstring dvar when dvar_ptr [ui="Dvar"];
|
||||
inline cstring dvar_test when dvar_test_ptr [ui="Dvar Test"];
|
||||
inline itemkeyhandler on_key when on_key_ptr [ui="On Key"];
|
||||
inline cstring enable_dvar when enable_dvar_ptr [ui="Enable Dvar"];
|
||||
inline sound focus_sound when focus_sound_ptr [ui="Focus Sound"];
|
||||
if (text_ptr == PTR_INLINE) {
|
||||
text = cstring() ui("Text");
|
||||
}
|
||||
if (mouse_enter_text_ptr == PTR_INLINE) {
|
||||
mouse_enter_text = cstring() ui("Mouse Enter Text");
|
||||
}
|
||||
if (mouse_exit_text_ptr == PTR_INLINE) {
|
||||
mouse_exit_text = cstring() ui("Mouse Exit Text");
|
||||
}
|
||||
if (mouse_enter_ptr == PTR_INLINE) {
|
||||
mouse_enter = cstring() ui("Mouse Enter");
|
||||
}
|
||||
if (mouse_exit_ptr == PTR_INLINE) {
|
||||
mouse_exit = cstring() ui("Mouse Exit");
|
||||
}
|
||||
if (action_ptr == PTR_INLINE) {
|
||||
action = cstring() ui("Action");
|
||||
}
|
||||
if (on_accept_ptr == PTR_INLINE) {
|
||||
on_accept = cstring() ui("On Accept");
|
||||
}
|
||||
if (on_focus_ptr == PTR_INLINE) {
|
||||
on_focus = cstring() ui("On Focus");
|
||||
}
|
||||
if (leave_focus_ptr == PTR_INLINE) {
|
||||
leave_focus = cstring() ui("Leave Focus");
|
||||
}
|
||||
if (dvar_ptr == PTR_INLINE) {
|
||||
dvar = cstring() ui("Dvar");
|
||||
}
|
||||
if (dvar_test_ptr == PTR_INLINE) {
|
||||
dvar_test = cstring() ui("Dvar Test");
|
||||
}
|
||||
if (on_key_ptr == PTR_INLINE) {
|
||||
on_key = parse_here("itemkeyhandler") ui("On Key");
|
||||
}
|
||||
if (enable_dvar_ptr == PTR_INLINE) {
|
||||
enable_dvar = cstring() ui("Enable Dvar");
|
||||
}
|
||||
if (focus_sound_ptr == PTR_INLINE) {
|
||||
focus_sound = parse_here("sound") ui("Focus Sound");
|
||||
}
|
||||
|
||||
// Type-specific data
|
||||
if (type_data_ptr == PTR_INLINE) {
|
||||
match(item_type) {
|
||||
6 => {
|
||||
type_data = parse_here("listboxdef");
|
||||
ui("type_data", "List Box Data");
|
||||
type_data = parse_here("listboxdef") ui("List Box Data");
|
||||
}
|
||||
4 | 9 | 16 | 17 | 18 => {
|
||||
type_data = parse_here("editfielddef");
|
||||
ui("type_data", "Edit Field Data");
|
||||
type_data = parse_here("editfielddef") ui("Edit Field Data");
|
||||
}
|
||||
12 => {
|
||||
type_data = parse_here("multidef");
|
||||
ui("type_data", "Multi Data");
|
||||
type_data = parse_here("multidef") ui("Multi Data");
|
||||
}
|
||||
13 => {
|
||||
type_data = cstring();
|
||||
ui("type_data", "Enum Dvar Name");
|
||||
type_data = cstring() ui("Enum Dvar Name");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,17 +1,16 @@
|
||||
type itemkeyhandler [display="Item Key Handler"]
|
||||
type itemkeyhandler ui("Item Key Handler")
|
||||
{
|
||||
const PTR_INLINE = -1;
|
||||
|
||||
i32 key;
|
||||
ui("key", "Key");
|
||||
|
||||
i32 action_ptr;
|
||||
ui("action_ptr", "Action Ptr");
|
||||
|
||||
i32 next_ptr;
|
||||
ui("next_ptr", "Next Ptr");
|
||||
i32 key ui("Key");
|
||||
i32 action_ptr ui("Action Ptr");
|
||||
i32 next_ptr ui("Next Ptr");
|
||||
|
||||
// Inline data
|
||||
inline cstring action when action_ptr [ui="Action"];
|
||||
inline itemkeyhandler next when next_ptr;
|
||||
if (action_ptr == PTR_INLINE) {
|
||||
action = cstring() ui("Action");
|
||||
}
|
||||
if (next_ptr == PTR_INLINE) {
|
||||
next = parse_here("itemkeyhandler");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,74 +1,38 @@
|
||||
type listboxdef [display="List Box Def"]
|
||||
type listboxdef ui("List Box Def")
|
||||
{
|
||||
const PTR_INLINE = -1;
|
||||
|
||||
i32 mouse_pos;
|
||||
ui("mouse_pos", "Mouse Pos");
|
||||
|
||||
i32 start_pos;
|
||||
ui("start_pos", "Start Pos");
|
||||
|
||||
i32 end_pos;
|
||||
ui("end_pos", "End Pos");
|
||||
|
||||
i32 draw_padding;
|
||||
ui("draw_padding", "Draw Padding");
|
||||
|
||||
f32 element_width;
|
||||
ui("element_width", "Element Width");
|
||||
|
||||
f32 element_height;
|
||||
ui("element_height", "Element Height");
|
||||
|
||||
i32 element_style;
|
||||
ui("element_style", "Element Style");
|
||||
|
||||
i32 num_columns;
|
||||
ui("num_columns", "Num Columns");
|
||||
i32 mouse_pos ui("Mouse Pos");
|
||||
i32 start_pos ui("Start Pos");
|
||||
i32 end_pos ui("End Pos");
|
||||
i32 draw_padding ui("Draw Padding");
|
||||
f32 element_width ui("Element Width");
|
||||
f32 element_height ui("Element Height");
|
||||
i32 element_style ui("Element Style");
|
||||
i32 num_columns ui("Num Columns");
|
||||
|
||||
// columnInfo_s columnInfo[16] - 256 bytes
|
||||
array[16] columns: columninfo;
|
||||
|
||||
i32 double_click_ptr;
|
||||
ui("double_click_ptr", "Double Click Ptr");
|
||||
|
||||
i32 not_selectable;
|
||||
ui("not_selectable", "Not Selectable");
|
||||
|
||||
i32 no_scroll_bars;
|
||||
ui("no_scroll_bars", "No Scroll Bars");
|
||||
|
||||
i32 use_paging;
|
||||
ui("use_paging", "Use Paging");
|
||||
|
||||
f32 select_border_x;
|
||||
ui("select_border_x", "Select Border X");
|
||||
|
||||
f32 select_border_y;
|
||||
ui("select_border_y", "Select Border Y");
|
||||
|
||||
f32 select_border_w;
|
||||
ui("select_border_w", "Select Border W");
|
||||
|
||||
f32 select_border_h;
|
||||
ui("select_border_h", "Select Border H");
|
||||
|
||||
f32 disable_color_r;
|
||||
ui("disable_color_r", "Disable R");
|
||||
|
||||
f32 disable_color_g;
|
||||
ui("disable_color_g", "Disable G");
|
||||
|
||||
f32 disable_color_b;
|
||||
ui("disable_color_b", "Disable B");
|
||||
|
||||
f32 disable_color_a;
|
||||
ui("disable_color_a", "Disable A");
|
||||
|
||||
i32 select_icon_ptr;
|
||||
ui("select_icon_ptr", "Select Icon Ptr");
|
||||
i32 double_click_ptr ui("Double Click Ptr");
|
||||
i32 not_selectable ui("Not Selectable");
|
||||
i32 no_scroll_bars ui("No Scroll Bars");
|
||||
i32 use_paging ui("Use Paging");
|
||||
f32 select_border_x ui("Select Border X");
|
||||
f32 select_border_y ui("Select Border Y");
|
||||
f32 select_border_w ui("Select Border W");
|
||||
f32 select_border_h ui("Select Border H");
|
||||
f32 disable_color_r ui("Disable R");
|
||||
f32 disable_color_g ui("Disable G");
|
||||
f32 disable_color_b ui("Disable B");
|
||||
f32 disable_color_a ui("Disable A");
|
||||
i32 select_icon_ptr ui("Select Icon Ptr");
|
||||
|
||||
// Inline data
|
||||
inline cstring double_click when double_click_ptr [ui="Double Click"];
|
||||
inline material select_icon when select_icon_ptr [ui="Select Icon"];
|
||||
if (double_click_ptr == PTR_INLINE) {
|
||||
double_click = cstring() ui("Double Click");
|
||||
}
|
||||
if (select_icon_ptr == PTR_INLINE) {
|
||||
select_icon = parse_here("material") ui("Select Icon");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,40 +1,26 @@
|
||||
type loaded_sound [display="Loaded Sound"]
|
||||
type loaded_sound ui("Loaded Sound")
|
||||
{
|
||||
const PTR_INLINE = -1;
|
||||
|
||||
i32 name_ptr;
|
||||
ui("name_ptr", "Name Ptr");
|
||||
i32 name_ptr ui("Name Ptr");
|
||||
|
||||
// snd_info_t structure
|
||||
i32 rate;
|
||||
ui("rate", "Sample Rate");
|
||||
|
||||
i32 bits;
|
||||
ui("bits", "Bits");
|
||||
|
||||
i32 channels;
|
||||
ui("channels", "Channels");
|
||||
|
||||
i32 samples;
|
||||
ui("samples", "Samples");
|
||||
|
||||
i32 block_size;
|
||||
ui("block_size", "Block Size");
|
||||
|
||||
i32 format;
|
||||
ui("format", "Format");
|
||||
|
||||
i32 data_len;
|
||||
ui("data_len", "Data Length");
|
||||
|
||||
i32 data_ptr;
|
||||
ui("data_ptr", "Data Ptr");
|
||||
i32 rate ui("Sample Rate");
|
||||
i32 bits ui("Bits");
|
||||
i32 channels ui("Channels");
|
||||
i32 samples ui("Samples");
|
||||
i32 block_size ui("Block Size");
|
||||
i32 format ui("Format");
|
||||
i32 data_len ui("Data Length");
|
||||
i32 data_ptr ui("Data Ptr");
|
||||
|
||||
// Inline data
|
||||
inline cstring name when name_ptr [ui="Name", set_name];
|
||||
if (name_ptr == PTR_INLINE) {
|
||||
name = cstring() ui("Name");
|
||||
set_name(name);
|
||||
}
|
||||
|
||||
if (data_ptr == PTR_INLINE && data_len > 0) {
|
||||
audio_data = read(data_len);
|
||||
ui("audio_data", "Audio Data");
|
||||
audio_data = read(data_len) ui("Audio Data");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,16 +1,18 @@
|
||||
type localize [display="Localize Entry"]
|
||||
type localize ui("Localize Entry")
|
||||
{
|
||||
const PTR_INLINE = -1;
|
||||
|
||||
i32 value_ptr;
|
||||
ui("value_ptr", "Value Ptr");
|
||||
|
||||
i32 name_ptr;
|
||||
ui("name_ptr", "Name Ptr");
|
||||
i32 value_ptr ui("Value Ptr");
|
||||
i32 name_ptr ui("Name Ptr");
|
||||
|
||||
// Inline data
|
||||
inline cstring value when value_ptr [ui="Value"];
|
||||
inline cstring name when name_ptr [ui="Name", set_name];
|
||||
if (value_ptr == PTR_INLINE) {
|
||||
value = cstring() ui("Value");
|
||||
}
|
||||
if (name_ptr == PTR_INLINE) {
|
||||
name = cstring() ui("Name");
|
||||
set_name(name);
|
||||
}
|
||||
|
||||
// Display value as text
|
||||
if (value_ptr == PTR_INLINE) {
|
||||
|
||||
@ -1,71 +1,44 @@
|
||||
type material [display="Material"]
|
||||
type material ui("Material")
|
||||
{
|
||||
// Material struct - PC COD4 format (80 bytes header)
|
||||
const PTR_INLINE = -1;
|
||||
|
||||
// ============ MaterialInfo (24 bytes) ============
|
||||
i32 material_name_ptr;
|
||||
ui("material_name_ptr", "Material Name Ptr");
|
||||
|
||||
u8 game_flags;
|
||||
ui("game_flags", "Game Flags");
|
||||
|
||||
u8 sort_key;
|
||||
ui("sort_key", "Sort Key");
|
||||
|
||||
u8 texture_atlas_row_count;
|
||||
ui("texture_atlas_row_count", "Texture Atlas Row Count");
|
||||
|
||||
u8 texture_atlas_column_count;
|
||||
ui("texture_atlas_column_count", "Texture Atlas Column Count");
|
||||
i32 material_name_ptr ui("Material Name Ptr");
|
||||
u8 game_flags ui("Game Flags");
|
||||
u8 sort_key ui("Sort Key");
|
||||
u8 texture_atlas_row_count ui("Texture Atlas Row Count");
|
||||
u8 texture_atlas_column_count ui("Texture Atlas Column Count");
|
||||
|
||||
// Draw surface - 8 bytes (uint64_t packed bitfield)
|
||||
draw_surf = read(8);
|
||||
ui("draw_surf", "Draw Surf");
|
||||
draw_surf = read(8) ui("Draw Surf");
|
||||
|
||||
u32 surface_type_bits;
|
||||
ui("surface_type_bits", "Surface Type Bits");
|
||||
|
||||
u16 hash_index;
|
||||
ui("hash_index", "Hash Index");
|
||||
u32 surface_type_bits ui("Surface Type Bits");
|
||||
u16 hash_index ui("Hash Index");
|
||||
skip 2;
|
||||
|
||||
// ============ Material body (56 bytes) ============
|
||||
// State bits entry array - 34 bytes (TECHNIQUE_COUNT = 34)
|
||||
state_bits_entry = read(34);
|
||||
ui("state_bits_entry", "State Bits Entry");
|
||||
state_bits_entry = read(34) ui("State Bits Entry");
|
||||
|
||||
u8 texture_count;
|
||||
ui("texture_count", "Texture Count");
|
||||
|
||||
u8 constant_count;
|
||||
ui("constant_count", "Constant Count");
|
||||
|
||||
u8 state_bits_count;
|
||||
ui("state_bits_count", "State Bits Count");
|
||||
|
||||
u8 state_flags;
|
||||
ui("state_flags", "State Flags");
|
||||
|
||||
u8 camera_region;
|
||||
ui("camera_region", "Camera Region");
|
||||
u8 texture_count ui("Texture Count");
|
||||
u8 constant_count ui("Constant Count");
|
||||
u8 state_bits_count ui("State Bits Count");
|
||||
u8 state_flags ui("State Flags");
|
||||
u8 camera_region ui("Camera Region");
|
||||
skip 1;
|
||||
|
||||
// Pointers
|
||||
i32 technique_set_ptr;
|
||||
ui("technique_set_ptr", "Technique Set Ptr");
|
||||
|
||||
i32 texture_table_ptr;
|
||||
ui("texture_table_ptr", "Texture Table Ptr");
|
||||
|
||||
i32 constant_table_ptr;
|
||||
ui("constant_table_ptr", "Constant Table Ptr");
|
||||
|
||||
i32 state_bits_table_ptr;
|
||||
ui("state_bits_table_ptr", "State Bits Table Ptr");
|
||||
i32 technique_set_ptr ui("Technique Set Ptr");
|
||||
i32 texture_table_ptr ui("Texture Table Ptr");
|
||||
i32 constant_table_ptr ui("Constant Table Ptr");
|
||||
i32 state_bits_table_ptr ui("State Bits Table Ptr");
|
||||
|
||||
// ============ Inline data (after header) ============
|
||||
inline cstring material_name when material_name_ptr [ui="Material Name", set_name];
|
||||
if (material_name_ptr == PTR_INLINE) {
|
||||
material_name = cstring() ui("Material Name");
|
||||
set_name(material_name);
|
||||
}
|
||||
|
||||
if (technique_set_ptr == PTR_INLINE) {
|
||||
technique_set = parse_here("materialtechniqueset");
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
type materialargumentdef [display="Material Argument Def"]
|
||||
type materialargumentdef ui("Material Argument Def")
|
||||
{
|
||||
// MaterialArgumentDef is a 4-byte union on PC:
|
||||
// - float* literalConst (pointer)
|
||||
@ -6,7 +6,5 @@ type materialargumentdef [display="Material Argument Def"]
|
||||
// - u32 codeSampler
|
||||
// - u32 nameHash
|
||||
// We just read it as raw bytes since interpretation depends on arg type
|
||||
value = read(4);
|
||||
|
||||
ui("value", "Value");
|
||||
value = read(4) ui("Value");
|
||||
}
|
||||
|
||||
@ -1,26 +1,13 @@
|
||||
type materialconstantdef [display="Material Constant Def"]
|
||||
type materialconstantdef ui("Material Constant Def")
|
||||
{
|
||||
u32 name_hash;
|
||||
|
||||
ui("name_hash", "Name Hash");
|
||||
u32 name_hash ui("Name Hash");
|
||||
|
||||
// Name is 12 bytes of raw data (null-padded string)
|
||||
name_bytes = read(12);
|
||||
name = ascii(name_bytes);
|
||||
name = ascii(name_bytes) ui("Name");
|
||||
|
||||
ui("name", "Name");
|
||||
|
||||
u32 literal_1;
|
||||
|
||||
|
||||
ui("literal_1", "Literal 1");
|
||||
u32 literal_2;
|
||||
|
||||
ui("literal_2", "Literal 2");
|
||||
u32 literal_3;
|
||||
|
||||
ui("literal_3", "Literal 3");
|
||||
u32 literal_4;
|
||||
|
||||
ui("literal_4", "Literal 4");
|
||||
u32 literal_1 ui("Literal 1");
|
||||
u32 literal_2 ui("Literal 2");
|
||||
u32 literal_3 ui("Literal 3");
|
||||
u32 literal_4 ui("Literal 4");
|
||||
}
|
||||
|
||||
@ -1,32 +1,15 @@
|
||||
type materialinfo [display="Material Info"]
|
||||
type materialinfo ui("Material Info")
|
||||
{
|
||||
i32 material_name_ptr;
|
||||
|
||||
ui("material_name_ptr", "Material Name Ptr");
|
||||
|
||||
u8 game_flags;
|
||||
|
||||
|
||||
ui("game_flags", "Game Flags");
|
||||
u8 sort_key;
|
||||
|
||||
ui("sort_key", "Sort Key");
|
||||
u8 texture_atlas_row_count;
|
||||
|
||||
ui("texture_atlas_row_count", "Texture Atlas Row Count");
|
||||
u8 texture_atlas_column_count;
|
||||
|
||||
ui("texture_atlas_column_count", "Texture Atlas Column Count");
|
||||
i32 material_name_ptr ui("Material Name Ptr");
|
||||
u8 game_flags ui("Game Flags");
|
||||
u8 sort_key ui("Sort Key");
|
||||
u8 texture_atlas_row_count ui("Texture Atlas Row Count");
|
||||
u8 texture_atlas_column_count ui("Texture Atlas Column Count");
|
||||
|
||||
draw_surf = parse_here("gfxdrawsurf");
|
||||
|
||||
u32 surface_type_bits;
|
||||
|
||||
|
||||
ui("surface_type_bits", "Surface Type Bits");
|
||||
u16 hash_index;
|
||||
|
||||
ui("hash_index", "Hash Index");
|
||||
u32 surface_type_bits ui("Surface Type Bits");
|
||||
u16 hash_index ui("Hash Index");
|
||||
|
||||
skip(2); // padding
|
||||
}
|
||||
|
||||
@ -1,37 +1,30 @@
|
||||
type materialpass [display="Material Pass"]
|
||||
type materialpass ui("Material Pass")
|
||||
{
|
||||
const PTR_INLINE = -1;
|
||||
|
||||
// Pointers first (header)
|
||||
i32 vertex_decl_ptr;
|
||||
ui("vertex_decl_ptr", "Vertex Decl Ptr");
|
||||
|
||||
i32 vertex_shader_ptr;
|
||||
ui("vertex_shader_ptr", "Vertex Shader Ptr");
|
||||
|
||||
i32 pixel_shader_ptr;
|
||||
ui("pixel_shader_ptr", "Pixel Shader Ptr");
|
||||
i32 vertex_decl_ptr ui("Vertex Decl Ptr");
|
||||
i32 vertex_shader_ptr ui("Vertex Shader Ptr");
|
||||
i32 pixel_shader_ptr ui("Pixel Shader Ptr");
|
||||
|
||||
// Arg counts (COD4 uses u8)
|
||||
u8 per_prim_arg_count;
|
||||
ui("per_prim_arg_count", "Per Prim Arg Count");
|
||||
u8 per_prim_arg_count ui("Per Prim Arg Count");
|
||||
u8 per_obj_arg_count ui("Per Obj Arg Count");
|
||||
u8 stable_arg_count ui("Stable Arg Count");
|
||||
u8 custom_sampler_flags ui("Custom Sampler Flags");
|
||||
|
||||
u8 per_obj_arg_count;
|
||||
ui("per_obj_arg_count", "Per Obj Arg Count");
|
||||
|
||||
u8 stable_arg_count;
|
||||
ui("stable_arg_count", "Stable Arg Count");
|
||||
|
||||
u8 custom_sampler_flags;
|
||||
ui("custom_sampler_flags", "Custom Sampler Flags");
|
||||
|
||||
i32 args_ptr;
|
||||
ui("args_ptr", "Args Ptr");
|
||||
i32 args_ptr ui("Args Ptr");
|
||||
|
||||
// Inline data
|
||||
inline materialvertexdeclaration vertex_decl when vertex_decl_ptr;
|
||||
inline materialvertexshader vertex_shader when vertex_shader_ptr;
|
||||
inline pixelshader pixel_shader when pixel_shader_ptr;
|
||||
if (vertex_decl_ptr == PTR_INLINE) {
|
||||
vertex_decl = parse_here("materialvertexdeclaration");
|
||||
}
|
||||
if (vertex_shader_ptr == PTR_INLINE) {
|
||||
vertex_shader = parse_here("materialvertexshader");
|
||||
}
|
||||
if (pixel_shader_ptr == PTR_INLINE) {
|
||||
pixel_shader = parse_here("pixelshader");
|
||||
}
|
||||
|
||||
// Parse args if ptr is -1 (inline) - uses calculated count
|
||||
_arg_count = stable_arg_count + per_obj_arg_count + per_prim_arg_count;
|
||||
|
||||
@ -1,11 +1,7 @@
|
||||
type materialshaderargument [display="Material Shader Argument"]
|
||||
type materialshaderargument ui("Material Shader Argument")
|
||||
{
|
||||
u16 arg_type;
|
||||
|
||||
ui("arg_type", "Type");
|
||||
u16 dest;
|
||||
|
||||
ui("dest", "Dest");
|
||||
u16 arg_type ui("Type");
|
||||
u16 dest ui("Dest");
|
||||
|
||||
// Argument definition
|
||||
arg_def = parse_here("materialargumentdef");
|
||||
|
||||
@ -1,10 +1,6 @@
|
||||
type materialstreamrouting [display="Material Stream Routing"]
|
||||
type materialstreamrouting ui("Material Stream Routing")
|
||||
{
|
||||
// Stream routing arrays - 16 bytes each
|
||||
source = read(16);
|
||||
|
||||
ui("source", "Source");
|
||||
dest = read(16);
|
||||
|
||||
ui("dest", "Dest");
|
||||
source = read(16) ui("Source");
|
||||
dest = read(16) ui("Dest");
|
||||
}
|
||||
|
||||
@ -1,15 +1,10 @@
|
||||
type materialtechnique [display="Material Technique"]
|
||||
type materialtechnique ui("Material Technique")
|
||||
{
|
||||
const PTR_INLINE = -1;
|
||||
|
||||
i32 technique_name_ptr;
|
||||
ui("technique_name_ptr", "Technique Name Ptr");
|
||||
|
||||
u16 flags;
|
||||
ui("flags", "Flags");
|
||||
|
||||
u16 pass_count;
|
||||
ui("pass_count", "Pass Count");
|
||||
i32 technique_name_ptr ui("Technique Name Ptr");
|
||||
u16 flags ui("Flags");
|
||||
u16 pass_count ui("Pass Count");
|
||||
|
||||
// COD zone streaming order:
|
||||
// 1. All pass HEADERS (20 bytes each)
|
||||
@ -27,7 +22,10 @@ type materialtechnique [display="Material Technique"]
|
||||
}
|
||||
|
||||
// Inline data
|
||||
inline cstring technique_name when technique_name_ptr [ui="Technique Name", set_name];
|
||||
if (technique_name_ptr == PTR_INLINE) {
|
||||
technique_name = cstring() ui("Technique Name");
|
||||
set_name(technique_name);
|
||||
}
|
||||
|
||||
// Second pass: Parse inline data for each pass based on stored header values
|
||||
// Just parse sequentially - data is laid out in order
|
||||
|
||||
@ -1,15 +1,10 @@
|
||||
type materialtechniqueset [display="Material Technique Set"]
|
||||
type materialtechniqueset ui("Material Technique Set")
|
||||
{
|
||||
const PTR_INLINE = -1;
|
||||
|
||||
i32 technique_set_name_ptr;
|
||||
ui("technique_set_name_ptr", "Technique Set Name Ptr");
|
||||
|
||||
u8 world_vert_format;
|
||||
ui("world_vert_format", "World Vert Format");
|
||||
|
||||
u8 has_been_uploaded;
|
||||
ui("has_been_uploaded", "Has Been Uploaded");
|
||||
i32 technique_set_name_ptr ui("Technique Set Name Ptr");
|
||||
u8 world_vert_format ui("World Vert Format");
|
||||
u8 has_been_uploaded ui("Has Been Uploaded");
|
||||
|
||||
skip 2; // padding to align to 4 bytes
|
||||
|
||||
@ -29,7 +24,7 @@ type materialtechniqueset [display="Material Technique Set"]
|
||||
}
|
||||
}
|
||||
}
|
||||
ui("technique_count", "Technique Count");
|
||||
technique_count = technique_count ui("Technique Count");
|
||||
|
||||
// Validate techset (stub/minimal techsets have references instead of inline data)
|
||||
_is_valid_techset = 1;
|
||||
@ -49,8 +44,8 @@ type materialtechniqueset [display="Material Technique Set"]
|
||||
}
|
||||
|
||||
// Parse inline name
|
||||
inline cstring technique_set_name when technique_set_name_ptr [ui="Technique Set Name"];
|
||||
if (technique_set_name_ptr == PTR_INLINE) {
|
||||
technique_set_name = cstring() ui("Technique Set Name");
|
||||
set_name(strip(technique_set_name, ","));
|
||||
}
|
||||
|
||||
|
||||
@ -1,27 +1,15 @@
|
||||
type materialtexturedef [display="Material Texture Def"]
|
||||
type materialtexturedef ui("Material Texture Def")
|
||||
{
|
||||
// MaterialTextureDef - 12 bytes total
|
||||
// The image pointer is just a reference to a GfxImage asset that's
|
||||
// streamed separately in the zone file - NOT inline within the material
|
||||
u32 name_hash;
|
||||
|
||||
ui("name_hash", "Name Hash");
|
||||
u8 name_start;
|
||||
|
||||
ui("name_start", "Name Start");
|
||||
u8 name_end;
|
||||
|
||||
ui("name_end", "Name End");
|
||||
u8 sampler_state;
|
||||
|
||||
ui("sampler_state", "Sampler State");
|
||||
u8 semantic;
|
||||
|
||||
ui("semantic", "Semantic");
|
||||
u32 name_hash ui("Name Hash");
|
||||
u8 name_start ui("Name Start");
|
||||
u8 name_end ui("Name End");
|
||||
u8 sampler_state ui("Sampler State");
|
||||
u8 semantic ui("Semantic");
|
||||
|
||||
// GfxImage* image - pointer to image asset (resolved elsewhere in zone)
|
||||
// -1 means "needs fixup", but image data is a separate asset entry
|
||||
i32 image_ptr;
|
||||
|
||||
ui("image_ptr", "Image Ptr");
|
||||
i32 image_ptr ui("Image Ptr");
|
||||
}
|
||||
|
||||
@ -1,10 +1,11 @@
|
||||
type materialtexturedefinfo [display="Material Texture Def Info"]
|
||||
type materialtexturedefinfo ui("Material Texture Def Info")
|
||||
{
|
||||
const PTR_INLINE = -1;
|
||||
|
||||
i32 texture_ptr;
|
||||
ui("texture_ptr", "Texture Ptr");
|
||||
i32 texture_ptr ui("Texture Ptr");
|
||||
|
||||
// Inline data
|
||||
inline image image when texture_ptr;
|
||||
if (texture_ptr == PTR_INLINE) {
|
||||
image = parse_here("image");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,15 +1,9 @@
|
||||
type materialvertexdeclaration [display="Material Vertex Declaration"]
|
||||
type materialvertexdeclaration ui("Material Vertex Declaration")
|
||||
{
|
||||
// No name pointer in this structure!
|
||||
u8 stream_count;
|
||||
|
||||
ui("stream_count", "Stream Count");
|
||||
u8 has_optional_source;
|
||||
|
||||
ui("has_optional_source", "Has Optional Source");
|
||||
u8 is_loaded;
|
||||
|
||||
ui("is_loaded", "Is Loaded");
|
||||
u8 stream_count ui("Stream Count");
|
||||
u8 has_optional_source ui("Has Optional Source");
|
||||
u8 is_loaded ui("Is Loaded");
|
||||
|
||||
skip(1); // padding
|
||||
|
||||
|
||||
@ -1,15 +1,17 @@
|
||||
type materialvertexshader [display="Material Vertex Shader"]
|
||||
type materialvertexshader ui("Material Vertex Shader")
|
||||
{
|
||||
const PTR_INLINE = -1;
|
||||
|
||||
i32 shader_name_ptr;
|
||||
ui("shader_name_ptr", "Shader Name Ptr");
|
||||
i32 shader_name_ptr ui("Shader Name Ptr");
|
||||
|
||||
// Vertex shader program (parse header first)
|
||||
program = parse_here("materialvertexshaderprogram");
|
||||
|
||||
// Inline data
|
||||
inline cstring shader_name when shader_name_ptr [ui="Shader Name", set_name];
|
||||
if (shader_name_ptr == PTR_INLINE) {
|
||||
shader_name = cstring() ui("Shader Name");
|
||||
set_name(shader_name);
|
||||
}
|
||||
|
||||
// Note: LoadDef program data parsing happens in materialvertexshaderprogram
|
||||
}
|
||||
|
||||
@ -1,10 +1,8 @@
|
||||
type materialvertexshaderprogram [display="Material Vertex Shader Program"]
|
||||
type materialvertexshaderprogram ui("Material Vertex Shader Program")
|
||||
{
|
||||
// On PC COD4, this is just a D3D shader pointer
|
||||
// No load def bytecode on PC - shaders are pre-compiled D3D bytecode
|
||||
i32 vertex_shader_ptr;
|
||||
|
||||
ui("vertex_shader_ptr", "Vertex Shader Ptr");
|
||||
i32 vertex_shader_ptr ui("Vertex Shader Ptr");
|
||||
|
||||
// NOTE: On console platforms, this would have a GfxVertexShaderLoadDef
|
||||
// but PC uses D3D compiled shaders directly
|
||||
|
||||
@ -1,10 +1,8 @@
|
||||
type materialvertexstreamrouting [display="Material Vertex Stream Routing"]
|
||||
type materialvertexstreamrouting ui("Material Vertex Stream Routing")
|
||||
{
|
||||
// Stream routing data (32 bytes: source[16] + dest[16])
|
||||
data = parse_here("materialstreamrouting");
|
||||
|
||||
// Vertex declaration pointer
|
||||
i32 decl_ptr;
|
||||
|
||||
ui("decl_ptr", "Decl Ptr");
|
||||
i32 decl_ptr ui("Decl Ptr");
|
||||
}
|
||||
|
||||
@ -1,70 +1,53 @@
|
||||
type menu [display="Menu"]
|
||||
type menu ui("Menu")
|
||||
{
|
||||
const PTR_INLINE = -1;
|
||||
|
||||
// windowDef_t embedded structure
|
||||
window = parse_here("windowdef");
|
||||
|
||||
i32 font_ptr;
|
||||
ui("font_ptr", "Font Ptr");
|
||||
|
||||
i32 full_screen;
|
||||
ui("full_screen", "Full Screen");
|
||||
|
||||
i32 item_count;
|
||||
ui("item_count", "Item Count");
|
||||
|
||||
i32 font_index;
|
||||
ui("font_index", "Font Index");
|
||||
|
||||
i32 cursor_item;
|
||||
ui("cursor_item", "Cursor Item");
|
||||
|
||||
i32 fade_cycle;
|
||||
ui("fade_cycle", "Fade Cycle");
|
||||
|
||||
fade_values = read(12);
|
||||
ui("fade_values", "Fade Clamp/Amount/InAmount");
|
||||
|
||||
blur_radius = read(4);
|
||||
ui("blur_radius", "Blur Radius");
|
||||
|
||||
i32 on_open_ptr;
|
||||
ui("on_open_ptr", "OnOpen Ptr");
|
||||
|
||||
i32 on_close_ptr;
|
||||
ui("on_close_ptr", "OnClose Ptr");
|
||||
|
||||
i32 on_esc_ptr;
|
||||
ui("on_esc_ptr", "OnESC Ptr");
|
||||
|
||||
i32 on_key_ptr;
|
||||
ui("on_key_ptr", "OnKey Ptr");
|
||||
|
||||
i32 sound_name_ptr;
|
||||
ui("sound_name_ptr", "Sound Name Ptr");
|
||||
|
||||
i32 items_ptr;
|
||||
ui("items_ptr", "Items Ptr");
|
||||
|
||||
i32 allowed_binding_ptr;
|
||||
ui("allowed_binding_ptr", "Allowed Binding Ptr");
|
||||
|
||||
i32 sound_loop_ptr;
|
||||
ui("sound_loop_ptr", "Sound Loop Ptr");
|
||||
|
||||
i32 image_track;
|
||||
ui("image_track", "Image Track");
|
||||
i32 font_ptr ui("Font Ptr");
|
||||
i32 full_screen ui("Full Screen");
|
||||
i32 item_count ui("Item Count");
|
||||
i32 font_index ui("Font Index");
|
||||
i32 cursor_item ui("Cursor Item");
|
||||
i32 fade_cycle ui("Fade Cycle");
|
||||
fade_values = read(12) ui("Fade Clamp/Amount/InAmount");
|
||||
blur_radius = read(4) ui("Blur Radius");
|
||||
i32 on_open_ptr ui("OnOpen Ptr");
|
||||
i32 on_close_ptr ui("OnClose Ptr");
|
||||
i32 on_esc_ptr ui("OnESC Ptr");
|
||||
i32 on_key_ptr ui("OnKey Ptr");
|
||||
i32 sound_name_ptr ui("Sound Name Ptr");
|
||||
i32 items_ptr ui("Items Ptr");
|
||||
i32 allowed_binding_ptr ui("Allowed Binding Ptr");
|
||||
i32 sound_loop_ptr ui("Sound Loop Ptr");
|
||||
i32 image_track ui("Image Track");
|
||||
|
||||
// Inline data
|
||||
inline cstring font when font_ptr [ui="Font"];
|
||||
inline cstring on_open when on_open_ptr [ui="OnOpen"];
|
||||
inline cstring on_close when on_close_ptr [ui="OnClose"];
|
||||
inline cstring on_esc when on_esc_ptr [ui="OnESC"];
|
||||
inline itemkeyhandler on_key when on_key_ptr;
|
||||
inline cstring sound_name when sound_name_ptr [ui="Sound Name"];
|
||||
inline cstring allowed_binding when allowed_binding_ptr [ui="Allowed Binding"];
|
||||
inline cstring sound_loop when sound_loop_ptr [ui="Sound Loop"];
|
||||
if (font_ptr == PTR_INLINE) {
|
||||
font = cstring() ui("Font");
|
||||
}
|
||||
if (on_open_ptr == PTR_INLINE) {
|
||||
on_open = cstring() ui("OnOpen");
|
||||
}
|
||||
if (on_close_ptr == PTR_INLINE) {
|
||||
on_close = cstring() ui("OnClose");
|
||||
}
|
||||
if (on_esc_ptr == PTR_INLINE) {
|
||||
on_esc = cstring() ui("OnESC");
|
||||
}
|
||||
if (on_key_ptr == PTR_INLINE) {
|
||||
on_key = parse_here("itemkeyhandler");
|
||||
}
|
||||
if (sound_name_ptr == PTR_INLINE) {
|
||||
sound_name = cstring() ui("Sound Name");
|
||||
}
|
||||
if (allowed_binding_ptr == PTR_INLINE) {
|
||||
allowed_binding = cstring() ui("Allowed Binding");
|
||||
}
|
||||
if (sound_loop_ptr == PTR_INLINE) {
|
||||
sound_loop = cstring() ui("Sound Loop");
|
||||
}
|
||||
|
||||
if (items_ptr == PTR_INLINE && item_count > 0) {
|
||||
array[item_count] items: itemdef;
|
||||
|
||||
@ -1,127 +1,76 @@
|
||||
type menudef [display="Menu Definition"]
|
||||
type menudef ui("Menu Definition")
|
||||
{
|
||||
const PTR_INLINE = -1;
|
||||
|
||||
// WindowDef_t embedded
|
||||
window = parse_here("windowdef");
|
||||
ui("window", "Window");
|
||||
window = parse_here("windowdef") ui("Window");
|
||||
|
||||
// Menu Properties
|
||||
i32 font_ptr;
|
||||
ui("font_ptr", "Font Ptr");
|
||||
|
||||
i32 full_screen;
|
||||
ui("full_screen", "Full Screen");
|
||||
|
||||
i32 item_count;
|
||||
ui("item_count", "Item Count");
|
||||
|
||||
i32 font_index;
|
||||
ui("font_index", "Font Index");
|
||||
|
||||
i32 cursor_item;
|
||||
ui("cursor_item", "Cursor Item");
|
||||
|
||||
i32 fade_cycle;
|
||||
ui("fade_cycle", "Fade Cycle");
|
||||
|
||||
f32 fade_clamp;
|
||||
ui("fade_clamp", "Fade Clamp");
|
||||
|
||||
f32 fade_amount;
|
||||
ui("fade_amount", "Fade Amount");
|
||||
|
||||
f32 fade_in_amount;
|
||||
ui("fade_in_amount", "Fade In Amount");
|
||||
|
||||
f32 blur_radius;
|
||||
ui("blur_radius", "Blur Radius");
|
||||
|
||||
i32 on_open_ptr;
|
||||
ui("on_open_ptr", "OnOpen Ptr");
|
||||
|
||||
i32 on_close_ptr;
|
||||
ui("on_close_ptr", "OnClose Ptr");
|
||||
|
||||
i32 on_esc_ptr;
|
||||
ui("on_esc_ptr", "OnESC Ptr");
|
||||
|
||||
i32 on_key_ptr;
|
||||
ui("on_key_ptr", "OnKey Ptr");
|
||||
|
||||
visible_exp = parse_here("statement");
|
||||
ui("visible_exp", "Visible Exp");
|
||||
|
||||
i32 allowed_binding_ptr;
|
||||
ui("allowed_binding_ptr", "Allowed Binding Ptr");
|
||||
|
||||
i32 sound_name_ptr;
|
||||
ui("sound_name_ptr", "Sound Name Ptr");
|
||||
|
||||
i32 image_track;
|
||||
ui("image_track", "Image Track");
|
||||
|
||||
f32 focus_color_r;
|
||||
ui("focus_color_r", "Focus R");
|
||||
|
||||
f32 focus_color_g;
|
||||
ui("focus_color_g", "Focus G");
|
||||
|
||||
f32 focus_color_b;
|
||||
ui("focus_color_b", "Focus B");
|
||||
|
||||
f32 focus_color_a;
|
||||
ui("focus_color_a", "Focus A");
|
||||
|
||||
f32 disable_color_r;
|
||||
ui("disable_color_r", "Disable R");
|
||||
|
||||
f32 disable_color_g;
|
||||
ui("disable_color_g", "Disable G");
|
||||
|
||||
f32 disable_color_b;
|
||||
ui("disable_color_b", "Disable B");
|
||||
|
||||
f32 disable_color_a;
|
||||
ui("disable_color_a", "Disable A");
|
||||
|
||||
rect_x_exp = parse_here("statement");
|
||||
ui("rect_x_exp", "Rect X Exp");
|
||||
|
||||
rect_y_exp = parse_here("statement");
|
||||
ui("rect_y_exp", "Rect Y Exp");
|
||||
|
||||
i32 items_ptr;
|
||||
ui("items_ptr", "Items Ptr");
|
||||
i32 font_ptr ui("Font Ptr");
|
||||
i32 full_screen ui("Full Screen");
|
||||
i32 item_count ui("Item Count");
|
||||
i32 font_index ui("Font Index");
|
||||
i32 cursor_item ui("Cursor Item");
|
||||
i32 fade_cycle ui("Fade Cycle");
|
||||
f32 fade_clamp ui("Fade Clamp");
|
||||
f32 fade_amount ui("Fade Amount");
|
||||
f32 fade_in_amount ui("Fade In Amount");
|
||||
f32 blur_radius ui("Blur Radius");
|
||||
i32 on_open_ptr ui("OnOpen Ptr");
|
||||
i32 on_close_ptr ui("OnClose Ptr");
|
||||
i32 on_esc_ptr ui("OnESC Ptr");
|
||||
i32 on_key_ptr ui("OnKey Ptr");
|
||||
visible_exp = parse_here("statement") ui("Visible Exp");
|
||||
i32 allowed_binding_ptr ui("Allowed Binding Ptr");
|
||||
i32 sound_name_ptr ui("Sound Name Ptr");
|
||||
i32 image_track ui("Image Track");
|
||||
f32 focus_color_r ui("Focus R");
|
||||
f32 focus_color_g ui("Focus G");
|
||||
f32 focus_color_b ui("Focus B");
|
||||
f32 focus_color_a ui("Focus A");
|
||||
f32 disable_color_r ui("Disable R");
|
||||
f32 disable_color_g ui("Disable G");
|
||||
f32 disable_color_b ui("Disable B");
|
||||
f32 disable_color_a ui("Disable A");
|
||||
rect_x_exp = parse_here("statement") ui("Rect X Exp");
|
||||
rect_y_exp = parse_here("statement") ui("Rect Y Exp");
|
||||
i32 items_ptr ui("Items Ptr");
|
||||
|
||||
// ============ INLINE DATA ============
|
||||
|
||||
// Window inline data
|
||||
_win_name_ptr = get(window, "name_ptr");
|
||||
if (_win_name_ptr == PTR_INLINE) {
|
||||
name = cstring();
|
||||
ui("name", "Name");
|
||||
name = cstring() ui("Name");
|
||||
set_name(name);
|
||||
}
|
||||
|
||||
_win_group_ptr = get(window, "group_ptr");
|
||||
if (_win_group_ptr == PTR_INLINE) {
|
||||
group = cstring();
|
||||
ui("group", "Group");
|
||||
group = cstring() ui("Group");
|
||||
}
|
||||
|
||||
_win_bg_ptr = get(window, "background_ptr");
|
||||
if (_win_bg_ptr == PTR_INLINE) {
|
||||
background = parse_here("material");
|
||||
ui("background", "Background");
|
||||
background = parse_here("material") ui("Background");
|
||||
}
|
||||
|
||||
// Simple inline strings
|
||||
inline cstring font when font_ptr [ui="Font"];
|
||||
inline cstring on_open when on_open_ptr [ui="OnOpen"];
|
||||
inline cstring on_close when on_close_ptr [ui="OnClose"];
|
||||
inline cstring on_esc when on_esc_ptr [ui="OnESC"];
|
||||
inline itemkeyhandler on_key when on_key_ptr [ui="OnKey"];
|
||||
if (font_ptr == PTR_INLINE) {
|
||||
font = cstring() ui("Font");
|
||||
}
|
||||
if (on_open_ptr == PTR_INLINE) {
|
||||
on_open = cstring() ui("OnOpen");
|
||||
}
|
||||
if (on_close_ptr == PTR_INLINE) {
|
||||
on_close = cstring() ui("OnClose");
|
||||
}
|
||||
if (on_esc_ptr == PTR_INLINE) {
|
||||
on_esc = cstring() ui("OnESC");
|
||||
}
|
||||
if (on_key_ptr == PTR_INLINE) {
|
||||
on_key = parse_here("itemkeyhandler") ui("OnKey");
|
||||
}
|
||||
|
||||
// Visible expression entries
|
||||
_vis_num = get(visible_exp, "num_entries");
|
||||
@ -131,8 +80,12 @@ type menudef [display="Menu Definition"]
|
||||
array[_vis_num] vis_entries: expressionentry;
|
||||
}
|
||||
|
||||
inline cstring allowed_binding when allowed_binding_ptr [ui="Allowed Binding"];
|
||||
inline cstring sound_name when sound_name_ptr [ui="Sound Name"];
|
||||
if (allowed_binding_ptr == PTR_INLINE) {
|
||||
allowed_binding = cstring() ui("Allowed Binding");
|
||||
}
|
||||
if (sound_name_ptr == PTR_INLINE) {
|
||||
sound_name = cstring() ui("Sound Name");
|
||||
}
|
||||
|
||||
// Rect expression entries
|
||||
_rx_num = get(rect_x_exp, "num_entries");
|
||||
|
||||
@ -1,20 +1,14 @@
|
||||
type menulist [display="Menu List"]
|
||||
type menulist ui("Menu List")
|
||||
{
|
||||
const PTR_INLINE = -1;
|
||||
|
||||
i32 name_ptr;
|
||||
ui("name_ptr", "Name Ptr");
|
||||
|
||||
u32 menu_count;
|
||||
ui("menu_count", "Menu Count");
|
||||
|
||||
i32 menus_ptr;
|
||||
ui("menus_ptr", "Menus Ptr");
|
||||
i32 name_ptr ui("Name Ptr");
|
||||
u32 menu_count ui("Menu Count");
|
||||
i32 menus_ptr ui("Menus Ptr");
|
||||
|
||||
// Inline data
|
||||
if (name_ptr == PTR_INLINE) {
|
||||
name = cstring();
|
||||
ui("name", "Name");
|
||||
name = cstring() ui("Name");
|
||||
set_name(name);
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,4 @@
|
||||
type menuptr [display="Menu Ptr"]
|
||||
type menuptr ui("Menu Ptr")
|
||||
{
|
||||
i32 ptr;
|
||||
|
||||
ui("ptr", "Ptr");
|
||||
i32 ptr ui("Ptr");
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
type multidef [display="Multi Def"]
|
||||
type multidef ui("Multi Def")
|
||||
{
|
||||
const PTR_INLINE = -1;
|
||||
|
||||
@ -26,14 +26,10 @@ type multidef [display="Multi Def"]
|
||||
i32 dvar_str_ptr_28; i32 dvar_str_ptr_29; i32 dvar_str_ptr_30; i32 dvar_str_ptr_31;
|
||||
|
||||
// float dvarValue[32] - 128 bytes
|
||||
dvar_values = read(128);
|
||||
ui("dvar_values", "Dvar Values");
|
||||
dvar_values = read(128) ui("Dvar Values");
|
||||
|
||||
i32 count;
|
||||
ui("count", "Count");
|
||||
|
||||
i32 str_def;
|
||||
ui("str_def", "Str Def");
|
||||
i32 count ui("Count");
|
||||
i32 str_def ui("Str Def");
|
||||
|
||||
// Parse inline dvarList strings (only for -1 pointers, up to count)
|
||||
if (dvar_list_ptr_0 == PTR_INLINE && count > 0) { dvar_list_0 = cstring(); }
|
||||
|
||||
@ -1,13 +1,15 @@
|
||||
type pixelshader [display="Pixel Shader"]
|
||||
type pixelshader ui("Pixel Shader")
|
||||
{
|
||||
const PTR_INLINE = -1;
|
||||
|
||||
i32 shader_name_ptr;
|
||||
ui("shader_name_ptr", "Shader Name Ptr");
|
||||
i32 shader_name_ptr ui("Shader Name Ptr");
|
||||
|
||||
// Shader program structure
|
||||
program = parse_here("pixelshaderprogram");
|
||||
|
||||
// Inline name
|
||||
inline cstring shader_name when shader_name_ptr [ui="Shader Name", set_name];
|
||||
if (shader_name_ptr == PTR_INLINE) {
|
||||
shader_name = cstring() ui("Shader Name");
|
||||
set_name(shader_name);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,10 +1,8 @@
|
||||
type pixelshaderprogram [display="Pixel Shader Program"]
|
||||
type pixelshaderprogram ui("Pixel Shader Program")
|
||||
{
|
||||
// On PC COD4, this is just a D3D shader pointer (or -1 for inline D3D shader)
|
||||
// No load def bytecode on PC - shaders are pre-compiled D3D bytecode
|
||||
i32 pixel_shader_ptr;
|
||||
|
||||
ui("pixel_shader_ptr", "Pixel Shader Ptr");
|
||||
i32 pixel_shader_ptr ui("Pixel Shader Ptr");
|
||||
|
||||
// NOTE: On console platforms, this would have a GfxPixelShaderLoadDef
|
||||
// but PC uses D3D compiled shaders directly
|
||||
|
||||
@ -1,22 +1,20 @@
|
||||
type rawfile [display="Raw File"]
|
||||
type rawfile ui("Raw File")
|
||||
{
|
||||
const PTR_INLINE = -1;
|
||||
|
||||
i32 name_ptr;
|
||||
i32 len;
|
||||
i32 buffer_ptr;
|
||||
|
||||
ui("name_ptr", "Name Ptr");
|
||||
ui("len", "Length");
|
||||
ui("buffer_ptr", "Buffer Ptr");
|
||||
i32 name_ptr ui("Name Ptr");
|
||||
i32 len ui("Length");
|
||||
i32 buffer_ptr ui("Buffer Ptr");
|
||||
|
||||
// Inline data
|
||||
inline cstring name when name_ptr [ui="Name", set_name];
|
||||
if (name_ptr == PTR_INLINE) {
|
||||
name = cstring() ui("Name");
|
||||
set_name(name);
|
||||
}
|
||||
|
||||
// Data buffer (if inline) - read len + 1 bytes for null terminator
|
||||
if (buffer_ptr == PTR_INLINE && len > 0) {
|
||||
raw_data = read(len + 1);
|
||||
ui("raw_data", "Raw Data");
|
||||
raw_data = read(len + 1) ui("Raw Data");
|
||||
|
||||
set_viewer("text");
|
||||
set_text(ascii(raw_data));
|
||||
|
||||
@ -1,22 +1,10 @@
|
||||
type rectdef [display="Rect Definition"]
|
||||
type rectdef ui("Rect Definition")
|
||||
{
|
||||
// RectDef - 24 bytes
|
||||
f32 x;
|
||||
|
||||
ui("x", "X");
|
||||
f32 y;
|
||||
|
||||
ui("y", "Y");
|
||||
f32 w;
|
||||
|
||||
ui("w", "Width");
|
||||
f32 h;
|
||||
|
||||
ui("h", "Height");
|
||||
i32 horz_align;
|
||||
|
||||
ui("horz_align", "Horz Align");
|
||||
i32 vert_align;
|
||||
|
||||
ui("vert_align", "Vert Align");
|
||||
f32 x ui("X");
|
||||
f32 y ui("Y");
|
||||
f32 w ui("Width");
|
||||
f32 h ui("Height");
|
||||
i32 horz_align ui("Horz Align");
|
||||
i32 vert_align ui("Vert Align");
|
||||
}
|
||||
|
||||
@ -1,10 +1,12 @@
|
||||
type scriptstring [display="Script String"]
|
||||
type scriptstring ui("Script String")
|
||||
{
|
||||
const PTR_INLINE = -1;
|
||||
|
||||
i32 ptr;
|
||||
ui("ptr", "Ptr");
|
||||
i32 ptr ui("Ptr");
|
||||
|
||||
// Inline data
|
||||
inline cstring value when ptr [ui="Value", set_name];
|
||||
if (ptr == PTR_INLINE) {
|
||||
value = cstring() ui("Value");
|
||||
set_name(value);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,16 +1,12 @@
|
||||
type scriptstringlist [display="Script String List"]
|
||||
type scriptstringlist ui("Script String List")
|
||||
{
|
||||
const PTR_INLINE = -1;
|
||||
|
||||
u32 raw_count;
|
||||
ui("raw_count", "Raw Count");
|
||||
|
||||
i32 strings_ptr;
|
||||
ui("strings_ptr", "Strings Ptr");
|
||||
u32 raw_count ui("Raw Count");
|
||||
i32 strings_ptr ui("Strings Ptr");
|
||||
|
||||
// C++ code decrements count by 1
|
||||
count = raw_count - 1;
|
||||
ui("count", "Count");
|
||||
count = raw_count - 1 ui("Count");
|
||||
|
||||
if (strings_ptr == PTR_INLINE) {
|
||||
// Two-pass parsing (matching C++ XScriptStringList::ParseData)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user