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

39 lines
987 B
Plaintext

type xmodel ui("XModel")
{
const PTR_INLINE = -1;
i32 name_ptr ui("Name Ptr");
u8 num_bones ui("Num Bones");
u8 num_root_bones ui("Num Root Bones");
u8 num_surfaces ui("Num Surfaces");
i8 lod_ramp_type ui("LOD Ramp Type");
// Model surfaces pointers (4 LODs)
i32 model_surfs_ptr_0 ui("Model Surfs Ptr LOD0");
i32 model_surfs_ptr_1 ui("Model Surfs Ptr LOD1");
i32 model_surfs_ptr_2 ui("Model Surfs Ptr LOD2");
i32 model_surfs_ptr_3 ui("Model Surfs Ptr LOD3");
lod_info = read(16) ui("LOD Info");
i32 coll_surfs_ptr ui("Coll Surfs Ptr");
i32 num_coll_surfs ui("Num Coll Surfs");
i32 contents ui("Contents");
i32 bone_info_ptr ui("Bone Info Ptr");
bounds = read(24) ui("Bounds");
radius = read(4) ui("Radius");
i32 phys_preset_ptr ui("Phys Preset Ptr");
i32 phys_collmap_ptr ui("Phys Collmap Ptr");
u16 flags ui("Flags");
skip 2;
// Inline data
if (name_ptr == PTR_INLINE) {
name = cstring() ui("Name");
set_name(name);
}
}