FS2_Open
Open source remastering of the Freespace 2 engine
ship.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) Volition, Inc. 1999. All rights reserved.
3  *
4  * All source code herein is the property of Volition, Inc. You may not sell
5  * or otherwise commercially exploit the source or things you created based on the
6  * source.
7  *
8 */
9 
10 
11 
12 #ifndef _SHIP_H
13 #define _SHIP_H
14 
15 
16 
17 #include "ai/ai.h"
18 #include "fireball/fireballs.h"
19 #include "globalincs/globals.h" // for defintions of token lengths -- maybe move this elsewhere later (Goober5000 - moved to globals.h)
20 #include "globalincs/pstypes.h"
21 #include "graphics/2d.h" // for color def
22 #include "hud/hud.h"
23 #include "hud/hudparse.h"
24 #include "model/model.h"
25 #include "model/modelanim.h"
26 #include "network/multi_obj.h"
27 #include "palman/palman.h"
28 #include "radar/radarsetup.h"
29 #include "render/3d.h"
31 #include "weapon/shockwave.h"
32 #include "weapon/trails.h"
33 
34 #include <string>
35 
36 class object;
37 class WarpEffect;
38 
39 // Part of the player died system.
41 
42 // States for player death sequence, stuffed in Player_died_state.
43 #define PDS_NONE 1
44 #define PDS_DIED 2
45 #define PDS_EJECTED 3
46 
47 #define SHIP_GUARDIAN_THRESHOLD_DEFAULT 1 // Goober5000
48 
49 #define HULL_DAMAGE_THRESHOLD_PERCENT 0.25f // Apply damage to hull, not shield if shield < this
50 
51 // the #defines below are to avoid round-off errors
52 #define WEAPON_RESERVE_THRESHOLD 0.01f // energy threshold where ship is considered to have no weapon energy system
53 #define SUBSYS_MAX_HITS_THRESHOLD 0.01f // max_hits threshold where subsys is considered to take damage
54 
55 #define HP_SCALE 1.2 // 1.2 means die when 20% of hits remaining
56 #define MAX_SHIP_HITS 8 // hits to kill a ship
57 #define MAX_SHIP_DETAIL_LEVELS 5 // maximum detail levels that a ship can render at
58 #define MAX_REINFORCEMENTS 32
59 
60 
61 // defines for 'direction' parameter of ship_select_next_primary()
62 #define CYCLE_PRIMARY_NEXT 0
63 #define CYCLE_PRIMARY_PREV 1
64 
65 #define BANK_1 0
66 #define BANK_2 1
67 #define BANK_3 2
68 #define BANK_4 3
69 #define BANK_5 4
70 #define BANK_6 5
71 #define BANK_7 6
72 #define BANK_8 7
73 #define BANK_9 8
74 
75 #define TYPE_ATTACK_PROTECT 0
76 #define TYPE_REPAIR_REARM 1
77 
78 #define MAX_REINFORCEMENT_MESSAGES 5
79 
80 #define RF_IS_AVAILABLE (1<<0) // reinforcement is now available
81 
82 typedef struct {
83  char name[NAME_LENGTH]; // ship or wing name (ship and wing names don't collide)
84  int type; // what operations this reinforcement unit can perform
85  int uses; // number of times reinforcemnt unit can be used
86  int num_uses; // number of times this reinforcement was actually used
87  int arrival_delay; // how long after called does this reinforcement appear
88  int flags;
89  char no_messages[MAX_REINFORCEMENT_MESSAGES][NAME_LENGTH]; // list of messages to possibly send when calling for reinforcement not available
90  char yes_messages[MAX_REINFORCEMENT_MESSAGES][NAME_LENGTH]; // list of messages to acknowledge reinforcement on the way
92 
93 // ship weapon flags
94 #define SW_FLAG_BEAM_FREE (1<<0) // if this is a beam weapon, its free to fire
95 #define SW_FLAG_TURRET_LOCK (1<<1) // is this turret is free to fire or locked
96 #define SW_FLAG_TAGGED_ONLY (1<<2) // only fire if target is tagged
97 
98 typedef struct ship_weapon {
99  int num_primary_banks; // Number of primary banks (same as model)
100  int num_secondary_banks; // Number of secondary banks (same as model)
102 
103  int primary_bank_weapons[MAX_SHIP_PRIMARY_BANKS]; // Weapon_info[] index for the weapon in the bank
104  int secondary_bank_weapons[MAX_SHIP_SECONDARY_BANKS]; // Weapon_info[] index for the weapon in the bank
105 
106  int current_primary_bank; // currently selected primary bank
107  int current_secondary_bank; // currently selected secondary bank
109 
111  int previous_secondary_bank; // currently selected secondary bank
112 
113  int next_primary_fire_stamp[MAX_SHIP_PRIMARY_BANKS]; // next time this primary bank can fire
114  int last_primary_fire_stamp[MAX_SHIP_PRIMARY_BANKS]; // last time this primary bank fired (mostly used by SEXPs)
115  int next_secondary_fire_stamp[MAX_SHIP_SECONDARY_BANKS]; // next time this secondary bank can fire
116  int last_secondary_fire_stamp[MAX_SHIP_SECONDARY_BANKS]; // last time this secondary bank fired (mostly used by SEXPs)
118  int last_primary_fire_sound_stamp[MAX_SHIP_PRIMARY_BANKS]; // trailing end of the last time this primary bank was fired, for purposes of timing the pre-launch sound
119 
120  // ballistic primary support - by Goober5000
121  int primary_bank_ammo[MAX_SHIP_PRIMARY_BANKS]; // Number of missiles left in primary bank
122  int primary_bank_start_ammo[MAX_SHIP_PRIMARY_BANKS]; // Number of missiles starting in primary bank
123  int primary_bank_capacity[MAX_SHIP_PRIMARY_BANKS]; // Max number of projectiles in bank
124  int primary_next_slot[MAX_SHIP_PRIMARY_BANKS]; // Next slot to fire in the bank
125  int primary_bank_rearm_time[MAX_SHIP_PRIMARY_BANKS]; // timestamp which indicates when bank can get new projectile
126  // end ballistic primary support
127 
128  float primary_bank_fof_cooldown[MAX_SHIP_PRIMARY_BANKS]; // SUSHI: Current FOF cooldown level for the primary weapon
129 
130  // dynamic weapon linking - by RSAXVC
131  int primary_bank_slot_count[MAX_SHIP_PRIMARY_BANKS]; // Fire this many slots at a time
132  // end dynamic weapon linking
133 
134  int secondary_bank_ammo[MAX_SHIP_SECONDARY_BANKS]; // Number of missiles left in secondary bank
135  int secondary_bank_start_ammo[MAX_SHIP_SECONDARY_BANKS]; // Number of missiles starting in secondary bank
136  int secondary_bank_capacity[MAX_SHIP_SECONDARY_BANKS]; // Max number of missiles in bank
137  int secondary_next_slot[MAX_SHIP_SECONDARY_BANKS]; // Next slot to fire in the bank
138  int secondary_bank_rearm_time[MAX_SHIP_SECONDARY_BANKS]; // timestamp which indicates when bank can get new missile
139 
140  int tertiary_bank_ammo; // Number of shots left tertiary bank
141  int tertiary_bank_start_ammo; // Number of shots starting in tertiary bank
142  int tertiary_bank_capacity; // Max number of shots in bank
143  int tertiary_bank_rearm_time; // timestamp which indicates when bank can get new something (used for ammopod or boostpod)
144 
145  int last_fired_weapon_index; // Index of last fired secondary weapon. Used for remote detonates.
146  int last_fired_weapon_signature; // Signature of last fired weapon.
147  int detonate_weapon_time; // time at which last fired weapon can be detonated
148  int ai_class;
149 
150  int flags; // see SW_FLAG_* defines above
155 
158 
161 } ship_weapon;
162 
163 //**************************************************************
164 //WMC - Damage type handling code
165 
166 int damage_type_add(char *name);
167 
168 //**************************************************************
169 //WMC - Armor stuff
170 
171 // Nuke: some defines for difficulty scaling type
172 #define ADT_DIFF_SCALE_BAD_VAL -1 // error mode
173 #define ADT_DIFF_SCALE_FIRST 0
174 #define ADT_DIFF_SCALE_LAST 1
175 #define ADT_DIFF_SCALE_MANUAL 2 // this is the user defined mode where the modder has to handle difficulty scaling in their calculations
176 
177 // Nuke: +value: replacing constants
178 // these are stored as altArguments, positive values mean storage idxes and -1 means not used, anything below that is fair game
179 #define AT_CONSTANT_NOT_USED -1 // will probibly never get used
180 #define AT_CONSTANT_BAD_VAL -2 // this conveys table error to the user
181 #define AT_CONSTANT_BASE_DMG -3 // what the damage was at start of calculations
182 #define AT_CONSTANT_CURRENT_DMG -4 // what the damage currently is
183 #define AT_CONSTANT_DIFF_FACTOR -5 // difficulty factor (by default 0.2 (easy) to 1.0 (insane))
184 #define AT_CONSTANT_RANDOM -6 // number between 0 and 1 (redundant but saves a calculation)
185 #define AT_CONSTANT_PI -7 // because everyone likes pi
186 
188 {
189  friend class ArmorType;
190 private:
191  //Rather than make an extra struct,
192  //I just made two arrays
193  int DamageTypeIndex;
194  SCP_vector<int> Calculations;
195  SCP_vector<float> Arguments;
196  SCP_vector<int> altArguments; // Nuke: to facilitate optional importation of data in place of +value: tag -nuke
197  float shieldpierce_pct;
198 
199  // piercing effect data
200  float piercing_start_pct;
201  int piercing_type;
202  // Nuke: difficulty scale type
203  int difficulty_scale_type;
204 
205 public:
206  void clear();
207 };
208 
210 {
211 private:
212  char Name[NAME_LENGTH];
213 
214  SCP_vector<ArmorDamageType> DamageTypes;
215 public:
216  ArmorType(char* in_name);
217  int flags;
218 
219  //Get
220  char *GetNamePtr(){return Name;}
221  bool IsName(char *in_name){return (stricmp(in_name,Name)==0);}
222  float GetDamage(float damage_applied, int in_damage_type_idx, float diff_dmg_scale);
223  float GetShieldPiercePCT(int damage_type_idx);
224  int GetPiercingType(int damage_type_idx);
225  float GetPiercingLimit(int damage_type_idx);
226 
227  //Set
228  void ParseData();
229 };
230 
232 
233 //**************************************************************
234 //WMC - Damage type handling code
235 
236 typedef struct DamageTypeStruct
237 {
240 
242 
243 #define SAF_IGNORE_SS_ARMOR (1 << 0) // hull armor is applied regardless of the subsystem armor for hull damage
244 
245 #define SADTF_PIERCING_NONE 0 // no piercing effects, no beam tooling
246 #define SADTF_PIERCING_DEFAULT 1 // piercing effects, beam tooling
247 #define SADTF_PIERCING_RETAIL 2 // no piercing effects, beam tooling
248 
249 //SUSHI: Damage lightning types. SLT = Ship Lighting Type.
250 #define SLT_NONE 0
251 #define SLT_DEFAULT 1
252 
253 #define NUM_TURRET_ORDER_TYPES 3
254 extern char *Turret_target_order_names[NUM_TURRET_ORDER_TYPES]; //aiturret.cpp
255 
256 // Swifty: Cockpit displays
257 typedef struct cockpit_display {
258  int target;
259  int source;
262  int offset[2];
263  int size[2];
266 
268 
269 typedef struct cockpit_display_info {
274  int offset[2];
275  int size[2];
277 
278 // Goober5000
279 #define SSF_CARGO_REVEALED (1 << 0)
280 #define SSF_UNTARGETABLE (1 << 1)
281 #define SSF_NO_SS_TARGETING (1 << 2)
282 
283 //nuke
284 #define SSF_HAS_FIRED (1 << 3) //used by scripting to flag a turret as having been fired
285 #define SSF_FOV_REQUIRED (1 << 4)
286 #define SSF_FOV_EDGE_CHECK (1 << 5)
287 
288 #define SSF_NO_REPLACE (1 << 6) // prevents 'destroyed' submodel from being rendered if subsys is destroyed.
289 #define SSF_NO_LIVE_DEBRIS (1 << 7) // prevents subsystem from generating live debris
290 #define SSF_VANISHED (1 << 8) // allows subsystem to be made to disappear without a trace (for swapping it for a true model for example.
291 #define SSF_MISSILES_IGNORE_IF_DEAD (1 << 9) // forces homing missiles to target hull if subsystem is dead before missile hits it.
292 #define SSF_ROTATES (1 << 10)
293 #define SSF_DAMAGE_AS_HULL (1 << 11) // Applies armor damage instead of subsystem damge. - FUBAR
294 #define SSF_NO_AGGREGATE (1 << 12) // exclude this subsystem from the aggregate subsystem-info tracking - Goober5000
295 #define SSF_PLAY_SOUND_FOR_PLAYER ( 1 << 13) // If this subsystem is a turret on a player ship, play firing sounds - The E
296 #define SSF_NO_DISAPPEAR ( 1 << 14) // prevents submodel from disappearing when subsys destroyed
297 #define SSF_AUTOREPAIR_IF_DISABLED (1 << 15) // Allows the subsystem to repair itself even when disabled - MageKing17
298 #define SSF_NO_AUTOREPAIR_IF_DISABLED (1 << 16) // Inversion of the above; allow a specific subsystem not to repair itself after being disabled if the ship has the "repair disabled subsystems" flag - MageKing17
299 
300 
301 // Wanderer
302 #define SSSF_ALIVE (1 << 0) // subsystem has active alive sound
303 #define SSSF_DEAD (1 << 1) // subsystem has active dead sound
304 #define SSSF_ROTATE (1 << 2) // subsystem has active rotation sound
305 #define SSSF_TURRET_ROTATION (1 << 3) // rotation sound to be scaled like turrets do
306 
307 // structure definition for a linked list of subsystems for a ship. Each subsystem has a pointer
308 // to the static data for the subsystem. The obj_subsystem data is defined and read in the model
309 // code. Other dynamic data (such as current_hits) should remain in this structure.
311 {
312 public:
313  class ship_subsys *next, *prev; // Index of next and previous objects in list.
314  model_subsystem *system_info; // pointer to static data for this subsystem -- see model.h for definition
315 
316  int parent_objnum; // objnum of the parent ship
317 
318  char sub_name[NAME_LENGTH]; //WMC - Name that overrides name of original
319  float current_hits; // current number of hits this subsystem has left.
320  float max_hits;
321 
322  int flags; // Goober5000
323 
324  int subsys_guardian_threshold; // Goober5000
325  int armor_type_idx; // FUBAR
326 
327  // turret info
328  //Important -WMC
329  //With the new turret code, indexes run from 0 to MAX_SHIP_WEAPONS; a value of MAX_SHIP_PRIMARY_WEAPONS
330  //or higher, an index into the turret weapons is considered to be an index into the secondary weapons
331  //for much of the code. See turret_next_weap_fire_stamp.
332 
333  int turret_best_weapon; // best weapon for current target; index into prim/secondary banks
334  vec3d turret_last_fire_direction; // direction pointing last time this turret fired
335  int turret_next_enemy_check_stamp; // time at which to next look for a new enemy.
336  int turret_next_fire_stamp; // next time this turret can fire
337  int turret_enemy_objnum; // object index of ship this turret is firing upon
338  int turret_enemy_sig; // signature of object ship this turret is firing upon
339  int turret_next_fire_pos; // counter which tells us which gun position to fire from next
340  float turret_time_enemy_in_range; // Number of seconds enemy in view cone, accuracy improves over time.
341  int turret_targeting_order[NUM_TURRET_ORDER_TYPES]; //Order that turrets target different types of things.
344  ship_subsys *targeted_subsys; // subsystem this turret is attacking
346  int last_fired_weapon_info_index; // which weapon class was last fired
347 
348  int turret_pick_big_attack_point_timestamp; // Next time to pick an attack point for this turret
349  vec3d turret_big_attack_point; // local coordinate of point for this turret to attack on enemy
350 
353 
354  // swarm (rapid fire) info
357 
358  // awacs info
361 
363 
364  // Data the renderer needs for ship instance specific data, like
365  // angles and if it is blown off or not.
366  // There are 2 of these because turrets need one for the turret and one for the barrel.
367  // Things like radar dishes would only use one.
368  submodel_instance_info submodel_info_1; // Instance data for main turret or main object
369  submodel_instance_info submodel_info_2; // Instance data for turret guns, if there is one
370 
371  int disruption_timestamp; // time at which subsystem isn't disrupted
372 
373  int subsys_cargo_name; // cap ship cargo on subsys
374  fix time_subsys_cargo_revealed; // added by Goober5000
375 
376  int triggered_rotation_index; //the actual currently running animation and assosiated states
377 
381 
382  // still going through these...
384 
387 
388  // target priority setting for turrets
391 
392  //SUSHI: Fields for max_turret_aim_update_delay
393  //Only used when targeting small ships
397 
398  //scaler for setting adjusted turret rof
399  float rof_scaler;
400  float turn_rate;
401 
402  //Per-turret ownage settings - SUSHI
405 
407  : next(NULL), prev(NULL)
408  {}
409 
410  void clear();
411 };
412 
413 // structure for subsystems which tells us the total count of a particular type of subsystem (i.e.
414 // we might have 3 engines), and the relative strength of the subsystem. The #defines in model.h
415 // for SUBSYSTEM_xxx will be used as indices into this array.
416 typedef struct ship_subsys_info {
417  int type_count; // number of subsystems of type on this ship;
418  float aggregate_max_hits; // maximum number of hits for all subsystems of this type.
419  float aggregate_current_hits; // current count of hits for all subsystems of this type.
421 
422 // Karajorma - Used by the alter-ship-flag SEXP as an alternative to having lots of ship flag SEXPs
423 typedef struct ship_flag_name {
424  int flag; // the actual ship flag constant as given by the define below
425  char flag_name[TOKEN_LENGTH]; // the name written to the mission file for its corresponding parse_object flag
426  int flag_list; // is this flag in the 1st or 2nd ship flags list?
428 
429 #define MAX_SHIP_FLAG_NAMES 19
431 
432 // states for the flags variable within the ship structure
433 // low bits are for mission file savable flags..
434 // FRED needs these to be the low-order bits with no holes,
435 // because it indexes into an array, Hoffoss says.
436 #define SF_IGNORE_COUNT (1 << 0) // ignore this ship when counting ship types for goals
437 #define SF_REINFORCEMENT (1 << 1) // this ship is a reinforcement ship
438 #define SF_ESCORT (1 << 2) // this ship is an escort ship
439 #define SF_NO_ARRIVAL_MUSIC (1 << 3) // don't play arrival music when ship arrives
440 #define SF_NO_ARRIVAL_WARP (1 << 4) // no arrival warp in effect
441 #define SF_NO_DEPARTURE_WARP (1 << 5) // no departure warp in effect
442 //#define SF_LOCKED (1 << 6) // can't manipulate ship in loadout screens
443 
444 // high bits are for internal flags not saved to mission files
445 // Go from bit 31 down to bit 6
446 #define SF_KILL_BEFORE_MISSION (1 << 31)
447 #define SF_DYING (1 << 30)
448 #define SF_DISABLED (1 << 29)
449 #define SF_DEPART_WARP (1 << 28) // ship is departing via warp-out
450 #define SF_DEPART_DOCKBAY (1 << 27) // ship is departing via docking bay
451 #define SF_ARRIVING_STAGE_1 (1 << 26) // ship is arriving. In other words, doing warp in effect, stage 1
452 #define SF_ARRIVING_STAGE_2 (1 << 25) // ship is arriving. In other words, doing warp in effect, stage 2
453 #define SF_ARRIVING (SF_ARRIVING_STAGE_1|SF_ARRIVING_STAGE_2)
454 #define SF_ENGINES_ON (1 << 24) // engines sound should play if set
455 #define SF_DOCK_LEADER (1 << 23) // Goober5000 - this guy is in charge of everybody he's docked to
456 #define SF_CARGO_REVEALED (1 << 22) // ship's cargo is revealed to all friendly ships
457 #define SF_FROM_PLAYER_WING (1 << 21) // set for ships that are members of any player starting wing
458 #define SF_PRIMARY_LINKED (1 << 20) // ships primary weapons are linked together
459 #define SF_SECONDARY_DUAL_FIRE (1 << 19) // ship is firing two missiles from the current secondary bank
460 #define SF_WARP_BROKEN (1 << 18) // set when warp drive is not working, but is repairable
461 #define SF_WARP_NEVER (1 << 17) // set when ship can never warp
462 #define SF_TRIGGER_DOWN (1 << 16) // ship has its "trigger" held down
463 #define SF_AMMO_COUNT_RECORDED (1 << 15) // we've recorded the initial secondary weapon count (which is used to limit support ship rearming)
464 #define SF_HIDDEN_FROM_SENSORS (1 << 14) // ship doesn't show up on sensors, blinks in/out on radar
465 #define SF_SCANNABLE (1 << 13) // ship is "scannable". Play scan effect and report as "Scanned" or "not scanned".
466 #define SF_WARPED_SUPPORT (1 << 12) // set when this is a support ship which was warped in automatically
467 #define SF_EXPLODED (1 << 11) // ship has exploded (needed for kill messages)
468 #define SF_SHIP_HAS_SCREAMED (1 << 10) // ship has let out a death scream
469 #define SF_RED_ALERT_STORE_STATUS (1 << 9) // ship status should be stored/restored if red alert mission
470 #define SF_VAPORIZE (1<<8) // ship is vaporized by beam - alternative death sequence
471 #define SF_DEPARTURE_ORDERED (1<<7) // departure of this ship was ordered by player - Goober5000, similar to WF_DEPARTURE_ORDERED
472 
473 // MWA -- don't go below whatever bitfield is used for Fred above (currently 6)!!!!
474 
475 #define SF_DEPARTING (SF_DEPART_WARP | SF_DEPART_DOCKBAY) // ship is departing
476 #define SF_CANNOT_WARP (SF_WARP_BROKEN | SF_WARP_NEVER | SF_DISABLED) // ship cannot warp out
477 
478 
479 #define DEFAULT_SHIP_PRIMITIVE_SENSOR_RANGE 10000 // Goober5000
480 
481 
482 // Bits for ship.flags2
483 #define SF2_PRIMITIVE_SENSORS (1<<0) // Goober5000 - primitive sensor display
484 #define SF2_FRIENDLY_STEALTH_INVIS (1<<1) // Goober5000 - when stealth, don't appear on radar even if friendly
485 #define SF2_STEALTH (1<<2) // Goober5000 - is this particular ship stealth
486 #define SF2_DONT_COLLIDE_INVIS (1<<3) // Goober5000 - is this particular ship don't-collide-invisible
487 #define SF2_NO_SUBSPACE_DRIVE (1<<4) // Goober5000 - this ship has no subspace drive
488 #define SF2_NAVPOINT_CARRY (1<<5) // Kazan - This ship autopilots with the player
489 #define SF2_AFFECTED_BY_GRAVITY (1<<6) // Goober5000 - ship affected by gravity points
490 #define SF2_TOGGLE_SUBSYSTEM_SCANNING (1<<7) // Goober5000 - switch whether subsystems are scanned
491 #define SF2_NO_BUILTIN_MESSAGES (1<<8) // Karajorma - ship should not send built-in messages
492 #define SF2_PRIMARIES_LOCKED (1<<9) // Karajorma - This ship can't fire primary weapons
493 #define SF2_SECONDARIES_LOCKED (1<<10) // Karajorma - This ship can't fire secondary weapons
494 #define SF2_GLOWMAPS_DISABLED (1<<11) // taylor - to disable glow maps
495 #define SF2_NO_DEATH_SCREAM (1<<12) // Goober5000 - for WCS
496 #define SF2_ALWAYS_DEATH_SCREAM (1<<13) // Goober5000 - for WCS
497 #define SF2_NAVPOINT_NEEDSLINK (1<<14) // Kazan - This ship requires "linking" for autopilot (when player ship gets within specified distance SF2_NAVPOINT_NEEDSLINK is replaced by SF2_NAVPOINT_CARRY)
498 #define SF2_HIDE_SHIP_NAME (1<<15) // Karajorma - Hides the ships name (like the -wcsaga command line used to but for any selected ship)
499 #define SF2_AFTERBURNER_LOCKED (1<<16) // KeldorKatarn - This ship can't use its afterburners
500 #define SF2_SET_CLASS_DYNAMICALLY (1<<18) // Karajorma - This ship should have its class assigned rather than simply read from the mission file
501 #define SF2_LOCK_ALL_TURRETS_INITIALLY (1<<19) // Karajorma - Lock all turrets on this ship at mission start or on arrival
502 #define SF2_FORCE_SHIELDS_ON (1<<20)
503 #define SF2_NO_ETS (1<<21) // The E - This ship does not have an ETS
504 #define SF2_CLOAKED (1<<22) // The E - This ship will not be rendered
505 #define SF2_NO_THRUSTERS (1<<23) // The E - Thrusters on this ship are not rendered.
506 #define SF2_SHIP_LOCKED (1<<24) // Karajorma - Prevents the player from changing the ship class on loadout screen
507 #define SF2_WEAPONS_LOCKED (1<<25) // Karajorma - Prevents the player from changing the weapons on the ship on the loadout screen
508 #define SF2_SHIP_SELECTIVE_LINKING (1<<26) // RSAXVC - Allow pilot to pick firing configuration
509 #define SF2_SCRAMBLE_MESSAGES (1<<27) // Goober5000 - all messages sent from this ship appear scrambled
510 #define SF2_NO_SECONDARY_LOCKON (1<<28) // zookeeper - secondary lock-on disabled
511 #define SF2_NO_DISABLED_SELF_DESTRUCT (1<<29) // Goober5000 - ship will not self-destruct after 90 seconds if engines or weapons destroyed (c.f. ai_maybe_self_destruct)
512 
513 // If any of these bits in the ship->flags are set, ignore this ship when targeting
514 extern int TARGET_SHIP_IGNORE_FLAGS;
515 
516 #define MAX_DAMAGE_SLOTS 32
517 #define MAX_SHIP_ARCS 2 // How many "arcs" can be active at once... Must be less than MAX_ARC_EFFECTS in model.h.
518 #define NUM_SUB_EXPL_HANDLES 2 // How many different big ship sub explosion sounds can be played.
519 
520 #define MAX_SHIP_CONTRAILS 24
521 #define MAX_MAN_THRUSTERS 128
522 
523 typedef struct ship_spark {
524  vec3d pos; // position of spark in the submodel's RF
525  int submodel_num; // which submodel is making the spark
526  int end_time;
527 } ship_spark;
528 
529 #define AWACS_WARN_NONE (1 << 0)
530 #define AWACS_WARN_25 (1 << 1)
531 #define AWACS_WARN_75 (1 << 2)
532 
533 // NOTE: Can't be treated as a struct anymore, since it has STL data structures in its object tree!
534 class ship
535 {
536 public:
537  int objnum;
538  int ai_index; // Index in Ai_info of ai_info associated with this ship.
539  int ship_info_index; // Index in ship_info for this ship
540  int hotkey;
542  int score;
545 
546  // BEGIN PACK ubytes and chars
547  ubyte pre_death_explosion_happened; // If set, it means the 4 or 5 smaller explosions
549  char cargo1;
550 
551  // ship wing status info
552  char wing_status_wing_index; // wing index (0-4) in wingman status gauge
553  char wing_status_wing_pos; // wing position (0-5) in wingman status gauge
554 
555  // alternate indexes
556  int alt_type_index; // only used for display purposes (read : safe)
557  int callsign_index; // ditto
558 
559  // targeting laser info
560  char targeting_laser_bank; // -1 if not firing, index into polymodel gun points if it _is_ firing
561  int targeting_laser_objnum; // -1 if invalid, beam object # otherwise
562 
563  // corkscrew missile stuff
564  ubyte num_corkscrew_to_fire; // # of corkscrew missiles lef to fire
566  int next_corkscrew_fire; // next time to fire a corkscrew missile
567  // END PACK
568 
569  int final_death_time; // Time until big fireball starts
570  int death_time; // Time until big fireball starts
571  int end_death_time; // Time until big fireball starts
572  int really_final_death_time; // Time until ship breaks up and disappears
573  vec3d deathroll_rotvel; // Desired death rotational velocity
574 
577 
579 
581  int num_hits; // Note, this is the number of spark emitter positions!
583 
585  int special_exp_damage; // new special explosion/hitpoints system
592 
595 
598 
600 
601  int ship_guardian_threshold; // Goober5000 - now also determines whether ship is guardian'd
602 
603 
605 
606  int team; // Which team it's on, HOSTILE, FRIENDLY, UNKNOWN, NEUTRAL
607 
608  fix time_cargo_revealed; // time at which the cargo was revealed
609 
611  int arrival_distance; // how far away this ship should arrive
612  int arrival_anchor; // name of object this ship arrives near (or in front of)
613  int arrival_path_mask; // Goober5000 - possible restrictions on which bay paths to use
616 
617  int departure_location; // depart to hyperspace or someplace else (like docking bay)
618  int departure_anchor; // when docking bay -- index of ship to use
619  int departure_path_mask; // Goober5000 - possible restrictions on which bay paths to use
620  int departure_cue; // sexpression to eval when departing
621  int departure_delay; // time in seconds after sexp is true that we delay.
622 
623  int wingnum; // wing number this ship is in. -1 if in no wing, Wing array index otherwise
624  int orders_accepted; // set of orders this ship will accept from the player.
625 
626  // Subsystem fields. The subsys_list is a list of all subsystems (which might include multiple types
627  // of a particular subsystem, like engines). The subsys_info struct is information for particular
628  // types of subsystems. (i.e. the list might contain 3 engines. There will be one subsys_info entry
629  // describing the state of all engines combined) -- MWA 4/1/97
630  ship_subsys subsys_list; // linked list of subsystems for this ship.
631  ship_subsys *last_targeted_subobject[MAX_PLAYERS]; // Last subobject that has been targeted. NULL if none;(player specific)
632  ship_subsys_info subsys_info[SUBSYSTEM_MAX]; // info on particular generic types of subsystems
633 
634  float *shield_integrity; // Integrity at each triangle in shield mesh.
635 
636  // ETS fields
637  int shield_recharge_index; // index into array holding the shield recharge rate
638  int weapon_recharge_index; // index into array holding the weapon recharge rate
639  int engine_recharge_index; // index into array holding the engine recharge rate
640  float weapon_energy; // Number of EUs in energy reserves
641  float current_max_speed; // Max ship speed (based on energy diverted to engines)
642  int next_manage_ets; // timestamp for when ai can next modify ets ( -1 means never )
643 
644  uint flags; // flag variable to contain ship state (see SF_ #defines)
645  uint flags2; // another flag variable (see SF2_ #defines)
646  int reinforcement_index; // index into reinforcement struct or -1
647 
648  float afterburner_fuel; // amount of afterburner fuel remaining (capacity is stored
649  // as afterburner_fuel_capacity in ship_info).
650 
651  int cmeasure_count; // Number of charges of countermeasures this ship can hold.
652  int current_cmeasure; // Currently selected countermeasure.
653 
654  int cmeasure_fire_stamp; // Time at which can fire countermeasure.
655 
656  float target_shields_delta; // Target for shield recharge system.
657  float target_weapon_energy_delta; // Target for recharge system.
659 
660  int shield_hits; // Number of hits on shield this frame.
661 
663 
667 
668  int num_swarm_missiles_to_fire; // number of swarm missiles that need to be launched
669  int next_swarm_fire; // timestamp of next swarm missile to fire
670  int next_swarm_path; // next path number for swarm missile to take
671  int num_turret_swarm_info; // number of turrets in process of launching swarm
672  int swarm_missile_bank; // The missilebank the swarm was originally launched from
673 
674  int group; // group ship is in, or -1 if none. Fred thing
675  int death_roll_snd; // id of death roll sound, may need to be stopped early
676  int ship_list_index; // index of ship in Ship_objs[] array
677 
678  int thruster_bitmap; // What frame the current thruster bitmap is at for this ship
679  float thruster_frame; // Used to keep track of which frame the animation should be on.
680 
681  int thruster_glow_bitmap; // What frame the current thruster engine glow bitmap is at for this ship
682  float thruster_glow_frame; // Used to keep track of which frame the engine glow animation should be on.
683  float thruster_glow_noise; // Noise for current frame
684 
687  int thruster_distortion_bitmap; // Valathil
688 
689  int next_engine_stutter; // timestamp to time the engine stuttering when a ship dies
690 
691  fix base_texture_anim_frametime; // Goober5000 - zero mark for texture animations
692 
693  float total_damage_received; // total damage received (for scoring purposes)
694  float damage_ship[MAX_DAMAGE_SLOTS]; // damage applied from each player
695  int damage_ship_id[MAX_DAMAGE_SLOTS]; // signature of the damager (corresponds to each entry in damage_ship)
696  int persona_index; // which persona is this guy.
697 
698  int subsys_disrupted_flags; // bitflags used to check if SUBYSTEM_* is disrupted or not
699  int subsys_disrupted_check_timestamp; // timer to control how oftern flags are set/cleared in subsys_disrupted_flags
700 
701  uint create_time; // time ship was created, set by gettime()
702 
703  // keep multiplayer specific stuff below this point
704  int ts_index; // index into the team select and Wss_slots array (or -1 if not in one of those arrays)
705 
706  int large_ship_blowup_index; // -1 if not a large ship exploding, else this is an index used by the shipfx large ship exploding code.
708 
709 
710  // Stuff for showing electrical arcs on damaged ships
711  vec3d arc_pts[MAX_SHIP_ARCS][2]; // The endpoints of each arc
712  int arc_timestamp[MAX_SHIP_ARCS]; // When this times out, the spark goes away. -1 is not used
713  ubyte arc_type[MAX_SHIP_ARCS]; // see MARC_TYPE_* defines in model.h
714  int arc_next_time; // When the next arc will be created.
715 
716  // emp missile stuff
717  float emp_intensity; // <= 0.0f if no emp effect present
718  float emp_decr; // how much to decrement EMP effect per second for this ship
719 
720  // contrail stuff
722 
723  // tag stuff
724  float tag_total; // total tag time
725  float tag_left; // total tag remaining
727  float level2_tag_total; // total tag time
728  float level2_tag_left; // total tag remaining
729 
730  // old-style object update stuff
731  np_update np_updates[MAX_PLAYERS]; // for both server and client
732 
733  // lightning timestamp
735 
736  // AWACS warning flag
738 
739  // Special warp objnum (warping at knossos)
742 
743  ship_subsys fighter_beam_turret_data; //a fake subsystem that pretends to be a turret for fighter beams
746 
747  // Goober5000 - range of primitive sensors
749 
750  // Goober5000 - revised nameplate implementation
752 
753  // Goober5000 - index into pm->view_positions[]
754  // apparently, early in FS1 development, there was a field called current_eye_index
755  // that had this same functionality
757 
758  trail *ABtrail_ptr[MAX_SHIP_CONTRAILS]; //after burner trails -Bobboau
760  int ab_count;
761 
762  // glow points
763  std::deque<bool> glow_point_bank_active;
764 
765  //Animated Shader effects
770 
771  int last_fired_point[MAX_SHIP_PRIMARY_BANKS]; //for fire point cylceing
772  ship_subsys *last_fired_turret; // which turret has fired last
773 
774  // fighter bay door stuff, parent side
775  int bay_doors_anim_done_time; // ammount of time to transition from one animation state to another
776  EModelAnimationPosition bay_doors_status; // anim status of the bay doors (closed/not-animating, opening, open/not-animating)
777  int bay_doors_wanting_open; // how many ships want/need the bay door open
778 
779  // figther bay door stuff, client side
780  ubyte bay_doors_launched_from; // the bay door that I launched from
781  bool bay_doors_need_open; // keep track of whether I need the door open or not
782  int bay_doors_parent_shipnum; // our parent ship, what we are entering/leaving
783 
784  float secondary_point_reload_pct[MAX_SHIP_SECONDARY_BANKS][MAX_SLOTS]; //after fireing a secondary it takes some time for that secondary weapon to reload, this is how far along in that proces it is (from 0 to 1)
787 
788  int thrusters_start[MAX_MAN_THRUSTERS]; //Timestamp of when thrusters started
789  int thrusters_sounds[MAX_MAN_THRUSTERS]; //Sound index for thrusters
790 
792 
794 
795  int ammo_low_complaint_count; // number of times this ship has complained about low ammo
800  ushort debris_net_sig; // net signiture of the first piece of debris this ship has
801 
803 
805 
806  fix radar_visible_since; // The first time this ship was visible on the radar. Gets reset when ship is not visible anymore
807  fix radar_last_contact; // The last time this ship appeared on the radar. When it is currently visible this has the value if Missiontime
808 
809  RadarVisibility radar_last_status; // Last radar status
810  RadarVisibility radar_current_status; // Current radar status
811 
813  SCP_string secondary_team_name; //If the change-team-color sexp is used, these fields control the fading behaviour
816 
817  float autoaim_fov;
818 
819  // reset to a completely blank ship
820  void clear();
821 };
822 
825 
826  int obj_type;
830 
831  unsigned int obj_flags;
836 };
837 
839 
843 
844 // structure and array def for ships that have exited the game. Keeps track of certain useful
845 // information.
846 #define SEF_DESTROYED (1<<0)
847 #define SEF_DEPARTED (1<<1)
848 #define SEF_CARGO_KNOWN (1<<2)
849 #define SEF_PLAYER_DELETED (1<<3) // ship deleted by a player in ship select
850 #define SEF_BEEN_TAGGED (1<<4)
851 #define SEF_RED_ALERT_CARRY (1<<5)
852 
853 typedef struct exited_ship {
857  int team;
858  int flags;
862  char cargo1;
863  float damage_ship[MAX_DAMAGE_SLOTS]; // A copy of the arrays from the ship so that we can figure out what damaged it
865 } exited_ship;
866 
868 
869 // a couple of functions to get at the data
870 extern void ship_add_exited_ship( ship *shipp, int reason );
871 extern int ship_find_exited_ship_by_name( char *name );
872 extern int ship_find_exited_ship_by_signature( int signature);
873 
874 #define SIF_NO_COLLIDE (1 << 0)
875 #define SIF_PLAYER_SHIP (1 << 1)
876 #define SIF_DEFAULT_PLAYER_SHIP (1 << 2)
877 #define SIF_PATH_FIXUP (1 << 3) // when set, path verts have been set for this ship's model
878 #define SIF_SUPPORT (1 << 4) // this ship can perform repair/rearm functions
879 #define SIF_AFTERBURNER (1 << 5) // this ship has afterburners
880 #define SIF_BALLISTIC_PRIMARIES (1 << 6) // this ship can equip ballistic primaries - Goober5000
881 
882 // If you add a new ship type, then please add the appropriate type in the ship_count
883 // structure later in this file!!! and let MWA know!!
884 #define SIF_CARGO (1 << 7) // is this ship a cargo type ship -- used for docking purposes
885 #define SIF_FIGHTER (1 << 8) // this ship is a fighter
886 #define SIF_BOMBER (1 << 9) // this ship is a bomber
887 #define SIF_CRUISER (1 << 10) // this ship is a cruiser
888 #define SIF_FREIGHTER (1 << 11) // this ship is a freighter
889 #define SIF_CAPITAL (1 << 12) // this ship is a capital/installation ship
890 #define SIF_TRANSPORT (1 << 13) // this ship is a transport
891 #define SIF_NAVBUOY (1 << 14) // AL 11-24-97: this is a navbuoy
892 #define SIF_SENTRYGUN (1 << 15) // AL 11-24-97: this is a navbuoy with turrets
893 #define SIF_ESCAPEPOD (1 << 16) // AL 12-09-97: escape pods that fire from big ships
894 #define SIF_NO_SHIP_TYPE (1 << 17) // made distinct to help trap errors
895 
896 #define SIF_SHIP_COPY (1 << 18) // this ship is a copy of another ship in the table -- meaningful for scoring and possible other things
897 #define SIF_IN_TECH_DATABASE (1 << 19) // is ship type to be listed in the tech database?
898 #define SIF_IN_TECH_DATABASE_M (1 << 20) // is ship type to be listed in the tech database for multiplayer?
899 
900 #define SIF_STEALTH (1 << 21) // the ship has stealth capabilities
901 #define SIF_SUPERCAP (1 << 22) // the ship is a supercap
902 #define SIF_DRYDOCK (1 << 23) // the ship is a drydock
903 #define SIF_SHIP_CLASS_DONT_COLLIDE_INVIS (1 << 24) // Don't collide with this ship's invisible polygons
904 
905 #define SIF_BIG_DAMAGE (1 << 25) // this ship is classified as a big damage ship
906 #define SIF_HAS_AWACS (1 << 26) // ship has an awacs subsystem
907 
908 #define SIF_CORVETTE (1 << 27) // corvette class (currently this only means anything for briefing icons)
909 #define SIF_GAS_MINER (1 << 28) // also just for briefing icons
910 #define SIF_AWACS (1 << 29) // ditto
911 
912 #define SIF_KNOSSOS_DEVICE (1 << 30) // this is the knossos device
913 
914 #define SIF_NO_FRED (1 << 31) // not available in fred
915 
916 
917 // flags2 list.
918 #define SIF2_DEFAULT_IN_TECH_DATABASE (1 << 0) // default in tech database - Goober5000
919 #define SIF2_DEFAULT_IN_TECH_DATABASE_M (1 << 1) // ditto - Goober5000
920 #define SIF2_FLASH (1 << 2) // makes a flash when it explodes
921 #define SIF2_SHOW_SHIP_MODEL (1 << 3) // Show ship model even in first person view
922 #define SIF2_SURFACE_SHIELDS (1 << 4) // _argv[-1], 16 Jan 2005: Enable surface shields for this ship.
923 #define SIF2_GENERATE_HUD_ICON (1 << 5) // Enable generation of a HUD shield icon
924 #define SIF2_DISABLE_WEAPON_DAMAGE_SCALING (1 << 6) // WMC - Disable weapon scaling based on flags
925 #define SIF2_GUN_CONVERGENCE (1 << 7) // WMC - Gun convergence based on model weapon norms.
926 #define SIF2_NO_THRUSTER_GEO_NOISE (1 << 8) // Echelon9 - No thruster geometry noise.
927 #define SIF2_INTRINSIC_NO_SHIELDS (1 << 9) // Chief - disables shields for this ship even without No Shields in mission.
928 #define SIF2_NO_PRIMARY_LINKING (1 << 10) // Chief - slated for 3.7 originally, but this looks pretty simple to implement.
929 #define SIF2_NO_PAIN_FLASH (1 << 11) // The E - disable red pain flash
930 #define SIF2_ALLOW_LANDINGS (1 << 12) // SUSHI: Automatically set if any subsystems allow landings (as a shortcut)
931 #define SIF2_NO_ETS (1 << 13) // The E - No ETS on this ship class
932 #define SIF2_NO_LIGHTING (1 << 14) // Valathil - No lighting for this ship
933 #define SIF2_DYN_PRIMARY_LINKING (1 << 15) // RSAXVC - Dynamically generate weapon linking options
934 #define SIF2_AUTO_SPREAD_SHIELDS (1 << 16) // zookeeper - auto spread shields
935 #define SIF2_DRAW_WEAPON_MODELS (1 << 17) // the ship draws weapon models of any sort (used to be a boolean)
936 #define SIF2_MODEL_POINT_SHIELDS (1 << 18) // zookeeper - uses model-defined shield points instead of quadrants
937 #define SIF2_SUBSYS_REPAIR_WHEN_DISABLED (1 << 19) // MageKing17 - Subsystems auto-repair themselves even when disabled.
938 
939 #define SIF_DEFAULT_VALUE 0
940 #define SIF2_DEFAULT_VALUE 0
941 
942 #define SIF_ALL_SHIP_TYPES (SIF_CARGO | SIF_FIGHTER | SIF_BOMBER | SIF_CRUISER | SIF_FREIGHTER | SIF_CAPITAL | SIF_TRANSPORT | SIF_SUPPORT | SIF_NO_SHIP_TYPE | SIF_NAVBUOY | SIF_SENTRYGUN | SIF_ESCAPEPOD | SIF_SUPERCAP | SIF_CORVETTE | SIF_GAS_MINER | SIF_AWACS | SIF_KNOSSOS_DEVICE)
943 #define SIF_SMALL_SHIP (SIF_FIGHTER | SIF_BOMBER | SIF_SUPPORT | SIF_ESCAPEPOD )
944 #define SIF_BIG_SHIP (SIF_CRUISER | SIF_FREIGHTER | SIF_TRANSPORT | SIF_CORVETTE | SIF_GAS_MINER | SIF_AWACS)
945 #define SIF_HUGE_SHIP (SIF_CAPITAL | SIF_SUPERCAP | SIF_DRYDOCK | SIF_KNOSSOS_DEVICE)
946 #define SIF_NOT_FLYABLE (SIF_CARGO | SIF_NAVBUOY | SIF_SENTRYGUN) // AL 11-24-97: this useful to know for targeting reasons
947 #define SIF_HARMLESS (SIF_CARGO | SIF_NAVBUOY | SIF_ESCAPEPOD) // AL 12-3-97: ships that are not a threat
948 // for ships of this type, we make beam weapons miss a little bit otherwise they'd be way too powerful
949 #define SIF_BEAM_JITTER (SIF_CARGO | SIF_FIGHTER | SIF_BOMBER | SIF_FREIGHTER | SIF_TRANSPORT | SIF_SENTRYGUN | SIF_NAVBUOY | SIF_ESCAPEPOD)
950 // these ships avoid shockwaves
951 // (the weird thing is that freighters and transports used to be explicitly allowed in one part of the code but then explicitly disallowed in another)
952 #define SIF_AVOID_SHOCKWAVE SIF_SMALL_SHIP
953 
954 // masks for preventing only non flag entry SIF flags from being cleared
955 #define SIF_MASK SIF_AFTERBURNER
956 #define SIF2_MASK SIF2_DRAW_WEAPON_MODELS
957 
958 #define REGULAR_WEAPON (1<<0)
959 #define DOGFIGHT_WEAPON (1<<1)
960 
961 #define AIM_FLAG_AUTOAIM (1 << 0) // has autoaim
962 #define AIM_FLAG_AUTO_CONVERGENCE (1 << 1) // has automatic convergence
963 #define AIM_FLAG_STD_CONVERGENCE (1 << 2) // has standard - ie. non-automatic - convergence
964 #define AIM_FLAG_AUTOAIM_CONVERGENCE (1 << 3) // has autoaim with convergence
965 #define AIM_FLAG_CONVERGENCE_OFFSET (1 << 4) // marks that convergence has offset value
966 
967 typedef struct thruster_particles {
969  float min_rad;
970  float max_rad;
971  int n_high;
972  int n_low;
973  float variance;
975 
976 typedef struct particle_effect {
977  int n_low;
978  int n_high;
979  float min_rad;
980  float max_rad;
981  float min_life;
982  float max_life;
983  float min_vel;
984  float max_vel;
985  float variance;
987 
988 #define STI_MSG_COUNTS_FOR_ALONE (1<<0)
989 #define STI_MSG_PRAISE_DESTRUCTION (1<<1)
990 
991 #define STI_HUD_HOTKEY_ON_LIST (1<<0)
992 #define STI_HUD_TARGET_AS_THREAT (1<<1)
993 #define STI_HUD_SHOW_ATTACK_DIRECTION (1<<2)
994 #define STI_HUD_NO_CLASS_DISPLAY (1<<3)
995 
996 #define STI_SHIP_SCANNABLE (1<<0)
997 #define STI_SHIP_WARP_PUSHES (1<<1)
998 #define STI_SHIP_WARP_PUSHABLE (1<<2)
999 #define STI_TURRET_TGT_SHIP_TGT (1<<3)
1000 
1001 #define STI_WEAP_BEAMS_EASILY_HIT (1<<0)
1002 #define STI_WEAP_NO_HUGE_IMPACT_EFF (1<<1)
1003 
1004 #define STI_AI_ACCEPT_PLAYER_ORDERS (1<<0)
1005 #define STI_AI_AUTO_ATTACKS (1<<1)
1006 #define STI_AI_ATTEMPT_BROADSIDE (1<<2)
1007 #define STI_AI_GUARDS_ATTACK (1<<3)
1008 #define STI_AI_TURRETS_ATTACK (1<<4)
1009 #define STI_AI_CAN_FORM_WING (1<<5)
1010 #define STI_AI_PROTECTED_ON_CRIPPLE (1<<6)
1011 
1012 typedef struct ship_type_info {
1014 
1015  //Messaging?
1017 
1018  //HUD
1020 
1021  //Ship
1022  int ship_bools; //For lack of better term
1024 
1025  //Weapons
1029 
1030  //Fog
1033 
1034  //AI
1042 
1043  //Explosions
1045 
1046  //Resources
1048 
1049  //Regen values - need to be converted after all types have loaded
1052 
1054  : message_bools( 0 ), hud_bools( 0 ), ship_bools( 0 ), debris_max_speed( 0.f ),
1055  weapon_bools( 0 ), ff_multiplier( 0.f ), emp_multiplier( 0.f ),
1056  fog_start_dist( 0.f ), fog_complete_dist( 0.f ),
1057  ai_valid_goals( 0 ), ai_player_orders( 0 ), ai_bools( 0 ), ai_active_dock( 0 ), ai_passive_dock( 0 ),
1058  vaporize_chance( 0.f )
1059 
1060  {
1061  name[ 0 ] = '\0';
1062  }
1063 } ship_type_info;
1064 
1066 
1068  int bmap_id;
1070 
1071  man_thruster_renderer(int id){bmap_id = id;}
1072 };
1073 
1075 
1076 #define MT_BANK_RIGHT (1<<0)
1077 #define MT_BANK_LEFT (1<<1)
1078 #define MT_PITCH_UP (1<<2)
1079 #define MT_PITCH_DOWN (1<<3)
1080 #define MT_ROLL_RIGHT (1<<4)
1081 #define MT_ROLL_LEFT (1<<5)
1082 #define MT_SLIDE_RIGHT (1<<6)
1083 #define MT_SLIDE_LEFT (1<<7)
1084 #define MT_SLIDE_UP (1<<8)
1085 #define MT_SLIDE_DOWN (1<<9)
1086 #define MT_FORWARD (1<<10)
1087 #define MT_REVERSE (1<<11)
1088 
1089 typedef struct man_thruster {
1091 
1095 
1096  int tex_id;
1098  int tex_fps;
1099  float length;
1100  float radius;
1101 
1103 } man_thruster;
1104 
1105 //Warp type defines
1106 #define WT_DEFAULT 0
1107 #define WT_KNOSSOS 1
1108 #define WT_DEFAULT_THEN_KNOSSOS 2
1109 #define WT_IN_PLACE_ANIM 3
1110 #define WT_SWEEPER 4
1111 #define WT_HYPERSPACE 5
1112 
1113 // Holds variables for collision physics (Gets its own struct purely for clarity purposes)
1114 // Most of this only really applies properly to small ships
1115 typedef struct ship_collision_physics {
1116  // Collision physics definitions: how a ship responds to collisions
1117  float both_small_bounce; // Bounce factor when both ships are small
1118  // This currently only comes into play if one ship is the player...
1119  // blame retail for that.
1120  float bounce; // Bounce factor for all other cases
1121  float friction; // Controls lateral velocity lost when colliding with a large ship
1122  float rotation_factor; // Affects the rotational energy of collisions... TBH not sure how.
1123 
1124  // Speed & angle constraints for a smooth landing
1125  // Note that all angles are stored as a dotproduct between normalized vectors instead. This saves us from having
1126  // to do a lot of dot product calculations later.
1134 
1135  // Speed & angle constraints for a "rough" landing (one with normal collision consequences, but where
1136  // the ship is still reoriented towards its resting orientation)
1144 
1145  // Landing response parameters
1146  float reorient_mult; // How quickly the ship will reorient towards it's resting position
1147  float landing_rest_angle; // The vertical angle where the ship's orientation comes to rest
1148  int landing_sound_idx; //Sound to play on successful landing collisions
1149 
1151 
1152 typedef struct path_metadata {
1156 } path_metadata;
1157 
1158 // The real FreeSpace ship_info struct.
1159 // NOTE: Can't be treated as a struct anymore, since it has STL data structures in its object tree!
1161 {
1162 public:
1163  char name[NAME_LENGTH]; // name for the ship
1164  char alt_name[NAME_LENGTH]; // display another name for the ship
1165  char short_name[NAME_LENGTH]; // short name, for use in the editor?
1166  int species; // which species this craft belongs to
1167  int class_type; //For type table
1168 
1169  char *type_str; // type string used by tooltips
1170  char *maneuverability_str; // string used by tooltips
1171  char *armor_str; // string used by tooltips
1172  char *manufacturer_str; // string used by tooltips
1173  char *desc; // string used by tooltips
1174  char *tech_desc; // string used by tech database
1175  char tech_title[NAME_LENGTH]; // ship's name (in tech database)
1176 
1177  char *ship_length; // string used by multiplayer ship desc
1178  char *gun_mounts; // string used by multiplayer ship desc
1179  char *missile_banks; // string used by multiplayer ship desc
1180 
1181  char cockpit_pof_file[MAX_FILENAME_LEN]; // POF file for cockpit view
1183  char pof_file[MAX_FILENAME_LEN]; // POF file to load/associate with ship
1184  char pof_file_hud[MAX_FILENAME_LEN]; // POF file to load for the HUD target box
1185  int num_detail_levels; // number of detail levels for this ship
1186  int detail_distance[MAX_SHIP_DETAIL_LEVELS]; // distance to change detail levels at
1187  int collision_lod; // check for collisions using a LOD
1188  int cockpit_model_num; // cockpit model
1189  int model_num; // ship model
1190  int model_num_hud; // model to use when rendering to the HUD (eg, mini supercap)
1191  int hud_target_lod; // LOD to use for rendering to the HUD targetbox (if not already using special HUD model)
1192  float density; // density of the ship in g/cm^3 (water = 1)
1193  float damp; // drag
1194  float rotdamp; // rotational drag
1196  vec3d max_vel; // max velocity of the ship in the linear directions -- read from ships.tbl
1197  vec3d max_rotvel; // maximum rotational velocity
1198  vec3d rotation_time; // time to rotate in x/y/z dimension traveling at max rotvel
1199  float srotation_time; // scalar, computed at runtime as (rotation_time.x + rotation_time.y)/2
1200  float max_rear_vel; // max speed ship can go backwards.
1205 
1211  int warpin_time; //in ms
1214 
1219  int warpout_engage_time; //in ms
1221  int warpout_time; //in ms
1224 
1226 
1227  int flags; // See SIF_xxxx - changed to uint by Goober5000, changed back by Zacam
1228  int flags2; // See SIF2_xxxx - added by Goober5000, changed by Zacam
1229  int ai_class; // Index into Ai_classes[]. Defined in ai.tbl
1231 
1232  //Collision
1235 
1236  // ship explosion info
1238  int explosion_propagates; // If true, then the explosion propagates
1239  float big_exp_visual_rad; //SUSHI: The visual size of the main explosion
1240  float prop_exp_rad_mult; // propagating explosions radius multiplier
1246  int shockwave_count; // the # of total shockwaves
1249 
1255 
1256  //Debris stuff
1268 
1269  // subsystem information
1270  int n_subsystems; // this number comes from ships.tbl
1271  model_subsystem *subsystems; // see model.h for structure definition
1272 
1273  // Energy Transfer System fields
1274  float power_output; // power output of ships reactor (EU/s)
1275  float max_overclocked_speed; // max speed when 100% power output sent to engines
1276  float max_weapon_reserve; // maximum energy that can be stored for primary weapon usage
1277  float max_shield_regen_per_second; // Goober5000 - max percent/100 of shield energy regenerated per second
1278  float max_weapon_regen_per_second; // Goober5000 - max percent/100 of weapon energy regenerated per second
1279 
1280  // Afterburner fields
1281  vec3d afterburner_max_vel; // max velocity of the ship in the linear directions when afterburners are engaged -- read from ships.tbl
1282  float afterburner_forward_accel; // forward acceleration with afterburner engaged
1283  float afterburner_fuel_capacity; // maximum afterburner fuel that can be stored
1284  float afterburner_burn_rate; // rate in fuel/second that afterburner consumes fuel
1285  float afterburner_recover_rate; // rate in fuel/second that afterburner recovers fuel
1286  //SparK: reverse afterburner
1289 
1290  int cmeasure_type; // Type of countermeasures this ship carries
1291  int cmeasure_max; // Number of charges of countermeasures this ship can hold.
1292 
1293  int num_primary_banks; // Actual number of primary banks (property of model)
1294  int primary_bank_weapons[MAX_SHIP_PRIMARY_BANKS]; // Weapon_info[] index for the weapon in the bank
1295  // Goober5000's ballistic conversion
1296  int primary_bank_ammo_capacity[MAX_SHIP_PRIMARY_BANKS]; // Capacity of primary ballistic bank
1297 
1298  int num_secondary_banks; // Actual number of secondary banks (property of model)
1299  int secondary_bank_weapons[MAX_SHIP_SECONDARY_BANKS]; // Weapon_info[] index for the weapon in the bank
1300  int secondary_bank_ammo_capacity[MAX_SHIP_SECONDARY_BANKS]; // Capacity of bank (not number of missiles)
1301 
1305 
1306  // Recoil modifier for the ship
1308 
1309  float max_hull_strength; // Max hull strength of this class of ship.
1311  float auto_shield_spread; // Thickness of the shield
1312  bool auto_shield_spread_bypass; // Whether weapons fired up close can bypass shields
1313  int auto_shield_spread_from_lod; // Which LOD to project the shield from
1314  float auto_shield_spread_min_span; // Minimum distance weapons must travel until allowed to collide with the shield
1315 
1316  int shield_point_augment_ctrls[4]; // Re-mapping of shield augmentation controls for model point shields
1317 
1319 
1320  float hull_repair_rate; //How much of the hull is repaired every second
1321  float subsys_repair_rate; //How fast
1322 
1326 
1327  vec3d closeup_pos; // position for camera when using ship in closeup view (eg briefing and hud target monitor)
1328  float closeup_zoom; // zoom when using ship in closeup view (eg briefing and hud target monitor)
1329 
1330  int allowed_weapons[MAX_WEAPON_TYPES]; // array which specifies which weapons can be loaded out by the
1331  // player during weapons loadout.
1332 
1333  // Goober5000 - fix for restricted banks mod
1336 
1337  ubyte shield_icon_index; // index to locate ship-specific animation frames for the shield on HUD
1338  char icon_filename[MAX_FILENAME_LEN]; // filename for icon that is displayed in ship selection
1339  angles model_icon_angles; // angle from which the model icon should be rendered (if not 0,0,0)
1340  char anim_filename[MAX_FILENAME_LEN]; // filename for animation that plays in ship selection
1341  char overhead_filename[MAX_FILENAME_LEN]; // filename for animation that plays weapons loadout
1343 
1344  int bii_index_ship; // if this ship has a briefing icon that overrides the normal icon set
1348 
1349  int score; // default score for this ship
1350 
1351  int scan_time; // time to scan this ship (in ms)
1352 
1353  // contrail info
1356 
1357  // rgb non-dimming pixels for this ship type
1360 
1361  // rgb shield color
1363 
1364  // HW2-style team coloring
1367 
1368  // optional afterburner trail values
1374 
1375  // thruster particles
1378 
1379  // Bobboau's extra thruster stuff
1385 
1393 
1395 
1398 
1399  // Goober5000
1401 
1402 
1405 
1407  float glide_cap; //Backslash - for 'newtonian'-style gliding, the cap on velocity
1408  bool glide_dynamic_cap; //SUSHI: Whether or not we are using a dynamic glide cap
1409  float glide_accel_mult; //SUSHI: acceleration multiplier for glide mode
1410  bool use_newtonian_damp; //SUSHI: Whether or not to use newtonian dampening for this ship
1412 
1414 
1417 
1418  int engine_snd; // handle to engine sound for ship (-1 if no engine sound)
1419  float min_engine_vol; // minimum volume modifier for engine sound when ship is stationary
1420  int glide_start_snd; // handle to sound to play at the beginning of a glide maneuver (default is 0 for regular throttle down sound)
1421  int glide_end_snd; // handle to sound to play at the end of a glide maneuver (default is 0 for regular throttle up sound)
1422 
1423  SCP_map<GameSoundsIndex, int> ship_sounds; // specifies ship-specific sound indexes
1424 
1427 
1432 
1434 
1439 
1441 
1444 
1446 
1450 
1452 
1454 
1456 
1457  ship_info();
1458  ~ship_info();
1459  void clone(const ship_info& other);
1460 
1461  ship_info(ship_info&& other) NOEXCEPT;
1462 
1463  ship_info &operator=(ship_info&& other) NOEXCEPT;
1464 
1465  void free_strings();
1466 
1467 private:
1468  void move(ship_info&& other);
1469 
1470  // Private and unimplemented so nobody tries to use them by accident.
1471  ship_info(const ship_info& other);
1472  const ship_info &operator=(const ship_info& other);
1473 };
1474 
1475 extern int Num_wings;
1476 extern ship Ships[MAX_SHIPS];
1477 extern ship *Player_ship;
1478 extern int *Player_cockpit_textures;
1479 
1480 // Data structure to track the active missiles
1481 typedef struct ship_obj {
1482  ship_obj *next, *prev;
1484 } ship_obj;
1485 extern ship_obj Ship_obj_list;
1486 
1487 typedef struct engine_wash_info
1488 {
1489  char name[NAME_LENGTH];
1490  float angle; // half angle of cone around engine thruster
1491  float radius_mult; // multiplier for radius
1492  float length; // length of engine wash, measured from thruster
1493  float intensity; // intensity of engine wash
1494 
1496 
1498 
1499 // flags defined for wings
1500 #define MAX_WING_FLAGS 8 // total number of flags in the wing structure -- used for parsing wing flags
1501 #define WF_WING_GONE (1<<0) // all ships were either destroyed or departed
1502 #define WF_WING_DEPARTING (1<<1) // wing's departure cue turned true
1503 #define WF_IGNORE_COUNT (1<<2) // ignore all ships in this wing for goal counting purposes.
1504 #define WF_REINFORCEMENT (1<<3) // is this wing a reinforcement wing
1505 #define WF_RESET_REINFORCEMENT (1<<4) // needed when we need to reset the wing's reinforcement flag (after calling it in)
1506 #define WF_NO_ARRIVAL_MUSIC (1<<5) // don't play arrival music when wing arrives
1507 #define WF_EXPANDED (1<<6) // wing expanded in hotkey select screen
1508 #define WF_NO_ARRIVAL_MESSAGE (1<<7) // don't play any arrival message
1509 #define WF_NO_ARRIVAL_WARP (1<<8) // don't play warp effect for any arriving ships in this wing.
1510 #define WF_NO_DEPARTURE_WARP (1<<9) // don't play warp effect for any departing ships in this wing.
1511 #define WF_NO_DYNAMIC (1<<10) // members of this wing relentlessly pursue their ai goals
1512 #define WF_DEPARTURE_ORDERED (1<<11) // departure of this wing was ordered by player
1513 #define WF_NAV_CARRY (1<<12) // Kazan - Wing has nav-carry-status
1514 
1515 // Defines a wing of ships.
1516 typedef struct wing {
1517  char name[NAME_LENGTH];
1518  char wing_squad_filename[MAX_FILENAME_LEN]; // Goober5000
1519  int reinforcement_index; // index in reinforcement struct or -1
1520  int hotkey;
1521 
1522  int num_waves, current_wave; // members for dealing with waves
1523  int threshold; // when number of ships in the wing reaches this number -- new wave
1524 
1525  fix time_gone; // time into the mission when this wing is officially gone.
1526 
1527  int wave_count; // max ships per wave (as defined by the number of ships in the ships list)
1528  int total_arrived_count; // count of number of ships that we have created, regardless of wave
1529  int red_alert_skipped_ships; // Goober5000 - if we skipped over any indexes while creating red-alert ships
1530  int current_count; // count of number of ships actually in this wing -- used for limit in next array
1531  int ship_index[MAX_SHIPS_PER_WING]; // index into ships array of all ships currently in the wing
1532 
1533  int total_destroyed; // total number of ships destroyed in the wing (including all waves)
1534  int total_departed; // total number of ships departed in this wing (including all waves)
1535  int total_vanished; // total number of ships vanished in this wing (including all waves)
1536 
1537  int special_ship; // the leader of the wing. An index into ship_index[].
1538 
1539  int arrival_location; // arrival and departure information for wings -- similar to info for ships
1540  int arrival_distance; // distance from some ship where this ship arrives
1541  int arrival_anchor; // name of object this ship arrives near (or in front of)
1542  int arrival_path_mask; // Goober5000 - possible restrictions on which bay paths to use
1545 
1547  int departure_anchor; // name of object that we depart to (in case of dock bays)
1548  int departure_path_mask; // Goober5000 - possible restrictions on which bay paths to use
1551 
1552  int wave_delay_min; // minimum number of seconds before new wave can arrive
1553  int wave_delay_max; // maximum number of seconds before new wave can arrive
1554  int wave_delay_timestamp; // timestamp used for delaying arrival of next wave
1555 
1556  int flags;
1557 
1558  ai_goal ai_goals[MAX_AI_GOALS]; // goals for the wing -- converted to ai_goal struct
1559 
1560  ushort net_signature; // starting net signature for ships in this wing. assiged at mission load time
1561 
1562  // Goober5000 - if this wing has a unique squad logo
1563  // it's specified for the wing rather than each individual ship to cut down on the amount
1564  // of stuff that needs to be sitting in memory at once - each ship uses the wing texture;
1565  // and it also makes practical sense: no wing has two different squadrons in it :)
1567 } wing;
1568 
1569 extern wing Wings[MAX_WINGS];
1570 
1573 extern int TVT_wings[MAX_TVT_WINGS];
1574 
1578 
1579 extern int ai_paused;
1580 extern int CLOAKMAP;
1581 
1582 extern int Num_reinforcements;
1585 
1586 // structure definition for ship type counts. Used to give a count of the number of ships
1587 // of a particular type, and the number of times that a ship of that particular type has been
1588 // killed. When changing any info here, be sure to update the ship_type_names array in Ship.cpp
1589 // the order of the types here MUST match the order of the types in the array
1590 typedef struct ship_counts {
1591  int total;
1592  int killed;
1593  ship_counts(){total=0;killed=0;}
1594 } ship_counts;
1595 
1597 
1598 
1599 // Use the below macros when you want to find the index of an array element in the
1600 // Wings[] or Ships[] arrays.
1601 #define WING_INDEX(wingp) (wingp-Wings)
1602 #define SHIP_INDEX(shipp) (shipp-Ships)
1603 
1604 
1605 extern void ship_init(); // called once at game start
1606 extern void ship_level_init(); // called before the start of each level
1607 
1608 //returns -1 if failed
1609 extern int ship_create(matrix * orient, vec3d * pos, int ship_type, char *ship_name = NULL);
1610 extern void change_ship_type(int n, int ship_type, int by_sexp = 0);
1611 extern void ship_model_change(int n, int ship_type);
1612 extern void ship_process_pre( object * objp, float frametime );
1613 extern void ship_process_post( object * objp, float frametime );
1614 extern void ship_render_DEPRECATED( object * objp );
1615 extern void ship_render( object * obj, draw_list * scene );
1616 extern void ship_render_cockpit( object * objp);
1617 extern void ship_render_show_ship_cockpit( object * objp);
1618 extern void ship_delete( object * objp );
1619 extern int ship_check_collision_fast( object * obj, object * other_obj, vec3d * hitpos );
1620 extern int ship_get_num_ships();
1621 
1622 #define SHIP_VANISHED (1<<0)
1623 #define SHIP_DESTROYED (1<<1)
1624 #define SHIP_DEPARTED_WARP (1<<2)
1625 #define SHIP_DEPARTED_BAY (1<<3)
1626 #define SHIP_DEPARTED ( SHIP_DEPARTED_BAY | SHIP_DEPARTED_WARP )
1627 // Goober5000
1628 extern void ship_cleanup(int shipnum, int cleanup_mode);
1629 extern void ship_destroy_instantly(object *ship_obj, int shipnum);
1630 extern void ship_actually_depart(int shipnum, int method = SHIP_DEPARTED_WARP);
1631 
1632 extern int ship_fire_primary_debug(object *objp); // Fire the debug laser.
1633 extern int ship_stop_fire_primary(object * obj);
1634 extern int ship_fire_primary(object * objp, int stream_weapons, int force = 0);
1635 extern int ship_fire_secondary(object * objp, int allow_swarm = 0 );
1636 extern int ship_launch_countermeasure(object *objp, int rand_val = -1);
1637 
1638 // for special targeting lasers
1639 extern void ship_start_targeting_laser(ship *shipp);
1640 extern void ship_stop_targeting_laser(ship *shipp);
1641 extern void ship_process_targeting_lasers();
1642 
1643 extern int ship_select_next_primary(object *objp, int direction);
1644 extern int ship_select_next_secondary(object *objp);
1645 
1646 // Goober5000
1647 extern int get_available_primary_weapons(object *objp, int *outlist, int *outbanklist);
1648 
1649 extern int get_available_secondary_weapons(object *objp, int *outlist, int *outbanklist);
1650 extern void ship_recalc_subsys_strength( ship *shipp );
1651 extern int subsys_set(int objnum, int ignore_subsys_info = 0);
1652 extern void physics_ship_init(object *objp);
1653 
1654 // Note: This is not a general purpose routine.
1655 // It is specifically used for targeting.
1656 // It only returns a subsystem position if it has shields.
1657 // Return true/false for subsystem found/not found.
1658 // Stuff vector *pos with absolute position.
1659 extern int get_subsystem_pos(vec3d *pos, object *objp, ship_subsys *subsysp);
1660 
1661 int parse_ship_values(ship_info* sip, const bool is_template, const bool first_time, const bool replace);
1662 int ship_template_lookup(const char *name = NULL);
1663 void parse_ship_particle_effect(ship_info* sip, particle_effect* pe, char *id_string);
1664 
1665 extern int ship_info_lookup(const char *name = NULL);
1666 extern int ship_name_lookup(const char *name, int inc_players = 0); // returns the index into Ship array of name
1667 extern int ship_type_name_lookup(const char *name);
1668 
1669 extern int wing_lookup(const char *name);
1670 
1671 // returns 0 if no conflict, 1 if conflict, -1 on some kind of error with wing struct
1672 extern int wing_has_conflicting_teams(int wing_index);
1673 
1674 // next function takes optional second parameter which says to ignore the current count of ships
1675 // in the wing -- used to tell is the wing exists or not, not whether it exists and has ships currently
1676 // present.
1677 extern int wing_name_lookup(const char *name, int ignore_count = 0);
1678 
1679 // for generating a ship name for arbitrary waves/indexes of that wing... correctly handles the # character
1680 extern void wing_bash_ship_name(char *ship_name, const char *wing_name, int index);
1681 
1682 extern int Player_ship_class;
1683 
1684 // Do the special effect for energy dissipating into the shield for a hit.
1685 // model_num = index in Polygon_models[]
1686 // centerp = pos of object, sort of the center of the shield
1687 // tcp = hit point, probably the global hit_point set in polygon_check_face
1688 // tr0 = index of polygon in shield pointer in polymodel.
1689 extern void create_shield_explosion(int objnum, int model_num, matrix *orient, vec3d *centerp, vec3d *tcp, int tr0);
1690 
1691 // Initialize shield hit system.
1692 extern void shield_hit_init();
1693 extern void create_shield_explosion_all(object *objp);
1694 extern void shield_frame_init();
1695 extern void add_shield_point(int objnum, int tri_num, vec3d *hit_pos);
1696 extern void add_shield_point_multi(int objnum, int tri_num, vec3d *hit_pos);
1697 extern void shield_point_multi_setup();
1698 extern void shield_hit_close();
1699 
1700 void ship_draw_shield( object *objp);
1701 
1702 float apply_damage_to_shield(object *objp, int quadrant, float damage);
1703 float compute_shield_strength(object *objp);
1704 
1705 // Returns true if the shield presents any opposition to something
1706 // trying to force through it.
1707 // If quadrant is -1, looks at entire shield, otherwise
1708 // just one quadrant
1709 int ship_is_shield_up( object *obj, int quadrant );
1710 
1711 //=================================================
1712 // These two functions transfer instance specific angle
1713 // data into and out of the model structure, which contains
1714 // angles, but not for each instance of model being used. See
1715 // the actual functions in ship.cpp for more details.
1716 extern void ship_model_start(object *objp);
1717 extern void ship_model_stop(object *objp);
1718 void ship_model_update_instance(object *objp);
1719 
1720 //============================================
1721 extern int ship_find_num_crewpoints(object *objp);
1722 extern int ship_find_num_turrets(object *objp);
1723 
1724 extern void compute_slew_matrix(matrix *orient, angles *a);
1725 //extern camid ship_set_eye( object *obj, int eye_index);
1726 extern void ship_set_eye(object *obj, int eye_index);
1727 extern void ship_get_eye( vec3d *eye_pos, matrix *eye_orient, object *obj, bool do_slew = true, bool from_origin = false); // returns in eye the correct viewing position for the given object
1728 //extern camid ship_get_followtarget_eye(object *obj);
1729 extern ship_subsys *ship_get_indexed_subsys( ship *sp, int index, vec3d *attacker_pos = NULL ); // returns index'th subsystem of this ship
1730 extern int ship_get_index_from_subsys(ship_subsys *ssp, int objnum, int error_bypass = 0);
1731 extern int ship_get_subsys_index(ship *sp, char *ss_name, int error_bypass = 0); // returns numerical index in linked list of subsystems
1732 extern float ship_get_subsystem_strength( ship *shipp, int type );
1733 extern ship_subsys *ship_get_subsys(ship *shipp, char *subsys_name);
1734 extern int ship_get_num_subsys(ship *shipp);
1735 extern ship_subsys *ship_get_closest_subsys_in_sight(ship *sp, int subsys_type, vec3d *attacker_pos);
1736 
1737 //WMC
1740 void ship_subsys_set_name(ship_subsys *ss, char *n_name);
1741 
1742 // subsys disruption
1743 extern int ship_subsys_disrupted(ship_subsys *ss);
1744 extern int ship_subsys_disrupted(ship *sp, int type);
1745 extern void ship_subsys_set_disrupted(ship_subsys *ss, int time);
1746 
1747 extern int ship_do_rearm_frame( object *objp, float frametime );
1748 extern float ship_calculate_rearm_duration( object *objp );
1749 extern void ship_wing_cleanup( int shipnum, wing *wingp );
1750 
1751 extern int ship_find_repair_ship( object *requester_obj, object **ship_we_found = NULL );
1752 extern void ship_close(); // called in game_shutdown() to free malloced memory
1753 
1754 
1755 extern void ship_assign_sound_all();
1756 extern void ship_assign_sound(ship *sp);
1757 
1758 extern void ship_clear_ship_type_counts();
1759 extern void ship_add_ship_type_count( int ship_info_index, int num );
1760 extern void ship_add_ship_type_kill_count( int ship_info_index );
1761 
1762 extern int ship_get_type(char* output, ship_info* sip);
1763 extern int ship_get_default_orders_accepted( ship_info *sip );
1764 extern int ship_query_general_type(int ship);
1765 extern int ship_class_query_general_type(int ship_class);
1766 extern int ship_query_general_type(ship *shipp);
1767 extern int ship_docking_valid(int docker, int dockee);
1768 extern int get_quadrant(vec3d *hit_pnt, object *shipobjp = NULL); // Return quadrant num of given hit point.
1769 
1770 extern void ship_obj_list_rebuild(); // only called by save/restore code
1771 extern int ship_query_state(char *name);
1772 
1773 // Goober5000
1774 int ship_primary_bank_has_ammo(int shipnum); // check if current primary bank has ammo
1775 int ship_secondary_bank_has_ammo(int shipnum); // check if current secondary bank has ammo
1776 
1777 int ship_engine_ok_to_warp(ship *sp); // check if ship has engine power to warp
1778 int ship_navigation_ok_to_warp(ship *sp); // check if ship has navigation power to warp
1779 
1780 int ship_return_subsys_path_normal(ship *sp, ship_subsys *ss, vec3d *gsubpos, vec3d *norm);
1781 int ship_subsystem_in_sight(object* objp, ship_subsys* subsys, vec3d *eye_pos, vec3d* subsys_pos, int do_facing_check=1, float *dot_out=NULL, vec3d *vec_out=NULL);
1782 ship_subsys *ship_return_next_subsys(ship *shipp, int type, vec3d *attacker_pos);
1783 
1784 // defines and definition for function to get a random ship of a particular team (any ship,
1785 // any ship but player ships, or only players)
1786 #define SHIP_GET_ANY_SHIP 0
1787 #define SHIP_GET_NO_PLAYERS 1
1788 #define SHIP_GET_ONLY_PLAYERS 2
1789 #define SHIP_GET_UNSILENCED 3 // Karajorma - Returns no_players that can send builtin messages.
1790 
1791 
1792 extern int ship_get_random_team_ship(int team_mask, int flags = SHIP_GET_ANY_SHIP, float max_dist = 0.0f);
1793 extern int ship_get_random_player_wing_ship(int flags = SHIP_GET_ANY_SHIP, float max_dist = 0.0f, int persona_index = -1, int get_first = 0, int multi_team = -1);
1794 extern int ship_get_random_ship_in_wing(int wingnum, int flags = SHIP_GET_ANY_SHIP, float max_dist = 0.0f, int get_first = 0);
1795 
1796 // return ship index
1798 
1799 extern int ship_get_by_signature(int signature);
1800 
1801 #ifndef NDEBUG
1802 extern int Ai_render_debug_flag;
1803 extern int Show_shield_mesh;
1804 extern int Ship_auto_repair; // flag to indicate auto-repair of subsystem should occur
1805 #endif
1806 
1809 float ship_quadrant_shield_strength(object *hit_objp, vec3d *hitpos);
1810 
1811 int ship_dumbfire_threat(ship *sp);
1812 int ship_lock_threat(ship *sp);
1813 
1814 int bitmask_2_bitnum(int num);
1815 char *ship_return_orders(char *outbuf, ship *sp);
1816 char *ship_return_time_to_goal(char *outbuf, ship *sp);
1817 
1818 void ship_maybe_warn_player(ship *enemy_sp, float dist);
1819 void ship_maybe_praise_player(ship *deader_sp);
1820 void ship_maybe_praise_self(ship *deader_sp, ship *killer_sp);
1821 void ship_maybe_ask_for_help(ship *sp);
1822 void ship_scream(ship *sp);
1823 void ship_maybe_scream(ship *sp);
1826 void ship_maybe_lament();
1827 
1828 void ship_primary_changed(ship *sp);
1829 void ship_secondary_changed(ship *sp);
1830 
1831 // get the Ship_info flags for a given ship
1832 int ship_get_SIF(ship *shipp);
1833 int ship_get_SIF(int sh);
1834 
1835 // get the ship type info (objecttypes.tbl)
1837 
1838 extern void ship_do_cargo_revealed( ship *shipp, int from_network = 0 );
1839 extern void ship_do_cargo_hidden( ship *shipp, int from_network = 0 );
1840 extern void ship_do_cap_subsys_cargo_revealed( ship *shipp, ship_subsys *subsys, int from_network = 0);
1841 extern void ship_do_cap_subsys_cargo_hidden( ship *shipp, ship_subsys *subsys, int from_network = 0);
1842 
1844 
1845 // Goober5000
1846 int primary_out_of_ammo(ship_weapon *swp, int bank);
1847 int get_max_ammo_count_for_primary_bank(int ship_class, int bank, int ammo_type);
1848 
1849 int get_max_ammo_count_for_bank(int ship_class, int bank, int ammo_type);
1850 int get_max_ammo_count_for_turret_bank(ship_weapon *swp, int bank, int ammo_type);
1851 
1852 int is_support_allowed(object *objp, bool do_simple_check = false);
1853 
1854 // Given an object and a turret on that object, return the actual firing point of the gun
1855 // and its normal. This uses the current turret angles. We are keeping track of which
1856 // gun to fire next in the ship specific info for this turret subobject. Use this info
1857 // to determine which position to fire from next.
1858 // Stuffs:
1859 // *gpos: absolute position of gun firing point
1860 // *gvec: vector fro *gpos to *targetp
1861 void ship_get_global_turret_gun_info(object *objp, ship_subsys *ssp, vec3d *gpos, vec3d *gvec, int use_angles, vec3d *targetp);
1862 
1863 // Given an object and a turret on that object, return the global position and forward vector
1864 // of the turret. The gun normal is the unrotated gun normal, (the center of the FOV cone), not
1865 // the actual gun normal given using the current turret heading. But it _is_ rotated into the model's orientation
1866 // in global space.
1867 void ship_get_global_turret_info(object *objp, model_subsystem *tp, vec3d *gpos, vec3d *gvec);
1868 
1869 // return 1 if objp is in fov of the specified turret, tp. Otherwise return 0.
1870 // dist = distance from turret to center point of object
1871 int object_in_turret_fov(object *objp, ship_subsys *ss, vec3d *tvec, vec3d *tpos, float dist);
1872 
1873 // functions for testing fov.. returns true if fov test is passed.
1874 bool turret_std_fov_test(ship_subsys *ss, vec3d *gvec, vec3d *v2e, float size_mod = 0);
1875 bool turret_adv_fov_test(ship_subsys *ss, vec3d *gvec, vec3d *v2e, float size_mod = 0);
1876 bool turret_fov_test(ship_subsys *ss, vec3d *gvec, vec3d *v2e, float size_mod = 0);
1877 
1878 // function for checking adjusted turret rof
1880 
1881 // forcible jettison cargo from a ship
1882 void object_jettison_cargo(object *objp, object *cargo_objp);
1883 
1884 // get damage done by exploding ship, takes into account mods for individual ship
1885 float ship_get_exp_damage(object* objp);
1886 
1887 // get whether ship has shockwave, takes into account mods for individual ship
1888 int ship_get_exp_propagates(ship *sp);
1889 
1890 // get outer radius of damage, takes into account mods for individual ship
1891 float ship_get_exp_outer_rad(object *ship_objp);
1892 
1893 // externed by Goober5000
1894 extern int ship_explode_area_calc_damage( vec3d *pos1, vec3d *pos2, float inner_rad, float outer_rad, float max_damage, float max_blast, float *damage, float *blast );
1895 
1896 // returns whether subsys is allowed to have cargo
1897 int valid_cap_subsys_cargo_list(char *subsys_name);
1898 
1899 // determine turret status of a given subsystem, returns 0 for no turret, 1 for "fixed turret", 2 for "rotating" turret
1900 int ship_get_turret_type(ship_subsys *subsys);
1901 
1902 // get ship by object signature, returns OBJECT INDEX
1903 int ship_get_by_signature(int sig);
1904 
1905 // get the team of a reinforcement item
1906 int ship_get_reinforcement_team(int r_index);
1907 
1908 // determine if the given texture is used by a ship type. return ship info index, or -1 if not used by a ship
1909 int ship_get_texture(int bitmap);
1910 
1911 // page in bitmaps for all ships on a given level
1912 void ship_page_in();
1913 
1914 // Goober5000 - helper for above
1915 void ship_page_in_textures(int ship_index = -1);
1916 
1917 // fixer for above - taylor
1918 void ship_page_out_textures(int ship_index, bool release = false);
1919 
1920 // update artillery lock info
1922 
1923 // checks if a world point is inside the extended bounding box of a ship
1924 int check_world_pt_in_expanded_ship_bbox(vec3d *world_pt, object *objp, float delta_box);
1925 
1926 // returns true if objp is ship and is tagged
1927 int ship_is_tagged(object *objp);
1928 
1929 // returns max normal speed of ship (overclocked / afterburned)
1930 float ship_get_max_speed(ship *shipp);
1931 
1932 // returns warpout speed of ship
1933 float ship_get_warpout_speed(object *objp);
1934 
1935 // returns true if ship is beginning to speed up in warpout
1937 
1938 // return the length of the ship class
1939 float ship_class_get_length(ship_info *sip);
1940 
1941 // Goober5000 - used by change-ai-class
1942 extern void ship_set_new_ai_class(int ship_num, int new_ai_class);
1943 extern void ship_subsystem_set_new_ai_class(int ship_num, char *subsystem, int new_ai_class);
1944 
1945 // wing squad logos - Goober5000
1946 extern void wing_load_squad_bitmap(wing *w);
1947 
1948 // Goober5000 - needed by new hangar depart code
1949 extern bool ship_has_dock_bay(int shipnum);
1950 extern bool ship_useful_for_departure(int shipnum, int path_mask = 0);
1951 extern int ship_get_ship_for_departure(int team);
1952 
1953 // Goober5000 - moved here from hudbrackets.cpp
1954 extern bool ship_subsys_is_fighterbay(ship_subsys *ss);
1955 
1956 // Goober5000
1958 
1959 // Goober5000
1960 extern bool ship_subsys_takes_damage(ship_subsys *ss);
1961 
1962 //phreak
1963 extern int ship_fire_tertiary(object *objp);
1964 
1965 // Goober5000 - handles submodel rotation, incorporating conditions such as gun barrels when firing
1967 
1968 // Goober5000 - shortcut hud stuff
1969 extern int ship_has_energy_weapons(ship *shipp);
1970 extern int ship_has_engine_power(ship *shipp);
1971 
1972 // Swifty - Cockpit displays
1974 void ship_add_cockpit_display(cockpit_display_info *display, int cockpit_model_num);
1977 int ship_start_render_cockpit_display(int cockpit_display_num);
1978 void ship_end_render_cockpit_display(int cockpit_display_num);
1979 
1980 //WMC - Warptype stuff
1981 int warptype_match(char *p);
1982 
1983 // Goober5000
1984 int ship_starting_wing_lookup(const char *wing_name);
1985 int ship_squadron_wing_lookup(const char *wing_name);
1986 int ship_tvt_wing_lookup(const char *wing_name);
1987 
1988 // Goober5000
1989 int ship_class_compare(int ship_class_1, int ship_class_2);
1990 
1991 int armor_type_get_idx(char* name);
1992 
1993 void armor_init();
1994 
1996 
1997 // Sushi - Path metadata
1998 void init_path_metadata(path_metadata& metadata);
1999 
2000 
2001 typedef struct ship_effect {
2002  char name[NAME_LENGTH];
2006 } ship_effect;
2007 
2009 
2018 int ship_get_sound(object *objp, GameSoundsIndex id);
2019 
2028 bool ship_has_sound(object *objp, GameSoundsIndex id);
2029 
2036 
2047 int get_nearest_bbox_point(object *ship_obj, vec3d *start, vec3d *box_pt);
2048 
2049 #endif
float big_exp_visual_rad
Definition: ship.h:1239
float ship_get_warpout_speed(object *objp)
Definition: ship.cpp:17306
bool uses_team_colors
Definition: ship.h:1365
void ship_destroy_instantly(object *ship_obj, int shipnum)
Definition: ship.cpp:7761
#define MAX_SLOTS
Definition: model.h:430
void ship_get_global_turret_info(object *objp, model_subsystem *tp, vec3d *gpos, vec3d *gvec)
Definition: aiturret.cpp:1303
char fg_filename[MAX_FILENAME_LEN]
Definition: ship.h:272
float debris_max_rotspeed
Definition: ship.h:1262
int num_swarm_missiles_to_fire
Definition: ship.h:668
#define MAX_FILENAME_LEN
Definition: pstypes.h:324
int ship_get_index_from_subsys(ship_subsys *ssp, int objnum, int error_bypass=0)
Definition: ship.cpp:13390
int turret_enemy_sig
Definition: ship.h:338
void parse_weapon_targeting_priorities()
Definition: ship.cpp:18548
int shader_effect_duration
Definition: ship.h:767
int flags
Definition: ship.h:150
ship Ships[MAX_SHIPS]
Definition: ship.cpp:122
int get_available_primary_weapons(object *objp, int *outlist, int *outbanklist)
Definition: ship.cpp:12641
int thruster_tertiary_glow_bitmap
Definition: ship.h:686
int tertiary_bank_rearm_time
Definition: ship.h:143
void ship_maybe_praise_player(ship *deader_sp)
Definition: ship.cpp:15532
void ship_set_hud_cockpit_targets()
Definition: ship.cpp:7479
int wing_has_conflicting_teams(int wing_index)
Definition: ship.cpp:17054
SCP_vector< ship_type_info > Ship_types
Definition: ship.cpp:168
fix time_subsys_cargo_revealed
Definition: ship.h:374
bool use_newtonian_damp
Definition: ship.h:1410
int thruster_secondary_glow_bitmap
Definition: ship.h:685
#define MAX_TFP
Definition: model.h:69
thrust_pair_bitmap thruster_secondary_glow_info
Definition: ship.h:1382
int ship_explode_area_calc_damage(vec3d *pos1, vec3d *pos2, float inner_rad, float outer_rad, float max_damage, float max_blast, float *damage, float *blast)
Definition: ship.cpp:7895
char wing_status_wing_pos
Definition: ship.h:553
vec3d deathroll_rotvel
Definition: ship.h:573
int subsys_set(int objnum, int ignore_subsys_info=0)
Definition: ship.cpp:6253
SCP_vector< HudGauge * > hud_gauges
Definition: ship.h:1447
int wave_delay_min
Definition: ship.h:1552
ubyte wash_killed
Definition: ship.h:548
fix time
Definition: ship.h:859
ubyte pre_death_explosion_happened
Definition: ship.h:547
float minimum_convergence_distance
Definition: ship.h:1436
float aggregate_max_hits
Definition: ship.h:418
bool ship_has_dock_bay(int shipnum)
Definition: ship.cpp:17435
fix team_change_timestamp
Definition: ship.h:814
int ship_template_lookup(const char *name=NULL)
Definition: ship.cpp:12761
int foreground
Definition: ship.h:260
ubyte shield_icon_index
Definition: ship.h:1337
void ship_process_post(object *objp, float frametime)
Definition: ship.cpp:9180
model_subsystem * system_info
Definition: ship.h:314
void change_ship_type(int n, int ship_type, int by_sexp=0)
Definition: ship.cpp:9983
int primary_bank_weapons[MAX_SHIP_PRIMARY_BANKS]
Definition: ship.h:103
void ship_assign_sound(ship *sp)
Definition: ship.cpp:14191
int is_support_allowed(object *objp, bool do_simple_check=false)
Definition: ship.cpp:16749
int last_primary_fire_sound_stamp[MAX_SHIP_PRIMARY_BANKS]
Definition: ship.h:118
float tag_total
Definition: ship.h:724
int ai_passive_dock
Definition: ship.h:1039
float compute_shield_strength(object *objp)
void ship_end_render_cockpit_display(int cockpit_display_num)
Definition: ship.cpp:7539
int ship_info_lookup(const char *name=NULL)
Definition: ship.cpp:12772
int Ship_auto_repair
Definition: ship.cpp:116
void add_shield_point_multi(int objnum, int tri_num, vec3d *hit_pos)
Definition: shield.cpp:802
#define MAX_SHIP_PRIMARY_BANKS
Definition: globals.h:62
void ship_start_targeting_laser(ship *shipp)
Definition: ship.cpp:11568
EModelAnimationPosition turret_animation_position
Definition: ship.h:351
int cmeasure_fire_stamp
Definition: ship.h:654
int ts_index
Definition: ship.h:704
float max_weapon_reserve
Definition: ship.h:1276
float warpout_speed
Definition: ship.h:1220
geometry_batcher man_batcher
Definition: ship.h:1069
int lightning_stamp
Definition: ship.h:734
SCP_string secondary_team_name
Definition: ship.h:813
float reorient_max_angle
Definition: ship.h:1141
int team
Definition: ship.h:606
int previous_primary_bank
Definition: ship.h:110
int warpout_type
Definition: ship.h:1223
#define NUM_SUB_EXPL_HANDLES
Definition: ship.h:518
void ship_model_stop(object *objp)
Definition: ship.cpp:13059
float debris_max_speed
Definition: ship.h:1260
int num_uses
Definition: ship.h:86
int secondary_bank_weapons[MAX_SHIP_SECONDARY_BANKS]
Definition: ship.h:1299
float max_overclocked_speed
Definition: ship.h:1275
struct cockpit_display cockpit_display
thrust_pair_bitmap thruster_tertiary_glow_info
Definition: ship.h:1383
int thrusters_sounds[MAX_MAN_THRUSTERS]
Definition: ship.h:789
int ai_class
Definition: ship.h:148
bool draw_primary_models[MAX_SHIP_PRIMARY_BANKS]
Definition: ship.h:1302
np_update np_updates[MAX_PLAYERS]
Definition: ship.h:731
float slide_decel
Definition: ship.h:1204
float awacs_intensity
Definition: ship.h:359
int ship_get_random_targetable_ship()
Definition: ship.cpp:16876
int num_target_priorities
Definition: ship.h:390
int num_primary_banks
Definition: ship.h:99
~ship_info()
Definition: ship.cpp:1668
int arrival_anchor
Definition: ship.h:1541
int objnum
Definition: ship.h:537
float afterburner_trail_width_factor
Definition: ship.h:1370
int ship_check_collision_fast(object *obj, object *other_obj, vec3d *hitpos)
Definition: ship.cpp:9521
int score
Definition: ship.h:542
int warpin_type
Definition: ship.h:1213
int wave_delay_max
Definition: ship.h:1553
int arrival_distance
Definition: ship.h:1540
float debris_arc_percent
Definition: ship.h:1267
shockwave_create_info shockwave
Definition: ship.h:1237
int wash_timestamp
Definition: ship.h:666
struct ship_counts ship_counts
int bii_index_ship_with_cargo
Definition: ship.h:1345
int alt_type_index
Definition: ship.h:556
int warpin_snd_start
Definition: ship.h:1208
int ship_find_repair_ship(object *requester_obj, object **ship_we_found=NULL)
Definition: ship.cpp:14008
int arrival_location
Definition: ship.h:1539
float debris_min_lifetime
Definition: ship.h:1257
SCP_vector< thruster_particles > normal_thruster_particles
Definition: ship.h:1376
ubyte bay_doors_launched_from
Definition: ship.h:780
SCP_vector< ship_effect > Ship_effects
Definition: ship.cpp:412
ship_weapon weapons
Definition: ship.h:658
float radar_projection_size_mult
Definition: ship.h:1431
SCP_vector< engine_wash_info > Engine_wash_info
Definition: ship.cpp:143
void ship_maybe_tell_about_low_ammo(ship *sp)
Definition: ship.cpp:15837
void ship_subsystem_set_new_ai_class(int ship_num, char *subsystem, int new_ai_class)
Definition: ship.cpp:17380
float max_rad
Definition: ship.h:970
bool IsName(char *in_name)
Definition: ship.h:221
SCP_vector< ship_info > Ship_info
Definition: ship.cpp:164
Definition: trails.h:34
fix time_cargo_revealed
Definition: ship.h:608
ai_target_priority init_ai_target_priorities()
Definition: ship.cpp:18528
submodel_instance_info submodel_info_1
Definition: ship.h:368
float ship_quadrant_shield_strength(object *hit_objp, vec3d *hitpos)
Definition: ship.cpp:15030
int escort_priority
Definition: ship.h:541
float thruster_glow_noise
Definition: ship.h:683
float warpout_player_speed
Definition: ship.h:1225
void wing_load_squad_bitmap(wing *w)
Definition: ship.cpp:17406
int next_engine_stutter
Definition: ship.h:689
RadarVisibility radar_current_status
Definition: ship.h:810
int last_primary_fire_stamp[MAX_SHIP_PRIMARY_BANKS]
Definition: ship.h:114
char icon_filename[MAX_FILENAME_LEN]
Definition: ship.h:1338
float ff_multiplier
Definition: ship.h:1027
GLuint index
Definition: Glext.h:5608
void init_path_metadata(path_metadata &metadata)
Definition: ship.cpp:18607
char wing_status_wing_index
Definition: ship.h:552
void ship_scream(ship *sp)
Definition: ship.cpp:15757
wing Wings[MAX_WINGS]
Definition: ship.cpp:128
void ship_maybe_praise_self(ship *deader_sp, ship *killer_sp)
Definition: ship.cpp:15572
int ship_query_general_type(int ship)
Definition: ship.cpp:14475
struct ship_flag_name ship_flag_name
void ship_model_change(int n, int ship_type)
Definition: ship.cpp:9888
void wing_bash_ship_name(char *ship_name, const char *wing_name, int index)
Definition: ship.cpp:12686
#define MAX_WINGS
Definition: globals.h:50
float turn_rate
Definition: ship.h:400
#define MAX_SHIPS
Definition: globals.h:37
int flags
Definition: ship.h:88
void clear()
Definition: ship.cpp:5552
float ship_calculate_rearm_duration(object *objp)
Definition: ship.cpp:13537
float ship_get_exp_damage(object *objp)
Definition: ship.cpp:16949
int ship_is_shield_up(object *obj, int quadrant)
Definition: shield.cpp:964
ship_subsys fighter_beam_turret_data
Definition: ship.h:743
void ship_render_DEPRECATED(object *objp)
Definition: ship.cpp:6733
void ship_do_cap_subsys_cargo_hidden(ship *shipp, ship_subsys *subsys, int from_network=0)
Definition: ship.cpp:16210
int turret_max_target_ownage
Definition: ship.h:404
int ship_get_turret_type(ship_subsys *subsys)
Definition: ship.cpp:17008
int corkscrew_missile_bank
Definition: ship.h:565
int departure_anchor
Definition: ship.h:618
int model_num
Definition: ship.h:1189
float ship_max_shield_strength
Definition: ship.h:596
int ai_player_orders
Definition: ship.h:1036
angles model_icon_angles
Definition: ship.h:1339
thrust_pair thruster_glow_info
Definition: ship.h:1381
int next_primary_fire_stamp[MAX_SHIP_PRIMARY_BANKS]
Definition: ship.h:113
SCP_vector< cockpit_display > Player_displays
Definition: ship.cpp:126
int arrival_location
Definition: ship.h:610
float thruster_glow_noise_mult
Definition: ship.h:1392
float forward_accel
Definition: ship.h:1201
int ship_iff_color[MAX_IFFS][MAX_IFFS]
Definition: ship.h:793
int ship_find_exited_ship_by_signature(int signature)
Definition: ship.cpp:5353
float max_hits
Definition: ship.h:320
#define SHIP_DEPARTED_WARP
Definition: ship.h:1624
int class_type
Definition: ship.h:1167
int allowed_bank_restricted_weapons[MAX_SHIP_WEAPONS][MAX_WEAPON_TYPES]
Definition: ship.h:1335
int ship_get_by_signature(int signature)
Definition: ship.cpp:16106
int model_instance_num
Definition: ship.h:802
void ship_init_cockpit_displays(ship *shipp)
Definition: ship.cpp:7349
reinforcements Reinforcements[MAX_REINFORCEMENTS]
Definition: ship.cpp:165
int next_secondary_fire_stamp[MAX_SHIP_SECONDARY_BANKS]
Definition: ship.h:115
int special_exp_blast
Definition: ship.h:586
SCP_vector< vec3d > shield_points
Definition: ship.h:662
bool ship_subsys_takes_damage(ship_subsys *ss)
Definition: ship.cpp:17545
float reorient_min_angle
Definition: ship.h:1142
int parse_ship_values(ship_info *sip, const bool is_template, const bool first_time, const bool replace)
Definition: ship.cpp:2148
int departure_location
Definition: ship.h:617
int ct_count
Definition: ship.h:1355
int detonate_weapon_time
Definition: ship.h:147
Definition: pstypes.h:88
submodel_instance_info submodel_info_2
Definition: ship.h:369
int get_available_secondary_weapons(object *objp, int *outlist, int *outbanklist)
Definition: ship.cpp:12667
void ship_clear_cockpit_displays()
Definition: ship.cpp:7385
int departure_anchor
Definition: ship.h:1547
int ai_index
Definition: ship.h:538
int shockwave_count
Definition: ship.h:1246
ship_weapon weapons
Definition: ship.h:362
char sub_name[NAME_LENGTH]
Definition: ship.h:318
int special_exp_inner
Definition: ship.h:587
ship_counts()
Definition: ship.h:1593
int total_vanished
Definition: ship.h:1535
void ship_maybe_lament()
Definition: ship.cpp:15738
float level2_tag_left
Definition: ship.h:728
vec3d last_aim_enemy_pos
Definition: ship.h:395
int weapon_recharge_index
Definition: ship.h:638
void shield_hit_close()
Definition: shield.cpp:168
vec3d turret_big_attack_point
Definition: ship.h:349
void ship_add_exited_ship(ship *shipp, int reason)
Definition: ship.cpp:5298
float srotation_time
Definition: ship.h:1199
float warpout_radius
Definition: ship.h:1216
int ship_get_texture(int bitmap)
Definition: ship.cpp:17125
int turret_next_enemy_check_stamp
Definition: ship.h:335
int subsys_guardian_threshold
Definition: ship.h:324
struct ship_spark ship_spark
int ship_select_next_secondary(object *objp)
Definition: ship.cpp:12550
int secondary_bank_start_ammo[MAX_SHIP_SECONDARY_BANKS]
Definition: ship.h:135
int ship_name_lookup(const char *name, int inc_players=0)
Definition: ship.cpp:12900
float arrive_speed_mult
Definition: ship.h:1154
float afterburner_fuel
Definition: ship.h:648
int afterburner_trail_faded_out_sections
Definition: ship.h:1373
CButton * team
int next_hit_spark
Definition: ship.h:580
ship_flag_name Ship_flag_names[]
Definition: ship.cpp:372
int hud_bools
Definition: ship.h:1019
GLclampf f
Definition: Glext.h:7097
float damp
Definition: ship.h:1193
char pof_file_hud[MAX_FILENAME_LEN]
Definition: ship.h:1184
void ship_maybe_ask_for_help(ship *sp)
Definition: ship.cpp:15668
int submodel_num
Definition: ship.h:525
int flags
Definition: ship.h:217
int bitmask_2_bitnum(int num)
Definition: ship.cpp:15178
int subsys_disrupted_check_timestamp
Definition: ship.h:699
char Squadron_wing_names[MAX_SQUADRON_WINGS][NAME_LENGTH]
Definition: ship.cpp:140
float depart_speed_mult
Definition: ship.h:1155
char flag_name[TOKEN_LENGTH]
Definition: ship.h:425
#define NUM_TURRET_ORDER_TYPES
Definition: ship.h:253
int num_tertiary_banks
Definition: ship.h:101
bool can_glide
Definition: ship.h:1406
int special_exp_outer
Definition: ship.h:588
void ship_obj_list_rebuild()
Definition: ship.cpp:500
int ship_get_random_team_ship(int team_mask, int flags=SHIP_GET_ANY_SHIP, float max_dist=0.0f)
Definition: ship.cpp:14682
float afterburner_fuel_capacity
Definition: ship.h:1283
int object_in_turret_fov(object *objp, ship_subsys *ss, vec3d *tvec, vec3d *tpos, float dist)
Definition: aiturret.cpp:101
float emp_decr
Definition: ship.h:718
bool ship_subsys_is_fighterbay(ship_subsys *ss)
Definition: ship.cpp:17533
int tertiary_bank_ammo
Definition: ship.h:140
EModelAnimationPosition bay_doors_status
Definition: ship.h:776
void parse_ship_particle_effect(ship_info *sip, particle_effect *pe, char *id_string)
Definition: ship.cpp:1884
int end_time
Definition: ship.h:526
int flags
Definition: ship.h:858
model_subsystem * subsystems
Definition: ship.h:1271
Definition: ship.h:1516
int subsys_snd_flags
Definition: ship.h:383
int current_primary_bank
Definition: ship.h:106
int killed
Definition: ship.h:1592
int ship_start_render_cockpit_display(int cockpit_display_num)
Definition: ship.cpp:7494
vec3d pos
Definition: ship.h:1102
float piercing_damage_draw_limit
Definition: ship.h:1442
int wing_insignia_texture
Definition: ship.h:1566
int ship_fire_primary_debug(object *objp)
Definition: ship.cpp:10386
float landing_rest_angle
Definition: ship.h:1147
float angle
Definition: ship.h:1490
int ship_has_engine_power(ship *shipp)
Definition: ship.cpp:17618
void ship_render(object *obj, draw_list *scene)
Definition: ship.cpp:19003
int get_subsystem_pos(vec3d *pos, object *objp, ship_subsys *subsysp)
Definition: ship.cpp:12975
int death_roll_base_time
Definition: ship.h:1244
float weapon_energy
Definition: ship.h:640
uint flags
Definition: ship.h:644
int restricted_loadout_flag[MAX_SHIP_WEAPONS]
Definition: ship.h:1334
int turret_next_fire_stamp
Definition: ship.h:336
int primary_bank_weapons[MAX_SHIP_PRIMARY_BANKS]
Definition: ship.h:1294
#define MAX_SHIPS_PER_WING
Definition: globals.h:52
hull_check orient
Definition: lua.cpp:5049
std::basic_string< char, std::char_traits< char >, std::allocator< char > > SCP_string
Definition: vmallocator.h:21
char ship_name[NAME_LENGTH]
Definition: ship.h:854
float debris_max_hitpoints
Definition: ship.h:1265
int start_snd
Definition: ship.h:1092
float primary_rotate_rate[MAX_SHIP_PRIMARY_BANKS]
Definition: ship.h:785
float min_rad
Definition: ship.h:979
int warpin_time
Definition: ship.h:1211
object * objp
Definition: lua.cpp:3105
int primary_bank_capacity[MAX_SHIP_PRIMARY_BANKS]
Definition: ship.h:123
int tertiary_bank_start_ammo
Definition: ship.h:141
int type
Definition: ship.h:84
float optimum_range
Definition: ship.h:342
float vaporize_chance
Definition: ship.h:1044
int current_secondary_bank
Definition: ship.h:107
GLsizeiptr size
Definition: Glext.h:5496
int thruster_glow_bitmap
Definition: ship.h:681
int flag_list
Definition: ship.h:426
int Num_wings
Definition: ship.cpp:120
int tertiary_bank_capacity
Definition: ship.h:142
float density
Definition: ship.h:1192
ship_info()
Definition: ship.cpp:1304
GameSoundsIndex
Definition: gamesnd.h:67
float vaporize_chance
Definition: ship.h:1248
#define MAX_SQUADRON_WINGS
Definition: globals.h:55
int detail_distance[MAX_SHIP_DETAIL_LEVELS]
Definition: ship.h:1186
fix time_first_tagged
Definition: ship.h:726
struct DamageTypeStruct DamageTypeStruct
ship * shipp
Definition: lua.cpp:9162
int special_warpin_objnum
Definition: ship.h:740
int arrival_delay
Definition: ship.h:1544
float points_to_target
Definition: ship.h:378
int auto_shield_spread_from_lod
Definition: ship.h:1313
float emp_intensity
Definition: ship.h:717
ship_subsys_info subsys_info[SUBSYSTEM_MAX]
Definition: ship.h:632
#define MAX_REINFORCEMENT_MESSAGES
Definition: ship.h:78
#define MAX_TVT_WINGS
Definition: globals.h:59
man_thruster_renderer(int id)
Definition: ship.h:1071
void ship_level_init()
Definition: ship.cpp:5226
int hull_strength
Definition: ship.h:860
char tech_title[NAME_LENGTH]
Definition: ship.h:1175
float awacs_radius
Definition: ship.h:360
char * ship_subsys_get_name(ship_subsys *ss)
Definition: ship.cpp:15001
int ship_return_subsys_path_normal(ship *sp, ship_subsys *ss, vec3d *gsubpos, vec3d *norm)
Definition: ship.cpp:14837
int next_swarm_fire
Definition: ship.h:669
void ship_model_update_instance(object *objp)
Definition: ship.cpp:13072
float base_rotation_rate_pct
Definition: ship.h:379
ship_subsys * last_fired_turret
Definition: ship.h:772
int hotkey
Definition: ship.h:1520
int ship_navigation_ok_to_warp(ship *sp)
Definition: ship.cpp:14809
std::deque< bool > glow_point_bank_active
Definition: ship.h:763
int glide_start_snd
Definition: ship.h:1420
GLenum type
Definition: Gl.h:1492
int ai_paused
Definition: object.cpp:677
float thruster03_glow_rad_factor
Definition: ship.h:1388
vec3d convergence_offset
Definition: ship.h:1438
int use_flags
Definition: ship.h:1090
ship_subsys()
Definition: ship.h:406
int hotkey
Definition: ship.h:540
void ship_stop_targeting_laser(ship *shipp)
Definition: ship.cpp:11605
void ship_init()
Definition: ship.cpp:5086
int ship_get_ship_for_departure(int team)
Definition: ship.cpp:17477
int loop_snd
Definition: ship.h:1093
float GetShieldPiercePCT(int damage_type_idx)
Definition: ship.cpp:18111
bool ship_useful_for_departure(int shipnum, int path_mask=0)
Definition: ship.cpp:17448
vec3d topdown_offset
Definition: ship.h:1416
int source
Definition: ship.h:259
float landing_max_angle
Definition: ship.h:1131
int ship_select_next_primary(object *objp, int direction)
Definition: ship.cpp:12317
int species
Definition: ship.h:1166
int rotation_timestamp
Definition: ship.h:385
ubyte num_corkscrew_to_fire
Definition: ship.h:564
int objnum
Definition: ship.h:1483
ship_subsys subsys_list
Definition: ship.h:630
int ship_fire_primary(object *objp, int stream_weapons, int force=0)
Definition: ship.cpp:10760
int death_fx_count
Definition: ship.h:1245
int arrival_path_mask
Definition: ship.h:1542
int ship_get_reinforcement_team(int r_index)
Definition: ship.cpp:17090
int turret_pick_big_attack_point_timestamp
Definition: ship.h:348
fix time_cargo_revealed
Definition: ship.h:861
void ship_add_ship_type_count(int ship_info_index, int num)
Definition: ship.cpp:14449
SCP_vector< exited_ship > Ships_exited
Definition: ship.cpp:152
ship_subsys * ship_return_next_subsys(ship *shipp, int type, vec3d *attacker_pos)
Definition: ship.cpp:14945
int ship_list_index
Definition: ship.h:676
int orders_accepted
Definition: ship.h:624
int num_detail_levels
Definition: ship.h:1185
bool use_special_explosion
Definition: ship.h:584
#define MAX_SHIP_SECONDARY_BANKS
Definition: globals.h:63
void ship_wing_cleanup(int shipnum, wing *wingp)
Definition: ship.cpp:7640
EModelAnimationPosition secondary_animation_position[MAX_SHIP_SECONDARY_BANKS]
Definition: ship.h:152
float get_adjusted_turret_rof(ship_subsys *ss)
Definition: aiturret.cpp:2884
GLintptr offset
Definition: Glext.h:5497
int previous_secondary_bank
Definition: ship.h:111
void create_shield_explosion(int objnum, int model_num, matrix *orient, vec3d *centerp, vec3d *tcp, int tr0)
Definition: shield.cpp:731
char pof_file[MAX_FILENAME_LEN]
Definition: ship.h:1183
int shader_effect_start_time
Definition: ship.h:768
WarpEffect * warpout_effect
Definition: ship.h:576
float radius_mult
Definition: ship.h:1491
ubyte arc_type[MAX_SHIP_ARCS]
Definition: ship.h:713
int aiming_flags
Definition: ship.h:1435
int ship_type_name_lookup(const char *name)
Definition: ship.cpp:12923
int glide_end_snd
Definition: ship.h:1421
int cmeasure_max
Definition: ship.h:1291
class ship_subsys * prev
Definition: ship.h:313
float level2_tag_total
Definition: ship.h:727
ship_spark sparks[MAX_SHIP_HITS]
Definition: ship.h:582
class ship_subsys * next
Definition: ship.h:313
int group
Definition: ship.h:674
RadarVisibility
Definition: radarsetup.h:87
float max_vel
Definition: ship.h:984
int Starting_wings[MAX_STARTING_WINGS]
Definition: ship.cpp:132
int flags
Definition: ship.h:322
int target_priority[32]
Definition: ship.h:389
#define MAX_SHIP_WEAPONS
Definition: globals.h:64
SCP_vector< alt_class > s_alt_classes
Definition: ship.h:791
bool auto_shield_spread_bypass
Definition: ship.h:1312
int armor_type_idx
Definition: ship.h:1403
char * desc
Definition: ship.h:1173
unsigned int uint
Definition: pstypes.h:64
int bii_index_wing_with_cargo
Definition: ship.h:1347
float debris_min_speed
Definition: ship.h:1259
char dockee[NAME_LENGTH]
void ship_do_cargo_hidden(ship *shipp, int from_network=0)
Definition: ship.cpp:16190
int GetPiercingType(int damage_type_idx)
Definition: ship.cpp:18137
int ship_get_type(char *output, ship_info *sip)
Definition: ship.cpp:5464
float ship_max_hull_strength
Definition: ship.h:597
int message_bools
Definition: ship.h:1016
void ship_close()
Definition: ship.cpp:14146
char * manufacturer_str
Definition: ship.h:1172
float afterburner_forward_accel
Definition: ship.h:1282
float thruster_dist_rad_factor
Definition: ship.h:1390
float afterburner_reverse_accel
Definition: ship.h:1288
float ship_get_subsystem_strength(ship *shipp, int type)
Definition: ship.cpp:13446
void create_shield_explosion_all(object *objp)
Definition: shield.cpp:838
int primary_bank_ammo[MAX_SHIP_PRIMARY_BANKS]
Definition: ship.h:121
int ship_get_subsys_index(ship *sp, char *ss_name, int error_bypass=0)
Definition: ship.cpp:13421
int * ship_replacement_textures
Definition: ship.h:751
SCP_vector< int > ai_cripple_ignores
Definition: ship.h:1041
GLboolean GLboolean GLboolean GLboolean a
Definition: Glext.h:5781
void clear()
Definition: ship.cpp:6164
int secondary_bank_capacity[MAX_SHIP_SECONDARY_BANKS]
Definition: ship.h:136
int ship_get_exp_propagates(ship *sp)
Definition: ship.cpp:16965
int ship_is_tagged(object *objp)
Definition: ship.cpp:17263
int ship_get_default_orders_accepted(ship_info *sip)
Definition: ship.cpp:5480
int wing_lookup(const char *name)
Definition: ship.cpp:12736
bool topdown_offset_def
Definition: ship.h:1415
int flags
Definition: ship.h:1227
int ship_has_energy_weapons(ship *shipp)
Definition: ship.cpp:17611
int reinforcement_index
Definition: ship.h:646
void ship_cleanup(int shipnum, int cleanup_mode)
Definition: ship.cpp:7786
int wingnum
Definition: ship.h:623
void parse_ai_target_priorities()
Definition: ship.cpp:18408
int bay_doors_anim_done_time
Definition: ship.h:775
float target_shields_delta
Definition: ship.h:656
#define MAX_STARTING_WINGS
Definition: globals.h:54
int num_secondary_banks
Definition: ship.h:100
int ship_iff_info[MAX_IFFS][MAX_IFFS]
Definition: ship.h:1433
void ship_assign_sound_all()
Definition: ship.cpp:14263
int subsys_disrupted_flags
Definition: ship.h:698
int disruption_timestamp
Definition: ship.h:371
int explosion_propagates
Definition: ship.h:1238
int ship_secondary_bank_has_ammo(int shipnum)
Definition: ship.cpp:14741
int departure_cue
Definition: ship.h:1549
float min_engine_vol
Definition: ship.h:1419
#define MAX_WEAPON_TYPES
Definition: globals.h:73
float length
Definition: ship.h:1492
float min_speed
Definition: ship.h:1230
int Player_ship_class
Definition: ship.cpp:157
int persona_index
Definition: ship.h:696
int shader_effect
Definition: ship.h:2005
int primary_animation_done_time[MAX_SHIP_PRIMARY_BANKS]
Definition: ship.h:153
int Show_shield_mesh
Definition: shield.cpp:27
float variance
Definition: ship.h:973
int weapon_bools
Definition: ship.h:1026
char TVT_wing_names[MAX_TVT_WINGS][NAME_LENGTH]
Definition: ship.cpp:141
float damage_ship[MAX_DAMAGE_SLOTS]
Definition: ship.h:694
trail_info ab_info[MAX_SHIP_CONTRAILS]
Definition: ship.h:759
SCP_string default_team_name
Definition: ship.h:1366
int warpout_snd_end
Definition: ship.h:1218
float min_vel
Definition: ship.h:983
#define MAX_AI_GOALS
Definition: ai.h:91
float max_accel
Definition: ship.h:1230
int warptype_match(char *p)
Definition: ship.cpp:629
int next_tertiary_fire_stamp
Definition: ship.h:117
#define MAX_SHIP_HITS
Definition: ship.h:56
int num_turret_swarm_info
Definition: ship.h:671
int n_subsystems
Definition: ship.h:1270
struct thruster_particles thruster_particles
bool ship_has_sound(object *objp, GameSoundsIndex id)
Specifies if a ship has a custom sound for the specified id.
Definition: ship.cpp:18636
generic_bitmap afterburner_trail
Definition: ship.h:1369
int Ai_render_debug_flag
Definition: ship.cpp:113
int sub_expl_sound_handle[NUM_SUB_EXPL_HANDLES]
Definition: ship.h:707
vec3d departure_rvec
Definition: ship.h:1153
char * ship_length
Definition: ship.h:1177
int total_departed
Definition: ship.h:1534
float debris_max_lifetime
Definition: ship.h:1258
int special_exp_deathroll_time
Definition: ship.h:591
trail * ABtrail_ptr[MAX_SHIP_CONTRAILS]
Definition: ship.h:758
fix radar_last_contact
Definition: ship.h:807
float current_max_speed
Definition: ship.h:641
SCP_vector< ai_target_priority > Ai_tp_list
Definition: ship.cpp:396
char cargo1
Definition: ship.h:549
float reorient_max_rot_angle
Definition: ship.h:1143
EModelAnimationPosition primary_animation_position[MAX_SHIP_PRIMARY_BANKS]
Definition: ship.h:151
model_subsystem beam_sys_info
Definition: ship.h:744
int warpout_snd_start
Definition: ship.h:1217
float primary_rotate_ang[MAX_SHIP_PRIMARY_BANKS]
Definition: ship.h:786
int uses
Definition: ship.h:85
#define MAX_DAMAGE_SLOTS
Definition: ship.h:516
float warpout_accel_exp
Definition: ship.h:1222
int cockpit_model_num
Definition: ship.h:1188
char * type_str
Definition: ship.h:1169
Definition: bmpman.h:101
int engine_recharge_index
Definition: ship.h:639
int warpin_snd_end
Definition: ship.h:1209
float max_shield_strength
Definition: ship.h:1310
int ship_get_random_ship_in_wing(int wingnum, int flags=SHIP_GET_ANY_SHIP, float max_dist=0.0f, int get_first=0)
Definition: ship.cpp:14623
int secondary_bank_weapons[MAX_SHIP_SECONDARY_BANKS]
Definition: ship.h:104
void shield_hit_init()
Definition: shield.cpp:131
int ship_class_query_general_type(int ship_class)
Definition: ship.cpp:14485
int arc_timestamp[MAX_SHIP_ARCS]
Definition: ship.h:712
int type_count
Definition: ship.h:417
int ship_find_exited_ship_by_name(char *name)
Definition: ship.cpp:5338
float thruster_glow_frame
Definition: ship.h:682
int ship_dumbfire_threat(ship *sp)
Definition: ship.cpp:15078
void ship_model_start(object *objp)
Definition: ship.cpp:13012
int bay_doors_wanting_open
Definition: ship.h:777
#define MAX_PLAYERS
Definition: pstypes.h:32
void ship_subsys_set_name(ship_subsys *ss, char *n_name)
Definition: ship.cpp:15017
int * Player_cockpit_textures
Definition: ship.cpp:125
int ship_fire_tertiary(object *objp)
int current_count
Definition: ship.h:1530
int current_viewpoint
Definition: ship.h:756
float aggregate_current_hits
Definition: ship.h:419
matrix eye_orient
Definition: fredrender.cpp:112
int ship_class
Definition: ship.h:856
float max_rear_vel
Definition: ship.h:1200
vec3d closeup_pos
Definition: ship.h:1327
struct man_thruster man_thruster
int collision_damage_type_idx
Definition: ship.h:798
float * shield_integrity
Definition: ship.h:634
int subsys_cargo_name
Definition: ship.h:373
void ship_set_default_weapons(ship *shipp, ship_info *sip)
Definition: ship.cpp:9392
int callsign_index
Definition: ship.h:557
int ship_docking_valid(int docker, int dockee)
Definition: ship.cpp:14494
float landing_min_angle
Definition: ship.h:1132
float current_hits
Definition: ship.h:319
float fog_complete_dist
Definition: ship.h:1032
ship_obj Ship_obj_list
Definition: ship.cpp:162
int turret_targeting_order[NUM_TURRET_ORDER_TYPES]
Definition: ship.h:341
int flags2
Definition: ship.h:1228
bool scripting_target_override
Definition: ship.h:345
int large_ship_blowup_index
Definition: ship.h:706
int secondary_bank_ammo_capacity[MAX_SHIP_SECONDARY_BANKS]
Definition: ship.h:1300
int armor_type_idx
Definition: ship.h:325
void ship_page_out_textures(int ship_index, bool release=false)
Definition: ship.cpp:16711
Definition: ship.h:534
int num_nondark_colors
Definition: ship.h:1358
particle_effect regular_end_particles
Definition: ship.h:1254
bool invert_timer
Definition: ship.h:2004
GLenum GLuint id
Definition: Glext.h:5156
bool ship_subsys_has_instance_name(ship_subsys *ss)
Definition: ship.cpp:15009
vec3d eye_pos
Definition: fredrender.cpp:103
char filename[MAX_FILENAME_LEN]
Definition: ship.h:271
int score
Definition: ship.h:1349
int really_final_death_time
Definition: ship.h:572
int ship_lock_threat(ship *sp)
Definition: ship.cpp:15163
ship_subsys * ship_get_indexed_subsys(ship *sp, int index, vec3d *attacker_pos=NULL)
Definition: ship.cpp:13340
float wash_intensity
Definition: ship.h:664
ship_obj * prev
Definition: ship.h:1482
char bg_filename[MAX_FILENAME_LEN]
Definition: ship.h:273
int total_destroyed
Definition: ship.h:1533
SCP_vector< texture_replace > replacement_textures
Definition: ship.h:1400
int splodeing_texture
Definition: ship.h:1396
#define MAX_NONDARK_COLORS
Definition: palman.h:43
float slide_accel
Definition: ship.h:1203
float sup_subsys_repair_rate
Definition: ship.h:1325
int bii_index_wing
Definition: ship.h:1346
float ship_class_get_length(ship_info *sip)
Definition: ship.cpp:17354
#define NOEXCEPT
Definition: clang.h:64
void ship_subsys_set_disrupted(ship_subsys *ss, int time)
Definition: ship.cpp:9053
fix time_created
Definition: ship.h:804
void ship_do_submodel_rotation(ship *shipp, model_subsystem *psub, ship_subsys *pss)
Definition: ship.cpp:17553
float ship_get_exp_outer_rad(object *ship_objp)
Definition: ship.cpp:16970
void ship_actually_depart(int shipnum, int method=SHIP_DEPARTED_WARP)
Definition: ship.cpp:7748
trail_info ct_info[MAX_SHIP_CONTRAILS]
Definition: ship.h:1354
int secondary_bank_ammo[MAX_SHIP_SECONDARY_BANKS]
Definition: ship.h:134
int primary_bank_ammo_capacity[MAX_SHIP_PRIMARY_BANKS]
Definition: ship.h:1296
int primary_out_of_ammo(ship_weapon *swp, int bank)
Definition: ship.cpp:12291
float assist_score_pct
Definition: ship.h:543
char cockpit_pof_file[MAX_FILENAME_LEN]
Definition: ship.h:1181
trail * trail_ptr[MAX_SHIP_CONTRAILS]
Definition: ship.h:721
float min_life
Definition: ship.h:981
int ship_get_SIF(ship *shipp)
Definition: ship.cpp:16096
vec3d norm
Definition: ship.h:1102
SCP_vector< thruster_particles > afterburner_thruster_particles
Definition: ship.h:1377
int obj_signature
Definition: ship.h:855
int wave_count
Definition: ship.h:1527
int radar_image_size
Definition: ship.h:1430
vec3d rotation_time
Definition: ship.h:1198
void ship_delete(object *objp)
Definition: ship.cpp:7585
int damage_ship_id[MAX_DAMAGE_SLOTS]
Definition: ship.h:695
char Starting_wing_names[MAX_STARTING_WINGS][NAME_LENGTH]
Definition: ship.cpp:139
int shield_impact_explosion_anim
Definition: ship.h:1443
int was_firing_last_frame[MAX_SHIP_PRIMARY_BANKS]
Definition: ship.h:745
void ship_do_cargo_revealed(ship *shipp, int from_network=0)
Definition: ship.cpp:16138
float sup_hull_repair_rate
Definition: ship.h:1323
int turret_max_bomb_ownage
Definition: ship.h:403
int ship_is_beginning_warpout_speedup(object *objp)
Definition: ship.cpp:17334
long fix
Definition: pstypes.h:54
GLclampd n
Definition: Glext.h:7286
bool glide_dynamic_cap
Definition: ship.h:1408
int ship_engine_ok_to_warp(ship *sp)
Definition: ship.cpp:14783
unsigned char ubyte
Definition: pstypes.h:62
float autoaim_fov
Definition: ship.h:1413
int radar_color_image_2d_idx
Definition: ship.h:1429
int ship_do_rearm_frame(object *objp, float frametime)
Definition: ship.cpp:13664
Definition: object.h:141
SCP_vector< SCP_string > ai_actively_pursues_temp
Definition: ship.h:1050
float primary_bank_fof_cooldown[MAX_SHIP_PRIMARY_BANKS]
Definition: ship.h:128
int turret_swarm_num
Definition: ship.h:356
void ship_recalc_subsys_strength(ship *shipp)
Definition: ship.cpp:6020
fix next_aim_pos_time
Definition: ship.h:394
ubyte shield_color[3]
Definition: ship.h:1362
void ship_clear_ship_type_counts()
Definition: ship.cpp:14436
char warpin_anim[MAX_FILENAME_LEN]
Definition: ship.h:1206
float max_life
Definition: ship.h:982
int cmeasure_type
Definition: ship.h:1290
int next_corkscrew_fire
Definition: ship.h:566
int shield_armor_type_idx
Definition: ship.h:797
int Num_reinforcements
Definition: ship.cpp:121
SCP_map< SCP_string, path_metadata > pathMetadata
Definition: ship.h:1453
void physics_ship_init(object *objp)
Definition: ship.cpp:5366
float emp_resistance_mod
Definition: ship.h:1440
int num_waves
Definition: ship.h:1522
SCP_string team_name
Definition: ship.h:812
int damage_ship_id[MAX_DAMAGE_SLOTS]
Definition: ship.h:864
int armor_type_get_idx(char *name)
Definition: ship.cpp:18332
RadarVisibility radar_last_status
Definition: ship.h:809
int red_alert_skipped_ships
Definition: ship.h:1529
int ship_guardian_threshold
Definition: ship.h:601
bool use_shockwave
Definition: ship.h:589
vec3d Original_vec_to_deader
Definition: shiphit.cpp:68
int damage_type_add(char *name)
Definition: ship.cpp:17749
int hud_target_lod
Definition: ship.h:1191
int last_secondary_fire_stamp[MAX_SHIP_SECONDARY_BANKS]
Definition: ship.h:116
char * armor_str
Definition: ship.h:1171
char * ship_return_orders(char *outbuf, ship *sp)
Definition: ship.cpp:15201
int ship_starting_wing_lookup(const char *wing_name)
Definition: ship.cpp:17624
SCP_vector< ArmorType > Armor_types
Definition: ship.cpp:170
GLuint start
Definition: Gl.h:1502
void ship_primary_changed(ship *sp)
Definition: ship.cpp:15996
int do_facing_check(const vec3d *norm, vertex **vertlist, const vec3d *p)
Definition: 3ddraw.cpp:166
SCP_unordered_map< int, void * > glowpoint_bank_override_map
Definition: ship.h:1455
int ship_get_num_subsys(ship *shipp)
Definition: ship.cpp:17046
float target_weapon_energy_delta
Definition: ship.h:657
int flag
Definition: ship.h:424
float intensity
Definition: ship.h:1493
void ship_process_pre(object *objp, float frametime)
Definition: ship.cpp:9128
float thruster01_glow_rad_factor
Definition: ship.h:1386
int CLOAKMAP
Definition: ship.cpp:14145
int targeting_laser_objnum
Definition: ship.h:561
void ship_maybe_tell_about_rearm(ship *sp)
Definition: ship.cpp:15913
void ship_draw_shield(object *objp)
Definition: shield.cpp:879
int special_warpout_objnum
Definition: ship.h:741
float max_speed
Definition: ship.h:1230
ship_type_info()
Definition: ship.h:1053
int collision_damage_type_idx
Definition: ship.h:1233
int shield_point_augment_ctrls[4]
Definition: ship.h:1316
bool newtonian_damp_override
Definition: ship.h:1411
char cargo1
Definition: ship.h:862
int turret_animation_done_time
Definition: ship.h:352
int ship_subsys_disrupted(ship_subsys *ss)
Definition: ship.cpp:9033
char warpout_anim[MAX_FILENAME_LEN]
Definition: ship.h:1215
int num_secondary_banks
Definition: ship.h:1298
GLuint const GLchar * name
Definition: Glext.h:5608
struct particle_effect particle_effect
int departure_path_mask
Definition: ship.h:1548
int thruster_glow_anim_load(generic_anim *ga)
Definition: ship.cpp:8506
void ship_add_ship_type_kill_count(int ship_info_index)
Definition: ship.cpp:14462
int secondary_bank_rearm_time[MAX_SHIP_SECONDARY_BANKS]
Definition: ship.h:138
float warpin_decel_exp
Definition: ship.h:1212
vec3d turret_last_fire_direction
Definition: ship.h:334
float death_roll_time_mult
Definition: ship.h:1243
int bii_index_ship
Definition: ship.h:1344
int final_death_time
Definition: ship.h:569
man_thruster maneuvering[MAX_MAN_THRUSTERS]
Definition: ship.h:1426
float thruster02_glow_len_factor
Definition: ship.h:1389
float debris_max_speed
Definition: ship.h:1023
int ship_subsystem_in_sight(object *objp, ship_subsys *subsys, vec3d *eye_pos, vec3d *subsys_pos, int do_facing_check=1, float *dot_out=NULL, vec3d *vec_out=NULL)
Definition: ship.cpp:14881
int get_quadrant(vec3d *hit_pnt, object *shipobjp=NULL)
Definition: shield.cpp:988
void shield_point_multi_setup()
Definition: shield.cpp:817
float gun_rotation_rate_pct
Definition: ship.h:380
int total
Definition: ship.h:1591
int ai_valid_goals
Definition: ship.h:1035
float total_damage_received
Definition: ship.h:693
#define TOKEN_LENGTH
Definition: globals.h:41
ushort net_signature
Definition: ship.h:1560
SCP_vector< SCP_string > ai_cripple_ignores_temp
Definition: ship.h:1051
thrust_pair thruster_flame_info
Definition: ship.h:1380
SCP_vector< cockpit_display_info > displays
Definition: ship.h:1451
int shield_hits
Definition: ship.h:660
int target
Definition: ship.h:258
void ship_maybe_scream(ship *sp)
Definition: ship.cpp:15789
int next_manage_ets
Definition: ship.h:642
int get_nearest_bbox_point(object *ship_obj, vec3d *start, vec3d *box_pt)
Definition: ship.cpp:18664
int num_maneuvering
Definition: ship.h:1425
ship_subsys * ship_get_subsys(ship *shipp, char *subsys_name)
Definition: ship.cpp:17024
float turret_time_enemy_in_range
Definition: ship.h:340
int death_roll_snd
Definition: ship.h:675
void add_shield_point(int objnum, int tri_num, vec3d *hit_pos)
Definition: shield.cpp:779
int special_shield
Definition: ship.h:594
int get_max_ammo_count_for_bank(int ship_class, int bank, int ammo_type)
Definition: ship.cpp:16279
int parent_objnum
Definition: ship.h:316
int total_arrived_count
Definition: ship.h:1528
int arrival_delay
Definition: ship.h:87
GLuint GLuint num
Definition: Glext.h:9089
float warpin_speed
Definition: ship.h:1210
char alt_name[NAME_LENGTH]
Definition: ship.h:1164
int damage_lightning_type
Definition: ship.h:1445
int get_max_ammo_count_for_turret_bank(ship_weapon *swp, int bank, int ammo_type)
Definition: ship.cpp:16299
float power_output
Definition: ship.h:1274
int primitive_sensor_range
Definition: ship.h:748
fix base_texture_anim_frametime
Definition: ship.h:691
int next_fireball
Definition: ship.h:578
ship_type_info * ship_get_type_info(object *objp)
Definition: ship.cpp:16121
int secondary_next_slot[MAX_SHIP_SECONDARY_BANKS]
Definition: ship.h:137
float debris_damage_mult
Definition: ship.h:1266
int arrival_cue
Definition: ship.h:1543
int turret_next_fire_pos
Definition: ship.h:339
float emp_multiplier
Definition: ship.h:1028
float tag_left
Definition: ship.h:725
float favor_current_facing
Definition: ship.h:343
char anim_filename[MAX_FILENAME_LEN]
Definition: ship.h:1340
vec3d last_aim_enemy_vel
Definition: ship.h:396
void compute_slew_matrix(matrix *orient, angles *a)
Definition: ship.cpp:6546
int model_num_hud
Definition: ship.h:1190
#define NAME_LENGTH
Definition: globals.h:15
int ship_find_num_crewpoints(object *objp)
Definition: ship.cpp:13128
char splodeing_texture_name[MAX_FILENAME_LEN]
Definition: ship.h:1397
GLubyte GLubyte GLubyte GLubyte w
Definition: Glext.h:5679
void ship_render_show_ship_cockpit(object *objp)
Definition: ship.cpp:7322
int check_world_pt_in_expanded_ship_bbox(vec3d *world_pt, object *objp, float delta_box)
Definition: ship.cpp:17241
struct path_metadata path_metadata
int engine_snd
Definition: ship.h:1418
int tex_nframes
Definition: ship.h:1097
void shield_frame_init()
Definition: shield.cpp:173
int TVT_wings[MAX_TVT_WINGS]
Definition: ship.cpp:136
int ship_stop_fire_primary(object *obj)
Definition: ship.cpp:10711
bool hud_enabled
Definition: ship.h:1448
char short_name[NAME_LENGTH]
Definition: ship.h:1165
#define SHIP_GET_ANY_SHIP
Definition: ship.h:1786
void ship_get_global_turret_gun_info(object *objp, ship_subsys *ssp, vec3d *gpos, vec3d *gvec, int use_angles, vec3d *targetp)
Definition: aiturret.cpp:1327
void ship_update_artillery_lock()
Definition: ship.cpp:17146
ubyte awacs_warning_flag
Definition: ship.h:737
int tex_fps
Definition: ship.h:1098
int special_ship
Definition: ship.h:1537
int last_fired_point[MAX_SHIP_PRIMARY_BANKS]
Definition: ship.h:771
struct ship_collision_physics ship_collision_physics
int external_model_fp_counter[MAX_SHIP_PRIMARY_BANKS+MAX_SHIP_SECONDARY_BANKS]
Definition: ship.h:157
vec3d wash_rot_axis
Definition: ship.h:665
float prop_exp_rad_mult
Definition: ship.h:1240
int departure_location
Definition: ship.h:1546
struct ship_type_info ship_type_info
float weapon_model_draw_distance
Definition: ship.h:1304
void ship_do_cap_subsys_cargo_revealed(ship *shipp, ship_subsys *subsys, int from_network=0)
Definition: ship.cpp:16161
#define MAX_SHIP_ARCS
Definition: ship.h:517
int warpout_engage_time
Definition: ship.h:1219
float both_small_bounce
Definition: ship.h:1117
char * GetNamePtr()
Definition: ship.h:220
ubyte nondark_colors[MAX_NONDARK_COLORS][3]
Definition: ship.h:1359
unsigned short ushort
Definition: pstypes.h:63
ship_subsys * targeted_subsys
Definition: ship.h:344
float max_weapon_regen_per_second
Definition: ship.h:1278
int reinforcement_index
Definition: ship.h:1519
bool turret_adv_fov_test(ship_subsys *ss, vec3d *gvec, vec3d *v2e, float size_mod=0)
Definition: aiturret.cpp:2851
int wave_delay_timestamp
Definition: ship.h:1554
void clone(const ship_info &other)
Definition: ship.cpp:670
int ship_get_random_player_wing_ship(int flags=SHIP_GET_ANY_SHIP, float max_dist=0.0f, int persona_index=-1, int get_first=0, int multi_team=-1)
Definition: ship.cpp:14508
bool shader_effect_active
Definition: ship.h:769
float apply_damage_to_shield(object *objp, int quadrant, float damage)
Definition: shield.cpp:644
int ship_get_num_ships()
Definition: ship.cpp:522
float fog_start_dist
Definition: ship.h:1031
struct ship_subsys_info ship_subsys_info
int Squadron_wings[MAX_SQUADRON_WINGS]
Definition: ship.cpp:135
int departure_delay
Definition: ship.h:1550
int ship_info_index
Definition: ship.h:539
float death_fx_r_mult
Definition: ship.h:1242
GLfloat GLfloat p
Definition: Glext.h:8373
#define MAX_REINFORCEMENTS
Definition: ship.h:58
int ship_fire_secondary(object *objp, int allow_swarm=0)
Definition: ship.cpp:11799
char * missile_banks
Definition: ship.h:1179
int secondary_animation_done_time[MAX_SHIP_SECONDARY_BANKS]
Definition: ship.h:154
float glide_cap
Definition: ship.h:1407
vec3d afterburner_max_vel
Definition: ship.h:1281
ship_subsys * last_targeted_subobject[MAX_PLAYERS]
Definition: ship.h:631
int bay_doors_parent_shipnum
Definition: ship.h:782
int departure_delay
Definition: ship.h:621
bool turret_std_fov_test(ship_subsys *ss, vec3d *gvec, vec3d *v2e, float size_mod=0)
Definition: aiturret.cpp:2841
particle_effect damage_spew
Definition: ship.h:1251
float debris_min_hitpoints
Definition: ship.h:1264
SCP_vector< DamageTypeStruct > Damage_types
Definition: ship.cpp:171
void ship_render_cockpit(object *objp)
Definition: ship.cpp:7272
float GetPiercingLimit(int damage_type_idx)
Definition: ship.cpp:18163
int ship_create(matrix *orient, vec3d *pos, int ship_type, char *ship_name=NULL)
Definition: ship.cpp:9690
#define MAX_MAN_THRUSTERS
Definition: ship.h:521
float afterburner_max_reverse_vel
Definition: ship.h:1287
int ab_count
Definition: ship.h:760
char docker[NAME_LENGTH]
hull_check pos
Definition: lua.cpp:5050
char * maneuverability_str
Definition: ship.h:1170
int thruster_bitmap
Definition: ship.h:678
void ship_set_new_ai_class(int ship_num, int new_ai_class)
Definition: ship.cpp:17362
GLsizei GLsizei GLuint * obj
Definition: Glext.h:5619
float ship_recoil_modifier
Definition: ship.h:1307
float thruster_dist_len_factor
Definition: ship.h:1391
float warpin_radius
Definition: ship.h:1207
void free_strings()
Definition: ship.cpp:1264
int armor_type_idx
Definition: ship.h:796
int debris_damage_type_idx
Definition: ship.h:1263
int turret_best_weapon
Definition: ship.h:333
int n_high
Definition: ship.h:978
float ship_get_max_speed(ship *shipp)
Definition: ship.cpp:17279
float auto_shield_spread
Definition: ship.h:1311
int departure_path_mask
Definition: ship.h:619
int threshold
Definition: ship.h:1523
int ai_active_dock
Definition: ship.h:1038
int arc_next_time
Definition: ship.h:714
float max_rad
Definition: ship.h:980
void ship_maybe_warn_player(ship *enemy_sp, float dist)
Definition: ship.cpp:15457
particle_effect knossos_end_particles
Definition: ship.h:1253
bool draw_secondary_models[MAX_SHIP_SECONDARY_BANKS]
Definition: ship.h:1303
#define MAX_SHIP_CONTRAILS
Definition: ship.h:520
void ship_page_in()
Definition: ship.cpp:16318
SCP_vector< int > ai_actively_pursues
Definition: ship.h:1040
int team
Definition: ship.h:857
int arrival_anchor
Definition: ship.h:612
char * ship_return_time_to_goal(char *outbuf, ship *sp)
Definition: ship.cpp:15294
struct engine_wash_info engine_wash_info
SCP_vector< int > weapon_class
Definition: ship.h:829
void ship_get_eye(vec3d *eye_pos, matrix *eye_orient, object *obj, bool do_slew=true, bool from_origin=false)
Definition: ship.cpp:13227
int ammo_low_complaint_count
Definition: ship.h:795
SCP_vector< int > ship_type
Definition: ship.h:827
matrix world_to_turret_matrix
Definition: ship.h:386
void ParseData()
Definition: ship.cpp:18201
float damage_ship[MAX_DAMAGE_SLOTS]
Definition: ship.h:863
int triggered_rotation_index
Definition: ship.h:376
ushort debris_net_sig
Definition: ship.h:800
Definition: ai.h:134
uint flags2
Definition: ship.h:645
#define MAX_IFFS
Definition: globals.h:34
vec3d arc_pts[MAX_SHIP_ARCS][2]
Definition: ship.h:711
int special_hitpoints
Definition: ship.h:593
bool hud_retail
Definition: ship.h:1449
void ship_page_in_textures(int ship_index=-1)
Definition: ship.cpp:16635
ship_collision_physics collision_physics
Definition: ship.h:1234
SCP_vector< int > explosion_bitmap_anims
Definition: ship.h:1047
int team_change_time
Definition: ship.h:815
float radius
Definition: ship.h:1100
WarpEffect * warpin_effect
Definition: ship.h:575
float forward_decel
Definition: ship.h:1202
float subsys_repair_rate
Definition: ship.h:1321
int special_exp_damage
Definition: ship.h:585
int departure_cue
Definition: ship.h:620
int primary_bank_rearm_time[MAX_SHIP_PRIMARY_BANKS]
Definition: ship.h:125
int thruster_distortion_bitmap
Definition: ship.h:687
float closeup_zoom
Definition: ship.h:1328
int shader_effect_num
Definition: ship.h:766
void ship_add_cockpit_display(cockpit_display_info *display, int cockpit_model_num)
Definition: ship.cpp:7409
int arrival_path_mask
Definition: ship.h:613
float delta_bank_const
Definition: ship.h:1195
SCP_vector< int > explosion_bitmap_anims
Definition: ship.h:1247
float variance
Definition: ship.h:985
float glide_accel_mult
Definition: ship.h:1409
int respawn_priority
Definition: ship.h:544
char * Turret_target_order_names[NUM_TURRET_ORDER_TYPES]
Definition: aiturret.cpp:50
int primary_bank_start_ammo[MAX_SHIP_PRIMARY_BANKS]
Definition: ship.h:122
struct ship_effect ship_effect
int scan_time
Definition: ship.h:1351
int turret_swarm_info_index[MAX_TFP]
Definition: ship.h:355
char targeting_laser_bank
Definition: ship.h:560
int shield_armor_type_idx
Definition: ship.h:1404
uint create_time
Definition: ship.h:701
float afterburner_trail_life
Definition: ship.h:1372
int arrival_cue
Definition: ship.h:614
float max_hull_strength
Definition: ship.h:1309
int swarm_missile_bank
Definition: ship.h:672
float length
Definition: ship.h:1099
void object_jettison_cargo(object *objp, object *cargo_objp)
Definition: ship.cpp:16911
int last_fired_weapon_signature
Definition: ship.h:146
#define SUBSYSTEM_MAX
Definition: model.h:64
int current_tertiary_bank
Definition: ship.h:108
int ship_squadron_wing_lookup(const char *wing_name)
Definition: ship.cpp:17636
bool bay_doors_need_open
Definition: ship.h:781
int tex_id
Definition: ship.h:1096
int collision_lod
Definition: ship.h:1187
bool ship_fighterbays_all_destroyed(ship *shipp)
Definition: ship.cpp:17494
float rotdamp
Definition: ship.h:1194
int stop_snd
Definition: ship.h:1094
bool turret_fov_test(ship_subsys *ss, vec3d *gvec, vec3d *v2e, float size_mod=0)
Definition: aiturret.cpp:2873
fix time_gone
Definition: ship.h:1525
ship * Player_ship
Definition: ship.cpp:124
int valid_cap_subsys_cargo_list(char *subsys_name)
Definition: ship.cpp:16984
int turret_enemy_objnum
Definition: ship.h:337
float ship_get_secondary_weapon_range(ship *shipp)
Definition: ship.cpp:16238
int ship_query_state(char *name)
Definition: ship.cpp:12945
void ship_process_targeting_lasers()
Definition: ship.cpp:11611
float thruster_frame
Definition: ship.h:679
struct ship_obj ship_obj
int current_cmeasure
Definition: ship.h:652
vec3d max_rotvel
Definition: ship.h:1197
int background
Definition: ship.h:261
vec3d max_vel
Definition: ship.h:1196
int ship_class_compare(int ship_class_1, int ship_class_2)
Definition: ship.cpp:17715
void ship_subsystem_delete(ship *shipp)
void ship_set_eye(object *obj, int eye_index)
Definition: ship.cpp:13197
int warpout_time
Definition: ship.h:1221
int ship_get_sound(object *objp, GameSoundsIndex id)
Returns a ship-specific sound index.
Definition: ship.cpp:18614
char overhead_filename[MAX_FILENAME_LEN]
Definition: ship.h:1341
struct exited_ship exited_ship
float death_roll_r_mult
Definition: ship.h:1241
SCP_vector< ship_counts > Ship_type_counts
Definition: ship.cpp:401
float afterburner_recover_rate
Definition: ship.h:1285
float autoaim_fov
Definition: ship.h:817
float landing_max_rot_angle
Definition: ship.h:1133
int TARGET_SHIP_IGNORE_FLAGS
Definition: hudtarget.cpp:49
int radar_image_2d_idx
Definition: ship.h:1428
int ship_bools
Definition: ship.h:1022
float max_shield_recharge
Definition: ship.h:599
int num_hits
Definition: ship.h:581
struct ship_weapon ship_weapon
int death_time
Definition: ship.h:570
void clear()
Definition: ship.cpp:17768
bool disables_rendering
Definition: ship.h:2003
int ship_primary_bank_has_ammo(int shipnum)
Definition: ship.cpp:14764
float max_shield_recharge
Definition: ship.h:1318
int shield_recharge_index
Definition: ship.h:637
particle_effect impact_spew
Definition: ship.h:1250
int ship_tvt_wing_lookup(const char *wing_name)
Definition: ship.cpp:17660
int burst_counter[MAX_SHIP_PRIMARY_BANKS+MAX_SHIP_SECONDARY_BANKS]
Definition: ship.h:156
#define stricmp(s1, s2)
Definition: config.h:271
int get_max_ammo_count_for_primary_bank(int ship_class, int bank, int ammo_type)
Definition: ship.cpp:16262
int primary_bank_slot_count[MAX_SHIP_PRIMARY_BANKS]
Definition: ship.h:131
int wing_name_lookup(const char *name, int ignore_count=0)
Definition: ship.cpp:12706
int cmeasure_count
Definition: ship.h:651
int ship_launch_countermeasure(object *objp, int rand_val=-1)
Definition: ship.cpp:10421
vec3d pos
Definition: ship.h:524
int end_death_time
Definition: ship.h:571
char ship_name[NAME_LENGTH]
Definition: ship.h:604
int allowed_weapons[MAX_WEAPON_TYPES]
Definition: ship.h:1330
int ai_class
Definition: ship.h:1229
fix radar_visible_since
Definition: ship.h:806
int special_exp_shockwave_speed
Definition: ship.h:590
vec3d cockpit_offset
Definition: ship.h:1182
int arrival_distance
Definition: ship.h:611
float afterburner_burn_rate
Definition: ship.h:1284
int get_default_player_ship_index()
Returns the index of the default player ship.
Definition: ship.cpp:4862
thrust_pair_bitmap thruster_distortion_info
Definition: ship.h:1384
void armor_init()
Definition: ship.cpp:18394
int selection_effect
Definition: ship.h:1342
size_t primary_bank_pattern_index[MAX_SHIP_PRIMARY_BANKS]
Definition: ship.h:159
int last_fired_weapon_index
Definition: ship.h:145
float GetDamage(float damage_applied, int in_damage_type_idx, float diff_dmg_scale)
Definition: ship.cpp:17923
float thruster02_glow_rad_factor
Definition: ship.h:1387
float rof_scaler
Definition: ship.h:399
unsigned int obj_flags
Definition: ship.h:831
float sup_shield_repair_rate
Definition: ship.h:1324
float convergence_distance
Definition: ship.h:1437
int debris_damage_type_idx
Definition: ship.h:799
int ship_find_num_turrets(object *objp)
Definition: ship.cpp:13164
int thrusters_start[MAX_MAN_THRUSTERS]
Definition: ship.h:788
int last_fired_weapon_info_index
Definition: ship.h:346
EModelAnimationPosition
Definition: modelanim.h:46
char * gun_mounts
Definition: ship.h:1178
bool draw_distortion
Definition: ship.h:1394
struct wing wing
SCP_map< GameSoundsIndex, int > ship_sounds
Definition: ship.h:1423
particle_effect split_particles
Definition: ship.h:1252
size_t secondary_bank_pattern_index[MAX_SHIP_SECONDARY_BANKS]
Definition: ship.h:160
float secondary_point_reload_pct[MAX_SHIP_SECONDARY_BANKS][MAX_SLOTS]
Definition: ship.h:784
float afterburner_trail_alpha_factor
Definition: ship.h:1371
float auto_shield_spread_min_span
Definition: ship.h:1314
int arrival_delay
Definition: ship.h:615
float hull_repair_rate
Definition: ship.h:1320
int num_primary_banks
Definition: ship.h:1293
int flags
Definition: ship.h:1556
float max_shield_regen_per_second
Definition: ship.h:1277
struct cockpit_display_info cockpit_display_info
int ai_bools
Definition: ship.h:1037
ArmorType(char *in_name)
Definition: ship.cpp:18191
int next_swarm_path
Definition: ship.h:670
float min_rad
Definition: ship.h:969
generic_anim thruster_bitmap
Definition: ship.h:968
void ship_secondary_changed(ship *sp)
Definition: ship.cpp:16053
#define MAX_SHIP_DETAIL_LEVELS
Definition: ship.h:57
char * tech_desc
Definition: ship.h:1174
SCP_vector< man_thruster_renderer > Man_thrusters
Definition: ship.cpp:6661
float debris_min_rotspeed
Definition: ship.h:1261
int primary_next_slot[MAX_SHIP_PRIMARY_BANKS]
Definition: ship.h:124
ship_subsys * ship_get_closest_subsys_in_sight(ship *sp, int subsys_type, vec3d *attacker_pos)
Definition: ship.cpp:14963
SCP_vector< int > ship_class
Definition: ship.h:828