- Volition VPP: Unified BE/LE types using inheritance pattern - THQA PAK: Child types now inherit byte order from parent - Various XScript definition updates and fixes Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
36 lines
1.1 KiB
Plaintext
36 lines
1.1 KiB
Plaintext
// GUI file (Big Endian, Sniper Elite, AVP, etc.)
|
|
// XMemCompressed data containing Asura archive
|
|
|
|
type guiBE ui("GUI (Big Endian)", root) byteorder BE
|
|
{
|
|
criteria {
|
|
require _ext == "guibe";
|
|
// XMemCompress signature: 0x0FF512ED or 0x0FF512EE followed by 0x01000000
|
|
sig1 = u32at(0);
|
|
sig2 = u32at(4);
|
|
require (sig1 == 0x0FF512ED || sig1 == 0x0FF512EE);
|
|
require sig2 == 0x01000000;
|
|
}
|
|
|
|
// Read signature info for display
|
|
u32 xmem_signature ui("XMem Signature");
|
|
u32 xmem_flags ui("XMem Flags");
|
|
|
|
seek(0);
|
|
|
|
// Read entire file and decompress
|
|
compressed_data = read(EOF);
|
|
decompressed_data = compressed_data |> xmem;
|
|
|
|
// Export decompressed data
|
|
write_file(_basename + ".gui.decompressed", decompressed_data);
|
|
|
|
// Check if decompressed data is an Asura archive
|
|
dec_sig = ascii(bytesof(decompressed_data, 0, 8));
|
|
is_asura = (dec_sig == "Asura ") ui("Is Asura Archive");
|
|
|
|
if (is_asura) {
|
|
archive = decompressed_data |> parse asura_archive ui("Asura Archive");
|
|
}
|
|
}
|