XPlor/definitions/cod/scriptstringlist.xscript
njohnson 7b1f5d34a1 Consolidate XScript definitions with byte order inheritance
- 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>
2026-01-11 16:08:46 -05:00

23 lines
613 B
Plaintext

type scriptstringlist ui("Script String List")
{
const PTR_INLINE = -1;
u32 raw_count ui("Raw Count");
i32 strings_ptr ui("Strings Ptr");
// C++ code decrements count by 1
count = raw_count - 1 ui("Count");
if (strings_ptr == PTR_INLINE) {
// Two-pass parsing (matching C++ XScriptStringList::ParseData)
// Pass 1: Read all string pointers
repeat(count) {
i32 str_ptr;
string_ptrs = push("string_ptrs", str_ptr);
}
// Pass 2: Parse all strings (reads null-terminated string data)
array[count] strings: scriptstring [table="Strings", columns="ptr,value"];
}
}