- Enhanced chunk parsing - Improved structure definitions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
42 lines
1.3 KiB
Plaintext
42 lines
1.3 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, readonly, display="Chunk ID"];
|
|
chunk_size = chunk_size [ui, readonly, display="Chunk Size"];
|
|
version = version [ui, readonly, display="Version"];
|
|
flags = flags [ui, readonly, display="Flags"];
|
|
|
|
// Number of file references
|
|
u32 entry_count;
|
|
entry_count = entry_count [ui, readonly, display="Entry Count"];
|
|
|
|
// Get type-specific index for naming
|
|
idx = get_global("_lfsr_idx");
|
|
|
|
// Read file reference path (null-terminated string)
|
|
if (entry_count > 0) {
|
|
ref_path = cstring();
|
|
ref_path = ref_path [ui, readonly, display="Reference Path"];
|
|
}
|
|
|
|
// Set indexed name (format: lfsr.0, lfsr.1, etc.)
|
|
_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
|
|
}
|
|
}
|