// probably just written as nulls to disk
struct cmesh_base {
rl_mesh *r_mesh;
rl_material_map *material_map;
}
struct c_object {
object_handle obj_handle; // uint64
cobject *m_render_update_next;
char *name;
cmesh m_mesh;
union {
c_object *m_al_cobject_p; //pointer to the always loaded version of the c_object, if there is one, otherwise it is NULL.
int m_al_cobject_i; //index to it in the al zone (gets converted to a pointer on load)
};
constraint_instance_list* m_constraint_instance_list; // List of constraints that this object is apart of.
uint32 flags;
// zone I'm in.
zone_cell_id zone_id; // 2 bytes
// This holds the time in milliseconds when a fade starts.
// Note: Since this is only 16 bits, the longest fade
// can be around 65 seconds.
uint16 fade_time; // 2 bytes
}
struct c_mesh {
fl_vector pos;
fl_quaternion quat_orient;
const level_mesh_header *m_rendering_lmesh; // may be NULL. If it is, this c_mesh does not reference a level mesh (this is the lod 0 for interiors, and lod 1 for fl zone, and lod 2 for AL zone)
rl_zbias_decal *first_zbias_decal; // if this instance has any associated zbias decals, this is the beginning of the list of zbias decal instances
const level_mesh_header *m_collision_lmesh; // collision version of the level mesh (always medium lod)
c_mesh_variant_data *m_variant_data;
const level_mesh_lod_array *m_lod_array;
city_zone *m_zone_p;
private: // don't access this directly
rl_renderable_instance *m_renderable_instance;
public:
union {
uint m_default_lod_set_index; // Crunched data.
uint m_lod_fade_category_name_crc; // Crunched data.
float const* m_lod_distances; // Run-time data.
};
float render_alpha;
rl_occluder *m_first_occluder;
float m_current_opacity_fade_value; //controls opacity overriding of windows and such
c_mesh_base *base; // the base object type.
}
struct c_mesh_variant_data {
uint32 m_num_material_variants;
level_mesh_material_variant *m_material_variants;
level_mesh_variant_value **m_variant_values;
}
struct level_mesh_material_variant {
uint32 m_material_name_checksum;
uint16 m_variant_0_id;
uint16 m_variant_1_id;
}