26 #define MAX_DEBRIS_OBJECTS 32
27 #define MAX_MODEL_DETAIL_LEVELS 8
28 #define MAX_PROP_LEN 256
29 #define MAX_NAME_LEN 32
30 #define MAX_ARC_EFFECTS 8
32 #define MOVEMENT_TYPE_NONE -1
33 #define MOVEMENT_TYPE_POS 0
34 #define MOVEMENT_TYPE_ROT 1
35 #define MOVEMENT_TYPE_ROT_SPECIAL 2 // for turrets only
36 #define MOVEMENT_TYPE_TRIGGERED 3 // triggered rotation
37 #define MOVEMENT_TYPE_INTRINSIC_ROTATE 4 // intrinsic (non-subsystem-based) rotation
38 #define MOVEMENT_TYPE_LOOK_AT 5 // the subobject is always looking at a 'look at' subobject, as best it can - Bobboau
42 #define MOVEMENT_AXIS_NONE -1
43 #define MOVEMENT_AXIS_X 0
44 #define MOVEMENT_AXIS_Y 2
45 #define MOVEMENT_AXIS_Z 1
52 #define SUBSYSTEM_NONE 0
53 #define SUBSYSTEM_ENGINE 1
54 #define SUBSYSTEM_TURRET 2
55 #define SUBSYSTEM_RADAR 3
56 #define SUBSYSTEM_NAVIGATION 4
57 #define SUBSYSTEM_COMMUNICATION 5
58 #define SUBSYSTEM_WEAPONS 6
59 #define SUBSYSTEM_SENSORS 7
60 #define SUBSYSTEM_SOLAR 8
61 #define SUBSYSTEM_GAS_COLLECT 9
62 #define SUBSYSTEM_ACTIVATION 10
63 #define SUBSYSTEM_UNKNOWN 11
64 #define SUBSYSTEM_MAX 12 // maximum value for subsystem_xxx, for error checking
69 #define MAX_TFP 10 // maximum number of turret firing points
71 #define MAX_SPLIT_PLANE 5 // number of artist specified split planes (used in big ship explosions)
103 #define MAX_MODEL_SUBSYSTEMS 200 // used in ships.cpp (only place?) for local stack variable DTP; bumped to 200
106 #define MSS_FLAG_ROTATES (1 << 0) // This means the object rotates automatically with "turn_rate"
107 #define MSS_FLAG_STEPPED_ROTATE (1 << 1) // This means that the rotation occurs in steps
108 #define MSS_FLAG_AI_ROTATE (1 << 2) // This means that the rotation is controlled by ai
109 #define MSS_FLAG_CREWPOINT (1 << 3) // If set, this is a crew point.
110 #define MSS_FLAG_TURRET_MATRIX (1 << 4) // If set, this has it's turret matrix created correctly.
111 #define MSS_FLAG_AWACS (1 << 5) // If set, this subsystem has AWACS capability
112 #define MSS_FLAG_ARTILLERY (1 << 6) // if this rotates when weapons are fired - Goober5000
113 #define MSS_FLAG_TRIGGERED (1 << 7) // rotates when triggered by something
114 #define MSS_FLAG_UNTARGETABLE (1 << 8) // Goober5000
115 #define MSS_FLAG_CARRY_NO_DAMAGE (1 << 9) // WMC
116 #define MSS_FLAG_USE_MULTIPLE_GUNS (1 << 10) // WMC
117 #define MSS_FLAG_FIRE_ON_NORMAL (1 << 11) // forces a turret to fire down its normal vecs
118 #define MSS_FLAG_TURRET_HULL_CHECK (1 << 12) // makes the turret check to see if it's going to shoot through it's own hull before fireing - Bobboau
119 #define MSS_FLAG_TURRET_FIXED_FP (1 << 13) // forces turret (when defined with multiple weapons) to prevent the firepoints from alternating
120 #define MSS_FLAG_TURRET_SALVO (1 << 14) // forces turret to fire salvos (all guns simultaneously) - independent targeting
121 #define MSS_FLAG_FIRE_ON_TARGET (1 << 15) // prevents turret from firing unless it is pointing at the firingpoints are pointing at the target
122 #define MSS_FLAG_NO_SS_TARGETING (1 << 16) // toggles the subsystem targeting for the turret
123 #define MSS_FLAG_TURRET_RESET_IDLE (1 << 17) // makes turret reset to their initial position if the target is out of field of view
124 #define MSS_FLAG_TURRET_ALT_MATH (1 << 18) // tells the game to use additional calculations should turret have a defined y fov
125 #define MSS_FLAG_CARRY_SHOCKWAVE (1 << 19) // subsystem - even with 'carry no damage' flag - will carry shockwave damage to the hull
126 #define MSS_FLAG_ALLOW_LANDING (1 << 20) // This subsystem can be landed on
127 #define MSS_FLAG_FOV_EDGE_CHECK (1 << 21) // Tells the game to use better FOV edge checking with this turret
128 #define MSS_FLAG_FOV_REQUIRED (1 << 22) // Tells game not to allow this turret to attempt targeting objects out of FOV
129 #define MSS_FLAG_NO_REPLACE (1 << 23) // set the subsys not to draw replacement ('destroyed') model
130 #define MSS_FLAG_NO_LIVE_DEBRIS (1 << 24) // sets the subsys not to release live debris
131 #define MSS_FLAG_IGNORE_IF_DEAD (1 << 25) // tells homing missiles to ignore the subsys if its dead and home on to hull instead of earlier subsys pos
132 #define MSS_FLAG_ALLOW_VANISHING (1 << 26) // allows subsystem to vanish (prevents explosions & sounds effects from being played)
133 #define MSS_FLAG_DAMAGE_AS_HULL (1 << 27) // applies armor damage to subsystem instead of subsystem damage - FUBAR
134 #define MSS_FLAG_TURRET_LOCKED (1 << 28) // Turret starts locked by default - Sushi
135 #define MSS_FLAG_NO_AGGREGATE (1 << 29) // Don't include with aggregate subsystem types - Goober5000
136 #define MSS_FLAG_TURRET_ANIM_WAIT (1 << 30) // Turret won't fire until animation is complete - Sushi
138 #define MSS_FLAG2_PLAYER_TURRET_SOUND (1 << 0)
139 #define MSS_FLAG2_TURRET_ONLY_TARGET_IF_CAN_FIRE (1 << 1) // Turrets only target things they're allowed to shoot at (e.g. if check-hull fails, won't keep targeting)
140 #define MSS_FLAG2_NO_DISAPPEAR (1 << 2) // Submodel won't disappear when subsystem destroyed
141 #define MSS_FLAG2_COLLIDE_SUBMODEL (1 << 3) // subsystem takes damage only from hits which impact the associated submodel
142 #define MSS_FLAG2_DESTROYED_ROTATION (1 << 4) // allows subobjects to continue to rotate even if they have been destroyed
143 #define MSS_FLAG2_TURRET_USE_AMMO (1 << 5) // enables ammo consumption for turrets (DahBlount)
144 #define MSS_FLAG2_AUTOREPAIR_IF_DISABLED (1 << 6) // Allows the subsystem to repair itself even if disabled (MageKing17)
145 #define MSS_FLAG2_NO_AUTOREPAIR_IF_DISABLED (1 << 7) // Inversion of the previous; disallows this particular subsystem if the ship-wide flag is set (MageKing17)
146 #define MSS_FLAG2_SHARE_FIRE_DIRECTION (1 << 8) // (DahBlount) Whenever the turret fires, make all firing points fire in the same direction.
148 #define NUM_SUBSYSTEM_FLAGS 33
151 #define MSS_MODEL_FLAG_MASK (MSS_FLAG_CREWPOINT | MSS_FLAG_ROTATES | MSS_FLAG_TRIGGERED | MSS_FLAG_ARTILLERY | MSS_FLAG_STEPPED_ROTATE)
152 #define MSS_MODEL_FLAG2_MASK 0
252 #define MARC_TYPE_NORMAL 0 // standard freespace 1 blue lightning arcs
253 #define MARC_TYPE_EMP 1 // EMP blast type arcs
255 #define MAX_LIVE_DEBRIS 7
404 #define MP_TYPE_UNUSED 0
405 #define MP_TYPE_SUBSYS 1
458 #define PULSE_SHIFTTRI 4
518 #define DOCK_TYPE_CARGO (1<<0)
519 #define DOCK_TYPE_REARM (1<<1)
520 #define DOCK_TYPE_GENERIC (1<<2)
522 #define MAX_DOCK_SLOTS 2
538 #define MAX_SHIP_BAY_PATHS 31
573 #define BSP_LIGHT_TYPE_WEAPON 1
574 #define BSP_LIGHT_TYPE_THRUSTER 2
605 #define MAX_MODEL_INSIGNIAS 6
606 #define MAX_INS_FACE_VECS 3
607 #define MAX_INS_VECS 81
608 #define MAX_INS_FACES 128
620 #define PM_FLAG_ALLOW_TILING (1<<0) // Allow texture tiling
621 #define PM_FLAG_AUTOCEN (1<<1) // contains autocentering info
622 #define PM_FLAG_TRANS_BUFFER (1<<2) // render transparency buffer
623 #define PM_FLAG_BATCHED (1<<3) // this model can be batch rendered
624 #define PM_FLAG_HAS_INTRINSIC_ROTATE (1<<4) // whether this model has an intrinsic rotation submodel somewhere
630 int original_texture;
657 #define TM_BASE_TYPE 0 // the standard base map
658 #define TM_GLOW_TYPE 1 // optional glow map
659 #define TM_SPECULAR_TYPE 2 // optional specular map
660 #define TM_NORMAL_TYPE 3 // optional normal map
661 #define TM_HEIGHT_TYPE 4 // optional height map (for parallax mapping)
662 #define TM_MISC_TYPE 5 // optional utility map
663 #define TM_NUM_TYPES 6 //WMC - Number of texture_info objects in texture_map
690 #define MAX_REPLACEMENT_TEXTURES MAX_MODEL_TEXTURES * TM_NUM_TYPES
693 #define REPLACE_WITH_INVISIBLE -47
858 #define MR_NORMAL (0) // Draw a normal object
859 #define MR_SHOW_OUTLINE (1<<0) // Draw the object in outline mode. Color specified by model_set_outline_color
860 #define MR_SKYBOX (1<<1) // Draw as a skybox
861 #define MR_DESATURATED (1<<2) // Draw model in monochrome using outline color
862 #define MR_EMPTY_SLOT0 (1<<3) // Show the radius around the object
863 #define MR_EMPTY_SLOT1 (1<<4) // Show the shield mesh
864 #define MR_SHOW_THRUSTERS (1<<5) // Show the engine thrusters. See model_set_thrust for how long it draws.
865 #define MR_EMPTY_SLOT2 (1<<6) // Only draw the detail level defined in model_set_detail_level
866 #define MR_NO_POLYS (1<<7) // Don't draw the polygons.
867 #define MR_NO_LIGHTING (1<<8) // Don't perform any lighting on the model.
868 #define MR_NO_TEXTURING (1<<9) // Draw textures as flat-shaded polygons.
869 #define MR_NO_CORRECT (1<<10) // Don't to correct texture mapping
870 #define MR_NO_SMOOTHING (1<<11) // Don't perform smoothing on vertices.
871 #define MR_IS_ASTEROID (1<<12) // When set, treat this as an asteroid.
872 #define MR_IS_MISSILE (1<<13) // When set, treat this as a missilie. No lighting, small thrusters.
873 #define MR_SHOW_OUTLINE_PRESET (1<<14) // Draw the object in outline mode. Color assumed to be set already.
874 #define MR_SHOW_INVISIBLE_FACES (1<<15) // Show invisible faces as green...
875 #define MR_AUTOCENTER (1<<16) // Always use the center of the hull bounding box as the center, instead of the pivot point
876 #define MR_EMPTY_SLOT3 (1<<17) // draw bay paths
877 #define MR_ALL_XPARENT (1<<18) // render it fully transparent
878 #define MR_NO_ZBUFFER (1<<19) // switch z-buffering off completely
879 #define MR_NO_CULL (1<<20) // don't cull backfacing poly's
880 #define MR_EMPTY_SLOT4 (1<<21) // force a given texture to always be used
881 #define MR_NO_BATCH (1<<22) // don't use submodel batching when rendering
882 #define MR_EDGE_ALPHA (1<<23) // makes norms that are faceing away from you render more transparent -Bobboau
883 #define MR_CENTER_ALPHA (1<<24) // oposite of above -Bobboau
884 #define MR_NO_FOGGING (1<<25) // Don't fog - taylor
885 #define MR_SHOW_OUTLINE_HTL (1<<26) // Show outlines (wireframe view) using HTL method
886 #define MR_NO_GLOWMAPS (1<<27) // disable rendering of glowmaps - taylor
887 #define MR_FULL_DETAIL (1<<28) // render all valid objects, particularly ones that are otherwise in/out of render boxes - taylor
888 #define MR_FORCE_CLAMP (1<<29) // force clamp - Hery
889 #define MR_EMPTY_SLOT5 (1<<30) // Use a animated Shader - Valathil
890 #define MR_ATTACHED_MODEL (1<<31) // Used for attached weapon model lodding
892 #define MR_DEPRECATED_NORMAL (0) // Draw a normal object
893 #define MR_DEPRECATED_SHOW_OUTLINE (1<<0) // Draw the object in outline mode. Color specified by model_set_outline_color
894 #define MR_DEPRECATED_SHOW_PIVOTS (1<<1) // Show the pivot points
895 #define MR_DEPRECATED_SHOW_PATHS (1<<2) // Show the paths associated with a model
896 #define MR_DEPRECATED_SHOW_RADIUS (1<<3) // Show the radius around the object
897 #define MR_DEPRECATED_SHOW_SHIELDS (1<<4) // Show the shield mesh
898 #define MR_DEPRECATED_SHOW_THRUSTERS (1<<5) // Show the engine thrusters. See model_set_thrust for how long it draws.
899 #define MR_DEPRECATED_LOCK_DETAIL (1<<6) // Only draw the detail level defined in model_set_detail_level
900 #define MR_DEPRECATED_NO_POLYS (1<<7) // Don't draw the polygons.
901 #define MR_DEPRECATED_NO_LIGHTING (1<<8) // Don't perform any lighting on the model.
902 #define MR_DEPRECATED_NO_TEXTURING (1<<9) // Draw textures as flat-shaded polygons.
903 #define MR_DEPRECATED_NO_CORRECT (1<<10) // Don't to correct texture mapping
904 #define MR_DEPRECATED_NO_SMOOTHING (1<<11) // Don't perform smoothing on vertices.
905 #define MR_DEPRECATED_IS_ASTEROID (1<<12) // When set, treat this as an asteroid.
906 #define MR_DEPRECATED_IS_MISSILE (1<<13) // When set, treat this as a missilie. No lighting, small thrusters.
907 #define MR_DEPRECATED_SHOW_OUTLINE_PRESET (1<<14) // Draw the object in outline mode. Color assumed to be set already.
908 #define MR_DEPRECATED_SHOW_INVISIBLE_FACES (1<<15) // Show invisible faces as green...
909 #define MR_DEPRECATED_AUTOCENTER (1<<16) // Always use the center of the hull bounding box as the center, instead of the pivot point
910 #define MR_DEPRECATED_BAY_PATHS (1<<17) // draw bay paths
911 #define MR_DEPRECATED_ALL_XPARENT (1<<18) // render it fully transparent
912 #define MR_DEPRECATED_NO_ZBUFFER (1<<19) // switch z-buffering off completely
913 #define MR_DEPRECATED_NO_CULL (1<<20) // don't cull backfacing poly's
914 #define MR_DEPRECATED_FORCE_TEXTURE (1<<21) // force a given texture to always be used
915 #define MR_DEPRECATED_FORCE_LOWER_DETAIL (1<<22) // force the model to draw 1 LOD lower, if possible
916 #define MR_DEPRECATED_EDGE_ALPHA (1<<23) // makes norms that are faceing away from you render more transparent -Bobboau
917 #define MR_DEPRECATED_CENTER_ALPHA (1<<24) // oposite of above -Bobboau
918 #define MR_DEPRECATED_NO_FOGGING (1<<25) // Don't fog - taylor
919 #define MR_DEPRECATED_SHOW_OUTLINE_HTL (1<<26) // Show outlines (wireframe view) using HTL method
920 #define MR_DEPRECATED_NO_GLOWMAPS (1<<27) // disable rendering of glowmaps - taylor
921 #define MR_DEPRECATED_FULL_DETAIL (1<<28) // render all valid objects, particularly ones that are otherwise in/out of render boxes - taylor
922 #define MR_DEPRECATED_FORCE_CLAMP (1<<29) // force clamp - Hery
923 #define MR_DEPRECATED_ANIMATED_SHADER (1<<30) // Use a animated Shader - Valathil
924 #define MR_DEPRECATED_ATTACHED_MODEL (1<<31) // Used for attached weapon model lodding
926 #define MR_DEBUG_PIVOTS (1<<0) // Show the pivot points
927 #define MR_DEBUG_PATHS (1<<1) // Show the paths associated with a model
928 #define MR_DEBUG_RADIUS (1<<2) // Show the radius around the object
929 #define MR_DEBUG_SHIELDS (1<<3) // Show the shield mesh
930 #define MR_DEBUG_BAY_PATHS (1<<4) // draw bay paths
933 #define MODEL_RENDER_OPAQUE 1
934 #define MODEL_RENDER_TRANS 2
935 #define MODEL_RENDER_ALL 3
1169 #define MC_CHECK_MODEL (1<<0) // Check the polygons in the model.
1170 #define MC_CHECK_SHIELD (1<<1) // check for collision against shield, if it exists.
1171 #define MC_ONLY_SPHERE (1<<2) // Only check bounding sphere. Not accurate, but fast.
1173 #define MC_ONLY_BOUND_BOX (1<<3) // Only check bounding boxes. Pretty accurate and slower than MC_ONLY_SPHERE.
1176 #define MC_CHECK_RAY (1<<4) // Checks a ray from p0 *through* p1 on to infinity
1177 #define MC_CHECK_SPHERELINE (1<<5) // Checks a moving sphere rather than just a ray. Radius
1178 #define MC_SUBMODEL (1<<6) // If this is set, only check the submodel specified in mc->submodel_num. Use with MC_CHECK_MODEL
1179 #define MC_SUBMODEL_INSTANCE (1<<7) // Check submodel and its children (of a rotating submodel)
1180 #define MC_CHECK_INVISIBLE_FACES (1<<8) // Check the invisible faces.
1310 mst_info() : primary_bitmap(-1), primary_glow_bitmap(-1), secondary_glow_bitmap(-1), tertiary_glow_bitmap(-1), distortion_bitmap(-1),
1312 secondary_glow_rad_factor(1.0
f), tertiary_glow_rad_factor(1.0
f), glow_length_factor(1.0
f), distortion_rad_factor(1.0
f), distortion_length_factor(1.0
f),
1313 draw_distortion(true)
void mc_info_init(mc_info *mc)
void model_update_instance(int model_instance_num, int sub_model_num, submodel_instance_info *sii, int flags)
int model_which_octant_distant(vec3d *pnt, int model_num, matrix *model_orient, vec3d *model_pos, model_octant **oct)
struct model_path model_path
float submodel_get_radius(int modelnum, int submodelnum)
struct submodel_instance submodel_instance
int model_find_2d_bound(int model_num, matrix *orient, vec3d *pos, int *x1, int *y1, int *x2, int *y2)
int model_collide(mc_info *mc_info_obj)
int timestamp(int delta_ms)
float get_world_closest_box_point_with_delta(vec3d *closest_box_point, object *box_obj, vec3d *start_point, int *is_inside, float delta)
void model_show_damaged(int model_num, int show_damaged)
vec3d render_sphere_offset
int model_find_bay_path(int modelnum, char *bay_path_name)
bsp_collision_leaf * leaf_list
char lod_name[MAX_NAME_LEN]
#define MAX_SHIP_PRIMARY_BANKS
void model_find_world_point(vec3d *outpnt, vec3d *mpnt, int model_num, int submodel_num, const matrix *objorient, const vec3d *objpos)
int live_debris[MAX_LIVE_DEBRIS]
void model_remove_bsp_collision_tree(int tree_index)
void model_set_instance(int model_num, int sub_model_num, submodel_instance_info *sii, int flags=0)
polymodel * model_get(int model_num)
submodel_instance_info * sii
insignia ins[MAX_MODEL_INSIGNIAS]
int debris_objects[MAX_DEBRIS_OBJECTS]
void model_copy_subsystems(int n_subsystems, model_subsystem *d_sp, model_subsystem *s_sp)
void model_clear_submodel_instance(submodel_instance *sm_instance, bsp_info *sm)
char * model_get_dock_name(int modelnum, int index)
int turret_gun_rotation_snd
void model_get_rotating_submodel_list(SCP_vector< int > *submodel_vector, object *objp)
int model_get_dock_index_type(int modelnum, int index)
int model_rotate_gun(int model_num, model_subsystem *turret, matrix *orient, angles *base_angles, angles *gun_angles, vec3d *pos, vec3d *dst, int obj_idx, bool reset=false)
void model_set_replacement_textures(int *replacement_textures)
#define MAX_MODEL_TEXTURES
int detail[MAX_MODEL_DETAIL_LEVELS]
float detail_depth[MAX_MODEL_DETAIL_LEVELS]
model_tmap_vert * vert_list
void model_find_world_dir(vec3d *out_dir, vec3d *in_dir, int model_num, int submodel_num, const matrix *objorient)
void find_submodel_instance_point(vec3d *outpnt, int model_instance_num, int submodel_num)
float u[MAX_INS_FACES][MAX_INS_FACE_VECS]
struct thruster_bank thruster_bank
int subobj_find_2d_bound(float radius, matrix *orient, vec3d *pos, int *x1, int *y1, int *x2, int *y2)
void model_set_outline_color_fast(void *outline_color)
void model_set_alpha(float alpha)
void model_collide_preprocess(matrix *orient, int model_instance_num, int detail=0)
#define MAX_INS_FACE_VECS
float tertiary_glow_rad_factor
int model_find_2d_bound_min(int model_num, matrix *orient, vec3d *pos, int *x1, int *y1, int *x2, int *y2)
stepped_rotation_t * stepped_rotation
float model_get_core_radius(int modelnum)
int model_which_octant(vec3d *pnt, int model_num, matrix *model_orient, vec3d *model_pos, model_octant **oct)
void model_add_arc(int model_num, int sub_model_num, vec3d *v1, vec3d *v2, int arc_type)
shield_tri ** shield_tris
bsp_collision_tree * model_get_bsp_collision_tree(int tree_index)
char look_at[MAX_NAME_LEN]
void submodel_stepped_rotate(model_subsystem *psub, submodel_instance_info *sii)
bool pulse_period_override
void model_load_texture(polymodel *pm, int i, char *file)
#define MAX_SHIP_BAY_PATHS
int model_get_num_dock_points(int modelnum)
flag_def_list Dock_type_names[]
std::basic_string< char, std::char_traits< char >, std::allocator< char > > SCP_string
void find_submodel_instance_point_normal(vec3d *outpnt, vec3d *outnorm, int model_instance_num, int submodel_num, const vec3d *submodel_pnt, const vec3d *submodel_norm)
GLfloat GLfloat GLfloat v2
int details[MAX_MODEL_DETAIL_LEVELS]
struct stepped_rotation stepped_rotation_t
bsp_collision_leaf * bsp_leaf
struct polymodel_instance polymodel_instance
struct shield_vertex shield_vertex
int turret_base_rotation_snd
void model_draw_paths_htl(int model_num, uint flags)
void model_render_insignias(polymodel *pm, int detail_level, int bitmap_num)
vec3d turret_firing_point[MAX_TFP]
float gun_submodel_rotation
thruster_bank * thrusters
float turret_base_rotation_snd_mult
int primary_banks[MAX_SHIP_PRIMARY_BANKS]
struct glow_point_bank_override glow_point_bank_override
void submodel_render_DEPRECATED(int model_num, int submodel_num, matrix *orient, vec3d *pos, uint flags=MR_DEPRECATED_NORMAL, int objnum=-1, int *replacement_textures=NULL, int render=MODEL_RENDER_ALL)
int turret_max_bomb_ownage
int submodel_get_num_verts(int model_num, int submodel_num)
void parse_triggersint(int &n_trig, queued_animation **triggers, char *props)
int model_create_bsp_collision_tree()
void world_find_model_point(vec3d *out, vec3d *world_pt, const polymodel *pm, int submodel_num, const matrix *orient, const vec3d *pos)
void model_make_turret_matrix(int model_num, model_subsystem *turret)
void model_find_submodel_offset(vec3d *outpnt, int model_num, int sub_model_num)
char alt_dmg_sub_name[NAME_LENGTH]
#define MAX_SHIP_SECONDARY_BANKS
void model_instance_find_world_point(vec3d *outpnt, vec3d *mpnt, int model_instance_num, int submodel_num, const matrix *objorient, const vec3d *objpos)
void model_instance_free_all()
void model_draw_paths(int model_num, uint flags)
SCP_vector< glow_point_bank_override > glowpoint_bank_overrides
void model_interp_set_team_color(const SCP_string &team, const SCP_string &secondaryteam, fix timestamp, int fadetime)
int model_find_dock_index(int modelnum, int dock_type, int index_to_start_at=0)
void find_submodel_instance_point_orient(vec3d *outpnt, matrix *outorient, int model_instance_num, int submodel_num, const vec3d *submodel_pnt, const matrix *submodel_orient)
void model_delete_instance(int model_instance_num)
GLdouble GLdouble GLdouble r
void model_draw_bay_paths(int model_num)
int LoadTexture(char *filename, char *dbg_name)
void model_set_forced_texture(int bmap)
void model_find_obj_dir(vec3d *w_vec, vec3d *m_vec, int model_instance_num, int submodel_num, matrix *objorient)
void PageOut(bool release)
struct model_special * next
int model_find_texture(int model_num, int bitmap)
void model_clear_instance(int model_num)
struct engine_wash_info * engine_wash_pointer
void PageOut(bool release)
void moldel_calc_facing_pts(vec3d *top, vec3d *bot, vec3d *fvec, vec3d *pos, float w, float z_add, vec3d *Eyeposition)
texture_map maps[MAX_MODEL_TEXTURES]
int submodel_get_points(int model_num, int submodel_num, int max_num, vec3d **nts)
bool use_render_box_offset
int FindTexture(int bm_handle)
int secondary_banks[MAX_SHIP_SECONDARY_BANKS]
void world_find_model_instance_point(vec3d *out, vec3d *world_pt, const polymodel_instance *pmi, int submodel_num, const matrix *orient, const vec3d *pos)
void model_draw_bay_paths_htl(int model_num)
submodel_instance * submodel
struct cross_section cross_section
struct shield_info shield_info
vertex_buffer detail_buffers[MAX_MODEL_DETAIL_LEVELS]
vertex_buffer trans_buffer
float favor_current_facing
float distortion_length_factor
vec3d norm[MAX_DOCK_SLOTS]
queued_animation * triggers
int secondary_bank_capacity[MAX_SHIP_SECONDARY_BANKS]
struct model_special model_special
bool use_render_sphere_offset
void model_do_intrinsic_rotations(int model_instance_num=-1)
void model_init_submodel_axis_pt(submodel_instance_info *sii, int model_num, int submodel_num)
int model_load(char *filename, int n_subsystems, model_subsystem *subsystems, int ferror=1, int duplicate=0)
float max_subsys_strength
SCP_vector< vec3d > shield_points
void submodel_rotate(model_subsystem *psub, submodel_instance_info *sii)
void model_page_in_textures(int modelnum, int ship_info_index=-1)
int turret_num_firing_points
void model_set_insignia_bitmap(int bmap)
void model_instance_find_obj_dir(vec3d *w_vec, vec3d *m_vec, int model_instance_num, int submodel_num, matrix *objorient)
void model_draw_debug_points(polymodel *pm, bsp_info *submodel, uint flags)
char crewspot[MAX_NAME_LEN]
float turret_gun_rotation_snd_mult
ubyte * shield_collision_tree
char * Subsystem_types[SUBSYSTEM_MAX]
int num_target_priorities
int primary_bank_capacity[MAX_SHIP_PRIMARY_BANKS]
char alt_sub_name[NAME_LENGTH]
void submodel_get_two_random_points(int model_num, int submodel_num, vec3d *v1, vec3d *v2, vec3d *n1=NULL, vec3d *n2=NULL)
int model_get_dock_types(int modelnum)
void model_page_out_textures(int model_num, bool release=false)
int faces[MAX_INS_FACES][MAX_INS_FACE_VECS]
int SetTexture(int n_tex)
struct ship_bay ship_bay_t
GLuint const GLchar * name
#define MAX_DEBRIS_OBJECTS
ubyte arc_type[MAX_ARC_EFFECTS]
GLboolean GLboolean GLboolean b
int model_find_dock_name_index(int modelnum, char *name)
int weapon_rotation_pbank
void model_instance_find_world_dir(vec3d *out_dir, vec3d *in_dir, int model_instance_num, int submodel_num, const matrix *objorient)
float turret_turning_rate
int submodel_get_num_polys(int model_num, int submodel_num)
#define MAX_MODEL_INSIGNIAS
int modelstats_num_polys_drawn
char parent_name[MAX_NAME_LEN]
#define MR_DEPRECATED_NORMAL
polymodel_instance * model_get_instance(int model_instance_num)
void model_set_outline_color(int r, int g, int b)
int turret_max_target_ownage
glow_point_bank * glow_point_banks
void model_render_DEPRECATED(int model_num, matrix *orient, vec3d *pos, uint flags=MR_DEPRECATED_NORMAL, int objnum=-1, int lighting_skip=-1, int *replacement_textures=NULL, int render=MODEL_RENDER_ALL, const bool is_skybox=false)
int model_render_flags_size
GLubyte GLubyte GLubyte GLubyte w
struct shield_tri shield_tri
struct model_octant model_octant
void submodel_get_two_random_points_better(int model_num, int submodel_num, vec3d *v1, vec3d *v2)
void model_do_look_at(int model_num)
struct model_tmap_vert model_tmap_vert
int model_should_render_engine_glow(int objnum, int bank_obj)
void model_set_instance_info(submodel_instance_info *sii, float turn_rate, float turn_accel)
char subobj_name[MAX_NAME_LEN]
float model_get_radius(int modelnum)
void model_render_shields(polymodel *pm, uint flags)
float render_sphere_radius
int submodel_find_2d_bound_min(int model_num, int submodel, matrix *orient, vec3d *pos, int *x1, int *y1, int *x2, int *y2)
void model_set_thrust(int model_num=-1, mst_info *mst=NULL)
#define MAX_MODEL_DETAIL_LEVELS
void model_interp_set_animated_effect_and_timer(int effect_num=0, float effect_timer=0.0f)
int secondary_glow_bitmap
vec3d arc_pts[MAX_ARC_EFFECTS][2]
void model_clear_submodel_instances(int model_instance_num)
void model_interp_set_clip_plane(vec3d *pos=NULL, vec3d *normal=NULL)
bsp_collision_node * node_list
float secondary_glow_rad_factor
eye view_positions[MAX_EYES]
struct glow_point_bank glow_point_bank
float split_plane[MAX_SPLIT_PLANE]
void interp_render_arc(vec3d *v1, vec3d *v2, color *primary, color *secondary, float arc_width)
void model_clear_instance_info(submodel_instance_info *sii)
struct engine_wash_info * wash_info_pointer
struct submodel_instance_info submodel_instance_info
void model_setup_cloak(vec3d *shift, int full_cloak, int alpha)
void model_set_warp_globals(float scale_x=1.0f, float scale_y=1.0f, float scale_z=1.0f, int bitmap_id=-1, float alpha=-1.0f)
void model_set_instance_techroom(int model_num, int sub_model_num, float angle_1, float angle_2)
int model_create_instance(bool is_ship, int model_num)
flag_def_list model_render_flags[]
GLclampf GLclampf GLclampf alpha
struct model_special * prev
void find_submodel_instance_world_point(vec3d *outpnt, int model_instance_num, int submodel_num, const matrix *objorient, const vec3d *objpos)
float distortion_rad_factor
GLdouble GLdouble GLdouble GLdouble top
char filename[FILESPEC_LENGTH]
bool glow_bitmap_override
vec3d pnt[MAX_DOCK_SLOTS]
struct bsp_light bsp_light
SCP_vector< glow_point_bank_override >::iterator get_glowpoint_bank_override_by_name(const char *name)
matrix vmd_identity_matrix
float model_find_closest_point(vec3d *outpnt, int model_num, int submodel_num, matrix *orient, vec3d *pos, vec3d *eye_pos)
bool model_get_team_color(team_color *clr, const SCP_string &team, const SCP_string &secondaryteam, fix timestamp, int fadetime)
int modelstats_num_sortnorms
void model_set_detail_level(int n)
struct model_subsystem model_subsystem
void model_unload(int modelnum, int force=0)
int path_indexes[MAX_SHIP_BAY_PATHS]
void model_get_submodel_tree_list(SCP_vector< int > &submodel_vector, polymodel *pm, int mn)
void model_finish_cloak(int full_cloak)
void model_collide_parse_bsp(bsp_collision_tree *tree, void *model_ptr, int version)