XPlor/definitions/cod/menulist.xscript
njohnson 0fa26e5256 Expand Call of Duty XScript definitions
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>
2026-01-07 16:36:40 -05:00

36 lines
957 B
Plaintext

type menulist [display="Menu List"]
{
// MenuList header (12 bytes)
i32 name_ptr [ui, readonly, display="Name Ptr"];
u32 menu_count [ui, readonly, display="Menu Count"];
i32 menus_ptr [ui, readonly, display="Menus Ptr"];
// Name string (if inline)
if (name_ptr == -1) {
name = cstring() [ui, readonly, display="Name"];
_name = name;
}
// Menu definitions (if inline)
if (menus_ptr == -1 && menu_count > 0 ) {
// First pass: parse all menu pointers
menu_ptrs = 0;
repeat(menu_count) {
_ptr = parse_here("menuptr");
menu_ptrs = push("menu_ptrs", _ptr);
}
// Second pass: parse menudefs for inline pointers
menus = 0;
repeat(menu_count) {
_ptr_obj = get(menu_ptrs, _i);
_ptr_val = get(_ptr_obj, "ptr");
if (_ptr_val == -1) {
_menu = parse_here("menudef");
menus = push("menus", _menu);
}
}
menus = menus [table="Menus", columns="name"];
}
}