XPlor/definitions/cod/stringtable_asset.xscript

36 lines
1.0 KiB
Plaintext
Raw Normal View History

2026-01-01 22:18:40 -05:00
type stringtable_asset [display="String Table"]
{
i32 name_ptr [ui, readonly, display="Name Ptr"];
if (name_ptr == -1) {
name = cstring() [ui, readonly, display="Name"];
}
u32 column_count [ui, readonly, display="Column Count"];
u32 row_count [ui, readonly, display="Row Count"];
i32 values_ptr [ui, readonly, display="Values Ptr"];
// Parse string table values if inline
if (values_ptr == -1 && row_count > 0 && column_count > 0) {
cell_count = row_count * column_count [ui, readonly, display="Cell Count"];
// Read all cell pointers and values in one pass
cells = 0;
repeat(cell_count) {
i32 cell_ptr;
// Store cell pointer for reference
current_cell_ptr = cell_ptr;
}
// Read all cell values
repeat(cell_count) {
// For now, assume all cells have inline string data
// TODO: Handle cell_ptr properly to skip non-inline cells
cell_value = cstring();
cells = push("cells", cell_value);
}
cells = cells [ui, table="Cells", columns="value"];
}
}