Add XScript definitions for Rebellion's Asura engine formats: - Archive chunks (fcsr, acsr, rcsr) - Texture chunks (tsxt, xbtx2d_chunk) - Resource chunks and headers Used by games like Sniper Elite V2 on Xbox 360. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
36 lines
1.1 KiB
Plaintext
36 lines
1.1 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"];
|
|
|
|
// Read file reference path (null-terminated string)
|
|
if (entry_count > 0) {
|
|
ref_path = cstring();
|
|
ref_path = ref_path [ui, readonly, display="Reference Path"];
|
|
}
|
|
|
|
// 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
|
|
}
|
|
}
|