- 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>
31 lines
699 B
Plaintext
31 lines
699 B
Plaintext
type stringtable_asset ui("String Table")
|
|
{
|
|
const PTR_INLINE = -1;
|
|
|
|
i32 name_ptr ui("Name Ptr");
|
|
i32 column_count ui("Column Count");
|
|
i32 row_count ui("Row Count");
|
|
i32 values_ptr ui("Values Ptr");
|
|
|
|
// Inline data
|
|
if (name_ptr == PTR_INLINE) {
|
|
name = cstring() ui("Name");
|
|
set_name(name);
|
|
}
|
|
|
|
// Parse string table values if inline
|
|
if (values_ptr == PTR_INLINE && row_count > 0 && column_count > 0) {
|
|
cell_count = row_count * column_count;
|
|
|
|
// First read all cell pointers
|
|
skip cell_count * 4;
|
|
|
|
// Then read all cell string values
|
|
cells = 0;
|
|
repeat(cell_count) {
|
|
_cell_value = cstring();
|
|
cells = push("cells", _cell_value);
|
|
}
|
|
}
|
|
}
|