XPlor/definitions/cod/assetheader.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

52 lines
2.2 KiB
Plaintext

type assetheader
{
u32 raw_type [ui, readonly, display="Raw Type"];
u32 asset_ptr [ui, readonly, display="Asset Ptr"];
// Lookup asset type name based on game/platform globals
asset_type = "UNKNOWN";
if (game == "COD4" && platform == "PC") {
// COD4 PC zone file asset type mapping
// Note: No pixelshader or vertexshader on PC
if (raw_type == 0x00) { asset_type = "xmodelpieces"; }
if (raw_type == 0x01) { asset_type = "physpreset"; }
if (raw_type == 0x02) { asset_type = "xanim"; }
if (raw_type == 0x03) { asset_type = "xmodel"; }
if (raw_type == 0x04) { asset_type = "material"; }
if (raw_type == 0x05) { asset_type = "techset"; }
if (raw_type == 0x06) { asset_type = "image"; }
if (raw_type == 0x07) { asset_type = "sound"; }
if (raw_type == 0x08) { asset_type = "sndcurve"; }
if (raw_type == 0x09) { asset_type = "loaded_sound"; }
if (raw_type == 0x0A) { asset_type = "col_map_sp"; }
if (raw_type == 0x0B) { asset_type = "col_map_mp"; }
if (raw_type == 0x0C) { asset_type = "com_map"; }
if (raw_type == 0x0D) { asset_type = "game_map_sp"; }
if (raw_type == 0x0E) { asset_type = "game_map_mp"; }
if (raw_type == 0x0F) { asset_type = "map_ents"; }
if (raw_type == 0x10) { asset_type = "gfx_map"; }
if (raw_type == 0x11) { asset_type = "lightdef"; }
if (raw_type == 0x12) { asset_type = "ui_map"; }
if (raw_type == 0x13) { asset_type = "font"; }
if (raw_type == 0x14) { asset_type = "menufile"; }
if (raw_type == 0x15) { asset_type = "menu"; }
if (raw_type == 0x16) { asset_type = "localize"; }
if (raw_type == 0x17) { asset_type = "weapon"; }
if (raw_type == 0x18) { asset_type = "snddriverglobals"; }
if (raw_type == 0x19) { asset_type = "fx"; }
if (raw_type == 0x1A) { asset_type = "impactfx"; }
if (raw_type == 0x1B) { asset_type = "aitype"; }
if (raw_type == 0x1C) { asset_type = "mptype"; }
if (raw_type == 0x1D) { asset_type = "character"; }
if (raw_type == 0x1E) { asset_type = "xmodelalias"; }
if (raw_type == 0x1F) { asset_type = "rawfile"; }
if (raw_type == 0x20) { asset_type = "stringtable"; }
}
asset_type = asset_type [ui, readonly, display="Asset Type"];
// Set display name to asset type
_name = asset_type;
}