Add new asset type definitions: - GfxWorld and related structures (cells, lights, probes) - Menu system (menudef, itemdef, windowdef, listboxdef) - Sound system (soundalias, soundfile, speakermap, sndcurve) - D3D resources (vertex/index buffers) - Font glyphs and expression entries Update existing definitions with improved field annotations and UI display properties. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
125 lines
4.0 KiB
Plaintext
125 lines
4.0 KiB
Plaintext
type assetlist [display="Asset List"]
|
|
{
|
|
u32 stringlist_count [ui, readonly, display="String List Count"];
|
|
i32 stringlist_ptr [ui, readonly, display="String List Ptr"];
|
|
|
|
u32 asset_count [ui, readonly, display="Asset Count"];
|
|
i32 assets_ptr [ui, readonly, display="Assets Ptr"];
|
|
|
|
// Parse string list inline (don't use parse_here to avoid double-reading count/ptr)
|
|
stringlist = 0;
|
|
if (stringlist_ptr != 0) {
|
|
actual_count = stringlist_count - 1;
|
|
|
|
// First pass: read string pointers (skip them)
|
|
_str_ptrs_size = actual_count * 4;
|
|
if (_str_ptrs_size > 0) {
|
|
_str_ptrs_raw = read(_str_ptrs_size);
|
|
}
|
|
|
|
// Second pass: parse strings at current position
|
|
strings = 0;
|
|
repeat(actual_count) {
|
|
_str = parse_here("scriptstring");
|
|
strings = push("strings", _str);
|
|
}
|
|
|
|
strings = strings [table="Strings", columns="ptr,value"];
|
|
_skip_tree_strings = 1;
|
|
stringlist = strings;
|
|
}
|
|
|
|
if (assets_ptr != 0) {
|
|
// First pass: Parse all asset headers
|
|
assets = 0;
|
|
repeat(asset_count) {
|
|
_a = parse_here("assetheader");
|
|
|
|
if (stringlist != 0) {
|
|
_a_stringlist = stringlist;
|
|
}
|
|
|
|
assets = push("assets", _a);
|
|
}
|
|
|
|
assets = assets [table="Assets", columns="asset_ptr,raw_type,asset_type", format_asset_ptr="hex", format_raw_type="hex"];
|
|
_skip_tree_assets = 1;
|
|
|
|
// Second pass: Parse actual asset data based on headers
|
|
parsed_assets = 0;
|
|
repeat(asset_count) {
|
|
_header = get(assets, _i);
|
|
_ptr = get(_header, "asset_ptr");
|
|
_type = get(_header, "asset_type");
|
|
|
|
// Parse inline asset data (ptr == -1 which is 4294967295 as u32)
|
|
if (_ptr == 4294967295) {
|
|
if (_type == "techset") {
|
|
_asset = parse_here("materialtechniqueset");
|
|
parsed_assets = push("parsed_assets", _asset);
|
|
}
|
|
if (_type == "material") {
|
|
_asset = parse_here("material");
|
|
parsed_assets = push("parsed_assets", _asset);
|
|
}
|
|
if (_type == "rawfile") {
|
|
_asset = parse_here("rawfile");
|
|
parsed_assets = push("parsed_assets", _asset);
|
|
}
|
|
if (_type == "gfx_map") {
|
|
_asset = parse_here("gfxworld");
|
|
parsed_assets = push("parsed_assets", _asset);
|
|
}
|
|
if (_type == "image") {
|
|
_asset = parse_here("image");
|
|
parsed_assets = push("parsed_assets", _asset);
|
|
}
|
|
if (_type == "pixelshader") {
|
|
_asset = parse_here("pixelshader");
|
|
parsed_assets = push("parsed_assets", _asset);
|
|
}
|
|
if (_type == "font") {
|
|
_asset = parse_here("font");
|
|
parsed_assets = push("parsed_assets", _asset);
|
|
}
|
|
if (_type == "localize") {
|
|
_asset = parse_here("localize");
|
|
parsed_assets = push("parsed_assets", _asset);
|
|
}
|
|
if (_type == "menu") {
|
|
_asset = parse_here("menu");
|
|
parsed_assets = push("parsed_assets", _asset);
|
|
}
|
|
if (_type == "sound") {
|
|
_asset = parse_here("sound");
|
|
parsed_assets = push("parsed_assets", _asset);
|
|
}
|
|
if (_type == "loaded_sound") {
|
|
_asset = parse_here("loaded_sound");
|
|
parsed_assets = push("parsed_assets", _asset);
|
|
}
|
|
if (_type == "sndcurve") {
|
|
_asset = parse_here("sndcurve");
|
|
parsed_assets = push("parsed_assets", _asset);
|
|
}
|
|
if (_type == "xmodel") {
|
|
_asset = parse_here("xmodel");
|
|
parsed_assets = push("parsed_assets", _asset);
|
|
}
|
|
if (_type == "stringtable") {
|
|
_asset = parse_here("stringtable_asset");
|
|
parsed_assets = push("parsed_assets", _asset);
|
|
}
|
|
if (_type == "weapon") {
|
|
_asset = parse_here("weapon");
|
|
parsed_assets = push("parsed_assets", _asset);
|
|
}
|
|
if (_type == "menufile" || _type == "menulist") {
|
|
_asset = parse_here("menulist");
|
|
parsed_assets = push("parsed_assets", _asset);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|