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"); } }