- 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>
44 lines
1.3 KiB
Plaintext
44 lines
1.3 KiB
Plaintext
// TSXT - Texture Set Chunk (reversed "TXST")
|
|
// Contains texture set information and references
|
|
// Found in .tsBE files
|
|
|
|
type tsxt_chunk [display="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, 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"];
|
|
|
|
// Texture count
|
|
u32 texture_count;
|
|
texture_count = texture_count [ui, readonly, display="Texture Count"];
|
|
|
|
// Get type-specific index for naming
|
|
idx = get_global("_tsxt_idx");
|
|
|
|
// Reference to external texture archive
|
|
if (texture_count > 0) {
|
|
texture_archive_path = cstring();
|
|
texture_archive_path = texture_archive_path [ui, readonly, display="Texture Archive"];
|
|
}
|
|
|
|
// Set indexed name (format: tsxt.0, tsxt.1, etc.)
|
|
_name = "tsxt." + idx;
|
|
|
|
// Texture entries follow - each contains hash and metadata
|
|
// Structure per entry (approx 28 bytes):
|
|
// - 4 bytes: texture hash/ID
|
|
// - 4 bytes: offset in archive
|
|
// - 4 bytes: width info
|
|
// - 4 bytes: height info
|
|
// - 4 bytes: format flags
|
|
// - 4 bytes: mip levels
|
|
// - 4 bytes: unknown
|
|
}
|