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

42 lines
1.3 KiB
Plaintext

type image [display="Image"]
{
// GfxImage struct - 32 bytes total on PC COD4
u32 map_type [ui, readonly, display="Map Type"];
// GfxTexture union - on PC this is just a D3D texture ptr (or -1/-2 for inline loaddef)
i32 texture_ptr [ui, readonly, display="Texture Ptr"];
// Picmip (2 bytes)
u8 picmip_0 [ui, readonly, display="Picmip 0"];
u8 picmip_1 [ui, readonly, display="Picmip 1"];
u8 semantic [ui, readonly, display="Semantic"];
u8 track [ui, readonly, display="Track"];
// Card memory (2 x u32 = 8 bytes)
u32 card_memory_0 [ui, readonly, display="Card Memory 0"];
u32 card_memory_1 [ui, readonly, display="Card Memory 1"];
u16 width [ui, readonly, display="Width"];
u16 height [ui, readonly, display="Height"];
u16 depth [ui, readonly, display="Depth"];
u8 category [ui, readonly, display="Category"];
u8 delay_load_pixels [ui, readonly, display="Delay Load Pixels"];
// Name pointer
i32 name_ptr [ui, readonly, display="Name Ptr"];
// Parse inline name if ptr is -1
if (name_ptr == -1) {
name = cstring() [ui, readonly, display="Name"];
_name = name;
}
// GfxImageLoadDef parsed if texture ptr is -1 or -2 (inline data)
// On PC, images with streaming data have loaddef inline
if (texture_ptr == -1 || texture_ptr == -2) {
load_def = parse_here("gfximageloaddef");
}
}