- 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>
25 lines
872 B
Plaintext
25 lines
872 B
Plaintext
type zonefile ui("Zone File")
|
|
{
|
|
// Access global variables set by fastfile
|
|
// game_name = game; // Example: access the global 'game' variable
|
|
// platform_id = platform; // Example: access the global 'platform' variable
|
|
|
|
content_len = u32at(pos()) ui("Content Length"); // peek-style
|
|
u32 content_len_raw; // actually consume it
|
|
|
|
remaining_after_len = size() - pos();
|
|
|
|
// If we can afford 10 dwords, assume "non-COD5 header layout"
|
|
if (remaining_after_len >= (10 * 4)) {
|
|
header_kind = 0 ui("Header Kind"); // 0 = non-COD5
|
|
repeat(10) { u32 header_dw; }
|
|
content_len_total = content_len_raw + 44 ui("Computed Total Size");
|
|
} else {
|
|
header_kind = 1 ui("Header Kind"); // 1 = COD5-like
|
|
repeat(8) { u32 header_dw; }
|
|
content_len_total = content_len_raw + 36 ui("Computed Total Size");
|
|
}
|
|
|
|
assetlist_obj = parse_here("assetlist");
|
|
}
|