- Migrate from bracket attributes to ui() function calls - Enhance chunk parsing with improved structure definitions - Add additional metadata fields to chunk handlers - Update Xbox 360 texture and archive definitions Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
55 lines
1.2 KiB
Plaintext
55 lines
1.2 KiB
Plaintext
// LFSR - List File Reference Chunk
|
|
// Contains references to other files/archives
|
|
// Common in .cut, .ent, and other Asura files
|
|
|
|
type lfsr_chunk [display="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");
|
|
|
|
// Number of file references
|
|
u32 entry_count;
|
|
entry_count = entry_count;
|
|
|
|
ui("entry_count", "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");
|
|
}
|
|
|
|
// Set indexed name (format: lfsr.0, lfsr.1, etc.)
|
|
set_name("lfsr." + idx);
|
|
|
|
// Additional data depends on version
|
|
// Some versions have extra 8 bytes per entry
|
|
data_size = chunk_size - 16 - 4;
|
|
if (entry_count > 0) {
|
|
// Account for string we already read
|
|
// Remaining data is entry metadata
|
|
}
|
|
}
|