XPlor/definitions/cod/image.xscript
njohnson 7b1f5d34a1 Consolidate XScript definitions with byte order inheritance
- Volition VPP: Unified BE/LE types using inheritance pattern
- THQA PAK: Child types now inherit byte order from parent
- Various XScript definition updates and fixes

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 16:08:46 -05:00

33 lines
884 B
Plaintext

type image ui("Image")
{
const PTR_INLINE = -1;
const PTR_INLINE_LOADDEF = -2;
// GfxImage struct - 32 bytes total on PC COD4
u32 map_type ui("Map Type");
i32 texture_ptr ui("Texture Ptr");
u8 picmip_0 ui("Picmip 0");
u8 picmip_1 ui("Picmip 1");
u8 semantic ui("Semantic");
u8 track ui("Track");
u32 card_memory_0 ui("Card Memory 0");
u32 card_memory_1 ui("Card Memory 1");
u16 width ui("Width");
u16 height ui("Height");
u16 depth ui("Depth");
u8 category ui("Category");
u8 delay_load_pixels ui("Delay Load Pixels");
i32 name_ptr ui("Name Ptr");
// Inline data
if (name_ptr == PTR_INLINE) {
name = cstring() ui("Name");
set_name(name);
}
// GfxImageLoadDef parsed if texture ptr is -1 or -2 (inline data)
if (texture_ptr == PTR_INLINE || texture_ptr == PTR_INLINE_LOADDEF) {
load_def = parse_here("gfximageloaddef");
}
}