XPlor/definitions/asura/chunks/txet_chunk.xscript
njohnson 381b28c11f Add Asura engine XScript definitions
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>
2026-01-07 16:36:02 -05:00

29 lines
940 B
Plaintext

// TXET - Texture Reference Chunk (reversed "TEXT")
// Contains texture path references
// Found in .ent files
type txet_chunk [display="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, 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 texture references
u32 texture_count;
texture_count = texture_count [ui, readonly, display="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, readonly, display="First Texture"];
}
}