|
Wing Commander
Reconstructed Win32 source (1996)
|
Ships: damage, explosions and weapons. More...
Go to the source code of this file.
Functions | |
| short | initialize_object (short obj, enum ObjectType type, short owner) |
| short | borrow_dust (void) |
| short | new_object (enum ObjectType type, short owner) |
| short | initialize_ship (enum ObjectType type, short owner) |
| short | any_selected (signed char *loadout, enum ObjectClass objectClass) |
| unsigned int | remove_weapon (short obj, short weapon) |
| void | set_objects_data (short obj, enum ObjectType type, short owner) |
| unsigned int | match_rotation_goal (short *rotation, short *goal, short totalError, short rate) |
| int | rotate_object_to_goal (short obj) |
| unsigned int | check_for_lost_control (short obj) |
| unsigned int | celerate (short ship, int delta) |
| unsigned int | approach_speed (short ship, int targetSpeed) |
| unsigned int | steady_object (short ship) |
| short | real_velocity (short obj) |
| unsigned int | fix_velocity (short obj) |
| unsigned int | sort_viable_target_list (void) |
| void | send_appropriate_message (short attacker, short victim) |
| int | inflict_damage (short attacker, short victim, short damage, const FixedVector *impactDirection) |
| short | pilot_hit (short obj) |
| int | onboard_explosion (short obj) |
| void | call_enemy (short obj) |
| int | internal_damage (short attacker, short victim, short damage, short quadrant) |
| void | revise_shields (short obj) |
| int | your_internal_damage (short attacker, short damage, short quadrant) |
| unsigned int | check_computer_damage (void) |
| short | ReportComponentRepaired (short component, short minimumDamage) |
| void | repair_internal_damage (void) |
| void | Create_ship_hit_debris (short obj, short count) |
| void | check_next_wave (void) |
| unsigned int | Create_explosion_debris (short obj) |
| unsigned int | affect_mission_score (short pilot, int event, short amount) |
| unsigned int | score_for_kill (short pilot, short victim) |
| unsigned int | analyze_kill (short attacker, short victim) |
| short | ShipExplosion (short obj) |
| short | Explosion (short obj) |
| short | the_creator (short obj) |
| int | explosion_shock_wave (short obj, short blastDamage) |
| int | explode (short attacker, short victim) |
| int | send_at_point (short obj, FixedVector *point, short speed) |
| short | find_child_object (short parent, enum ObjectClass objectClass) |
| short | find_child_ship (short parent, enum ObjectClass objectClass, short target) |
| int | launch_object (short parent, short child, FixedVector direction, short speed) |
| void | fire (short obj, short target) |
| short | hemisphere (FixedVector *target, FixedVector *parent, FixedVector *hardpoint) |
| int | fire_flack (short owner, short explosion, short range, FixedVector *aim) |
| short | rnd_sign (short v) |
| int | rnd_aim (short radius, short speed, short maximum) |
| short | pop_flack (short obj, short range, FixedVector *hardpoint) |
| short | build_target_list (short obj, short range) |
| int | fire_turrets (short obj) |
| int | fire_weapon (short obj, short weapon) |
| short | find_weapon (short obj, enum ObjectType weaponType) |
| int | fire_missile (short ship) |
| int | fire_fixed_projectile_weapon (short obj) |
| int | drop_mine (short obj, signed char weapon, enum ObjectType type, short lifetime) |
| void | fire_afterburner (short obj, short time) |
| unsigned int | fire_super_brake (short ship) |
| short | flip_angle (short ship, short angle) |
| unsigned int | place_exhaust_on_ships (void) |
| unsigned int | reposition_fixed_child_objects (void) |
| unsigned int | housekeep_power_plant_and_fuel (short ship) |
| unsigned int | replenish_shields (short ship) |
| unsigned int | replenish_weapon_energy_bank (short ship) |
| void | accelerate (short amount) |
| void | your_afterburner (void) |
Variables | |
| short | asPlayerDamageSystemTable [50] |
| static enum ObjectType | aaeExplosionDebris [4][7] |
| enum ObjectType | aeShipHitDebrisTypes [3] |
| signed char | acGunRefireDelay [4] = {6, 10, 4, 0} |
| int | nMemoryConfig |
| int | dwOriginalFreeMem |
| struct Shape * | pMouseCursorResource |
| int | nAvailableGameMemory |
| int | nSceneResourceBudgetValue |
| int | nAfterburnerSoundDeadline |
| int | bAfterburnerSfxEnabled |
Ships: damage, explosions and weapons.
Address range 41dee0-4219bf, the Mac ship compilation unit: its symbols, initialize_object through your_afterburner, map in order onto this range.
Definition in file ship.c.
| void accelerate | ( | short | amount | ) |
Definition at line 2189 of file ship.c.
References accelerate(), celerate(), malf(), nCurrentSpaceFrameValue, and PlaySfxWaveFileByNumber().
Referenced by accelerate(), HandleSpaceFlightControls(), and player_input().
| unsigned int affect_mission_score | ( | short | pilot, |
| int | event, | ||
| short | amount ) |
Definition at line 1060 of file ship.c.
References affect_mission_score(), CampaignState::missionScore, nCurrentArcadeScore, nMissionMedalScoreValue, and stCampaignState.
Referenced by affect_mission_score(), cleanup_objectives(), and score_for_kill().
| unsigned int analyze_kill | ( | short | attacker, |
| short | victim ) |
Definition at line 1151 of file ship.c.
References aeShipSide, analyze_kill(), new_space_music_changes(), nPlayerKillTotal, nWingmanKillCount, nYourWingman, score_for_kill(), and send_message().
Referenced by analyze_kill(), and explode().
| short any_selected | ( | signed char * | loadout, |
| enum ObjectClass | objectClass ) |
Definition at line 114 of file ship.c.
References any_selected(), and aObjectTypeData.
Referenced by any_selected(), and remove_weapon().
| unsigned int approach_speed | ( | short | ship, |
| int | targetSpeed ) |
Definition at line 405 of file ship.c.
References alert_flag(), anShipSpeed, approach_speed(), celerate(), GetShipAccelerationRate(), MultiplyFixed(), and SignFixed().
Referenced by approach_cruise_speed(), approach_full_speed(), approach_half_speed(), approach_min_speed(), approach_ship_speed(), approach_speed(), approach_zero_speed(), chase_location(), chase_speed(), control_speed(), Msit_n_spin(), and ShipAiState35().
| short borrow_dust | ( | void | ) |
Definition at line 78 of file ship.c.
References aeObjectClass, borrow_dust(), and OBJECT_CLASS_DUST.
Referenced by borrow_dust(), and new_object().
| void call_enemy | ( | short | obj | ) |
Definition at line 642 of file ship.c.
References acShipTargetTable, aeObjectClass, aeShipSide, aeSpecialManeuvers, call_enemy(), OBJECT_CLASS_SHIP, RandomBelow(), and SPECIAL_MANEUVER_UNKNOWN_9.
Referenced by call_enemy(), and internal_damage().
| unsigned int celerate | ( | short | ship, |
| int | delta ) |
Definition at line 390 of file ship.c.
References anShipSpeed, asShipMaximumSpeedArray, and celerate().
Referenced by accelerate(), approach_speed(), celerate(), control_speed(), and recalc_max_velocity().
| unsigned int check_computer_damage | ( | void | ) |
Definition at line 916 of file ship.c.
References check_computer_damage(), and damage_your_component().
Referenced by check_computer_damage(), and your_internal_damage().
| unsigned int check_for_lost_control | ( | short | obj | ) |
Definition at line 364 of file ship.c.
References aeObjectTypeList, aeSpecialManeuvers, anObjectRollRotationList, anObjectYawRotation, anObjPitchRot, aObjectTypeData, asObjectCounterArray, check_for_lost_control(), ObjectTypeData::pitchRate, RandomBelowOrEqual(), set_special(), skill_check(), SPECIAL_MANEUVER_BLOWING_UP, and SPECIAL_MANEUVER_UNKNOWN_9.
Referenced by apply_force_to_object(), check_for_lost_control(), and rotational_acceleration().
Definition at line 995 of file ship.c.
References aeObjectClass, aeShipSide, check_next_wave(), nCurrentWave, OBJECT_CLASS_SHIP, set_up_next_wave(), and SIDE_KILRATHI.
Referenced by check_next_wave(), Create_explosion_debris(), and report_kilrathi_rout().
| unsigned int Create_explosion_debris | ( | short | obj | ) |
Definition at line 1010 of file ship.c.
References aaeExplosionDebris, AddFixedVectors(), aeObjectClass, aeObjectTypeList, aShipPositionsArray, aShipVelocity, asObjectCounterArray, asObjScreenAngles, check_next_wave(), Create_explosion_debris(), divide_vector(), FillFixedVectorWithRandomComponents(), find_vacant_3d_object(), OBJECT_CLASS_DUST, OBJECT_TYPE_DEBRIS_DUST, RandomBelowOrEqual(), remove_object(), and set_objects_data().
Referenced by Create_explosion_debris(), and house_keep_objects().
| void Create_ship_hit_debris | ( | short | obj, |
| short | count ) |
Definition at line 968 of file ship.c.
References AddFixedVectors(), aeShipHitDebrisTypes, aShipPositionsArray, aShipVelocity, asObjectCounterArray, Create_ship_hit_debris(), FillFixedVectorWithRandomComponents(), find_vacant_3d_object(), RandomBelowOrEqual(), and set_objects_data().
Referenced by Create_ship_hit_debris(), and inflict_damage().
| int drop_mine | ( | short | obj, |
| signed char | weapon, | ||
| enum ObjectType | type, | ||
| short | lifetime ) |
Definition at line 1951 of file ship.c.
References acObjCollisionGraceTicks, aShipWeaponsTable, asObjectCounterArray, child_object(), copy_frame(), drop_mine(), ShipWeaponSlot::hardpoint, new_object(), remove_weapon(), and RemovePlayerReleaseWeapon().
Referenced by drop_mine(), drop_player_mine(), fire(), and fire_weapon().
| int explode | ( | short | attacker, |
| short | victim ) |
Definition at line 1340 of file ship.c.
References ace_status(), acShipDmg, acShipRating, acShipStressList, aeObjectClass, aeSpecialManeuvers, analyze_kill(), bCurrentPlayerDestroyed, bPlayerVulnerable, explode(), Explosion(), MANEUVER_OUTA_HERE, nArcadeState, nExternalViewShip, OBJECT_CLASS_SHIP, RandomBelowOrEqual(), RATING_ACE_ANGEL, RATING_ACE_ICEMAN, reset_maneuver(), send_message(), SPECIAL_MANEUVER_UNKNOWN_9, the_creator(), and unflag_ace().
Referenced by abandoned(), advance_canned_sequence(), explode(), heat_seeking_missile_intelligence(), hit_asteroid(), house_keep_objects(), inflict_damage(), internal_damage(), mine_intelligence(), object_collision(), set_up_action_sphere(), and your_internal_damage().
| short Explosion | ( | short | obj | ) |
Definition at line 1200 of file ship.c.
References acObjOwnersTable, acShipRating, aeObjectClass, aeObjectTypeList, aMissionShips, anShipMissionShips, aObjectTypeData, asObjectCounterArray, asObjectScreenXList, awObjectScales, Explosion(), explosion_shock_wave(), find_ship_index(), nCurrentWingmanKilledThisMission, nShipMissionIndices, nYourWingman, OBJECT_CLASS_ASTEROID, OBJECT_CLASS_CAPITAL_SHIP, OBJECT_CLASS_SHIP, OBJECT_TYPE_EXPLOSION0, OBJECT_TYPE_EXPLOSION2, OBJECT_TYPE_TURRET, onboard_explosion(), personality_killed(), PlaySfxWaveFileByNumber(), RandomBelow(), RATING_ACE_ICEMAN, send_message(), set_objects_data(), set_special(), ShipExplosion(), SPECIAL_MANEUVER_UNKNOWN_9, and MissionShipRecord::state.
Referenced by death_sequence(), ejection_sequence(), explode(), Explosion(), and ShowGameOverScreen().
| int explosion_shock_wave | ( | short | obj, |
| short | blastDamage ) |
Definition at line 1292 of file ship.c.
References aeObjectClass, apply_force_to_objects_center(), aShipPositionsArray, asObjectCollisionRadius, ComputeVectorDelta(), explosion_shock_wave(), find_ratio(), FixedToShortSaturating(), inflict_damage(), MaxShort(), MinShort(), NormalizeFixedVector(), OBJECT_CLASS_SHIP, ScaleFixedVector(), the_creator(), and Vector_magnitude().
Referenced by Explosion(), explosion_shock_wave(), house_keep_objects(), and pop_flack().
| short find_child_object | ( | short | parent, |
| enum ObjectClass | objectClass ) |
Definition at line 1399 of file ship.c.
References acObjOwnersTable, aeObjectClass, find_child_object(), and SPACE_OBJECT_COUNT.
Referenced by find_child_object(), and fire().
| short find_child_ship | ( | short | parent, |
| enum ObjectClass | objectClass, | ||
| short | target ) |
Definition at line 1415 of file ship.c.
References acObjOwnersTable, acShipTargetTable, aeObjectClass, and find_child_ship().
Referenced by find_child_ship(), and fire().
| short find_weapon | ( | short | obj, |
| enum ObjectType | weaponType ) |
Definition at line 1888 of file ship.c.
References aShipWeaponsTable, find_weapon(), and ShipWeaponSlot::type.
Referenced by find_weapon(), and mine_available().
| void fire | ( | short | obj, |
| short | target ) |
Definition at line 1445 of file ship.c.
References AddFixedVectors(), anShipSpeed, aObjectTypeData, aShipPositionsArray, aShipVelocity, aShipWeaponsTable, asObjectCounterArray, ComputeVectorDelta(), drop_mine(), find_child_object(), find_child_ship(), fire(), fire_weapon(), get_facing_range_from_object(), launch_object(), ObjectTypeData::lifetime, ObjectTypeData::maximumVelocity, nFacingToTargetValue, nTargetFacingValue, nTgtRange, OBJECT_CLASS_MINE, OBJECT_CLASS_MISSILE, OBJECT_CLASS_PROJECTILE, OBJECT_TYPE_DUMB_FIRE_MISSILE, OBJECT_TYPE_FF_MISSILE, OBJECT_TYPE_HEAT_SEEKING_MISSILE, OBJECT_TYPE_IMAGE_RECOGNITION_MISSILE, OBJECT_TYPE_LASER_CANNON, OBJECT_TYPE_MASS_DRIVER_CANNON, OBJECT_TYPE_NEUTRON_PARTICLE_GUN, OBJECT_TYPE_SPACE_MINE, OBJECT_TYPE_TURRET, ObjectTypeData::objectClass, RandomBelowOrEqual(), real_velocity(), ScaleFixedVector(), SPACE_OBJECT_COUNT, and vector_angle().
Referenced by fire(), fire_when_ready(), FireOnAlternateTurns(), Mkill_missile(), Msit_n_spin(), and tanker_intelligence().
| void fire_afterburner | ( | short | obj, |
| short | time ) |
Definition at line 1976 of file ship.c.
References aeSpecialManeuvers, aShipVelocity, asShipAfterburnerTimer, fire_afterburner(), get_ship_max_velocity(), set_special(), SPECIAL_MANEUVER_AFTERBURNER, and Vector_magnitude().
Referenced by cruise_home(), fire_afterburner(), goto_formation(), imperial_formation(), Mburnout(), Mbuzz_debris(), Mfish_hook(), Mget_distance(), Mkickit(), Mturn_n_kick(), Mveer_away(), prepare_for_jump(), prevent_collision(), run_away(), streak_toward(), and your_afterburner().
| int fire_fixed_projectile_weapon | ( | short | obj | ) |
Definition at line 1935 of file ship.c.
References aObjectTypeData, aShipWeaponsTable, ShipWeaponSlot::disabled, fire_fixed_projectile_weapon(), fire_weapon(), OBJECT_CLASS_PROJECTILE, ObjectTypeData::objectClass, and ShipWeaponSlot::type.
Referenced by advance_canned_sequence(), fire_fixed_projectile_weapon(), and fire_players_lasers().
| int fire_flack | ( | short | owner, |
| short | explosion, | ||
| short | range, | ||
| FixedVector * | aim ) |
Definition at line 1604 of file ship.c.
References aObjectTypeData, asObjectCounterArray, fire_flack(), ObjectTypeData::maximumVelocity, MaxShort(), MinShort(), OBJECT_TYPE_TURRET, RandomBelowOrEqual(), send_at_point(), and set_objects_data().
Referenced by fire_flack(), and pop_flack().
| int fire_missile | ( | short | ship | ) |
Definition at line 1905 of file ship.c.
References aObjectTypeData, aShipWeaponsTable, cYellowColour, ShipWeaponSlot::disabled, fire_missile(), fire_weapon(), get_mode(), nTargetLockCountdown, OBJECT_CLASS_MISSILE, OBJECT_TYPE_HEAT_SEEKING_MISSILE, OBJECT_TYPE_IMAGE_RECOGNITION_MISSILE, ObjectTypeData::objectClass, ShowComponentHitHudMessage(), and ShipWeaponSlot::type.
Referenced by fire_missile(), HandleSpaceFlightControls(), Mram_missile(), and Mtarget_missile().
| unsigned int fire_super_brake | ( | short | ship | ) |
Definition at line 1992 of file ship.c.
References asShipAfterburnerTimer, fire_super_brake(), set_special(), and SPECIAL_MANEUVER_SUPER_BRAKE.
Referenced by fire_super_brake(), Mfish_hook(), and Mhard_break().
| int fire_turrets | ( | short | obj | ) |
Definition at line 1682 of file ship.c.
References acFormationMemberLists, acShipTargetTable, aShipPositionsArray, aShipWeaponsTable, asTargetListRangesArray, build_target_list(), fire_turrets(), fire_weapon(), ShipWeaponSlot::hardpoint, hemisphere(), OBJECT_TYPE_TURRET, pop_flack(), position_child(), RandomBelowOrEqual(), and ShipWeaponSlot::type.
Referenced by capital_ship_intelligence(), destroyer_intelligence(), fire_turrets(), and stationary_intelligence().
| int fire_weapon | ( | short | obj, |
| short | weapon ) |
Definition at line 1737 of file ship.c.
References acGunRefireDelay, acObjCollisionGraceTicks, acShipTargetTable, AddFixedVectors(), aeObjectTypeList, aeShipManeuversTable, aeShipTacticArray, aeSpecialManeuvers, ObjectTypeData::animationDelay, anShipSpeed, aObjectTypeData, aShipFwdVec, aShipPositionsArray, aShipUpVector, aShipVelocity, aShipWeaponsTable, asObjectCounterArray, asShipAccumulatedDmg, asShipWpnEnergyList, bCockpitlessView, cCurrentCockpitView, child_object(), ComputeVectorDelta(), copy_frame(), ObjectTypeData::damageCapacity, drop_mine(), fire_weapon(), get_ship_max_velocity(), initialize_ship(), ObjectTypeData::lifetime, MANEUVER_NONE, ObjectTypeData::maximumVelocity, new_object(), OBJECT_CLASS_MINE, OBJECT_CLASS_MISSILE, OBJECT_CLASS_PROJECTILE, OBJECT_TYPE_DUMB_FIRE_MISSILE, OBJECT_TYPE_FF_MISSILE, OBJECT_TYPE_HEAT_SEEKING_MISSILE, OBJECT_TYPE_IMAGE_RECOGNITION_MISSILE, OBJECT_TYPE_LASER_CANNON, OBJECT_TYPE_MASS_DRIVER_CANNON, OBJECT_TYPE_NEUTRON_PARTICLE_GUN, OBJECT_TYPE_TURRET, ObjectTypeData::objectClass, PlaySfxWaveFileByNumber(), point_at(), remove_weapon(), RemovePlayerReleaseWeapon(), ScaleFixedVector(), SPECIAL_MANEUVER_NONE, steady_object(), TACTIC_SIT_STILL, vector_component_in_dir(), and Vector_magnitude().
Referenced by fire(), fire_fixed_projectile_weapon(), fire_missile(), fire_turrets(), fire_weapon(), and Mdrop_a_mine().
| unsigned int fix_velocity | ( | short | obj | ) |
Definition at line 438 of file ship.c.
References anShipSpeed, aShipFwdVec, aShipVelocity, fix_velocity(), and ScaleFixedVector().
Referenced by arrive_from_warp(), fix_velocity(), and set_speed().
| short flip_angle | ( | short | ship, |
| short | angle ) |
Definition at line 2000 of file ship.c.
References asObjectFlipArray, asObjScreenAngles, and flip_angle().
Referenced by flip_angle(), and place_exhaust_on_ships().
| short hemisphere | ( | FixedVector * | target, |
| FixedVector * | parent, | ||
| FixedVector * | hardpoint ) |
Definition at line 1592 of file ship.c.
References ComputeVectorDelta(), hemisphere(), and vector_angle().
Referenced by fire_turrets(), and hemisphere().
| unsigned int housekeep_power_plant_and_fuel | ( | short | ship | ) |
Definition at line 2127 of file ship.c.
References anShipSpeed, drain_fuel(), and housekeep_power_plant_and_fuel().
Referenced by housekeep_power_plant_and_fuel(), and update_objects_in_space().
| int inflict_damage | ( | short | attacker, |
| short | victim, | ||
| short | damage, | ||
| const FixedVector * | impactDirection ) |
Definition at line 503 of file ship.c.
References aasShipArmor, aasShipShield, acObjOwnersTable, aeObjectClass, aeObjectTypeList, aeShipSide, aeSpecialManeuvers, aObjectTypeData, aShipFwdVec, aShipRightVector, asObjectScreenXList, asShipAccumulatedDmg, bPlayerVulnerable, Create_ship_hit_debris(), dot_product(), explode(), inflict_damage(), internal_damage(), nYourWingman, OBJECT_CLASS_CAPITAL_SHIP, OBJECT_CLASS_MISSILE, OBJECT_CLASS_PROJECTILE, OBJECT_CLASS_SHIP, PlaySfxWaveFileByNumber(), RandomBelowOrEqual(), send_appropriate_message(), send_message(), SIDE_KILRATHI, SPECIAL_MANEUVER_UNKNOWN_9, and TriggerPlayerHitPaletteFlash().
Referenced by explosion_shock_wave(), inflict_damage(), and object_collision().
| short initialize_object | ( | short | obj, |
| enum ObjectType | type, | ||
| short | owner ) |
Definition at line 67 of file ship.c.
References aShipPositionsArray, aShipVelocity, initialize_object(), set_objects_data(), and zero_vector().
Referenced by initialize_object(), initialize_ship(), and new_object().
| short initialize_ship | ( | enum ObjectType | type, |
| short | owner ) |
Definition at line 102 of file ship.c.
References aeShipSide, get_ship_slot(), initialize_object(), initialize_ship(), and SIDE_NEUTRAL.
Referenced by fire_weapon(), init_ship(), and initialize_ship().
| int internal_damage | ( | short | attacker, |
| short | victim, | ||
| short | damage, | ||
| short | quadrant ) |
Definition at line 660 of file ship.c.
References aasShipMaximumShieldTable, aasShipShield, acShipCommunicatorArray, acShipDestroyedWeaponCountArray, acShipDmg, acShipRating, aeObjectClass, aeObjectTypeList, aeShipSide, anShipFuelsTable, any_enemy(), aObjectTypeData, aShipWeaponsTable, asShipAccumulatedDmg, call_enemy(), damage_ion_drive(), ObjectTypeData::damageCapacity, drain_fuel(), explode(), internal_damage(), MaxShort(), MinShort(), OBJECT_CLASS_CAPITAL_SHIP, onboard_explosion(), pilot_hit(), RandomBelowOrEqual(), RandomInRange(), remove_weapon(), send_message(), SIDE_KILRATHI, and your_internal_damage().
Referenced by inflict_damage(), and internal_damage().
| int launch_object | ( | short | parent, |
| short | child, | ||
| FixedVector | direction, | ||
| short | speed ) |
Definition at line 1431 of file ship.c.
References AddFixedVectors(), aShipVelocity, launch_object(), NormalizeFixedVector(), ScaleFixedVector(), and vector_component_in_dir().
Referenced by fire(), and launch_object().
| unsigned int match_rotation_goal | ( | short * | rotation, |
| short * | goal, | ||
| short | totalError, | ||
| short | rate ) |
Definition at line 287 of file ship.c.
References match_rotation_goal(), MaxShort(), and MinShort().
Referenced by match_rotation_goal(), rotate_eye_to_goal(), and rotate_object_to_goal().
| short new_object | ( | enum ObjectType | type, |
| short | owner ) |
Definition at line 91 of file ship.c.
References borrow_dust(), find_vacant_3d_object(), initialize_object(), and new_object().
Referenced by drop_mine(), fire_weapon(), new_object(), and pop_flack().
| int onboard_explosion | ( | short | obj | ) |
Definition at line 620 of file ship.c.
References AddFixedVectors(), aShipPositionsArray, aShipVelocity, asObjectCollisionRadius, asObjectCounterArray, awObjectScales, find_vacant_3d_object(), MakeRandomVectorFixed(), OBJECT_TYPE_EXPLOSION2, onboard_explosion(), and set_objects_data().
Referenced by Explosion(), house_keep_objects(), internal_damage(), and onboard_explosion().
| short pilot_hit | ( | short | obj | ) |
Definition at line 600 of file ship.c.
References acPilotHitPointsArray, asObjectCounterArray, bPlayerVulnerable, nArcadeState, pilot_hit(), RandomBelowOrEqual(), set_special(), skill_check(), and SPECIAL_MANEUVER_BLOWING_UP.
Referenced by internal_damage(), pilot_hit(), and your_internal_damage().
| unsigned int place_exhaust_on_ships | ( | void | ) |
Definition at line 2017 of file ship.c.
References abShipExhaustHeatList, aeObjectClass, aeObjectTypeList, aeSpecialManeuvers, anShipSpeed, aObjectTypeData, asObjDistancesTable, asObjectFlipArray, asObjectScreenXList, asObjectScreenYArray, asObjectViewFrames, asObjScreenAngles, awObjectScales, find_vacant_3d_object(), flip_angle(), OBJECT_CLASS_MISSILE, OBJECT_TYPE_THRUSTERS, place_exhaust_on_ships(), RandomInRange(), set_objects_data(), SPECIAL_MANEUVER_AFTERBURNER, and SPECIAL_MANEUVER_KILL_ENGINES.
Referenced by Draw_3Space_Frame(), and place_exhaust_on_ships().
| short pop_flack | ( | short | obj, |
| short | range, | ||
| FixedVector * | hardpoint ) |
Definition at line 1641 of file ship.c.
References acShipTargetTable, AddFixedVectors(), aObjectTypeData, aShipPositionsArray, asObjectCounterArray, explosion_shock_wave(), fire_flack(), MaxShort(), new_object(), OBJECT_TYPE_EXPLOSION0, OBJECT_TYPE_TURRET, pop_flack(), RandomBelow(), RandomBelowOrEqual(), real_velocity(), rnd_aim(), FixedVector::x, FixedVector::y, and FixedVector::z.
Referenced by fire_turrets(), and pop_flack().
| short real_velocity | ( | short | obj | ) |
Definition at line 431 of file ship.c.
References aShipVelocity, FixedToShortSaturating(), real_velocity(), and Vector_magnitude().
Referenced by fire(), imperial_formation(), make_shard(), manage_hazard(), Mfish_hook(), normal_speed(), pop_flack(), real_velocity(), and update_hazards().
| unsigned int remove_weapon | ( | short | obj, |
| short | weapon ) |
Definition at line 132 of file ship.c.
References any_selected(), aObjectTypeData, aShipWeaponsTable, get_mode(), InvalidateVduMode(), nSelectedReleaseWeaponIndex, OBJECT_CLASS_PROJECTILE, ObjectTypeData::objectClass, remove_weapon(), select_new_gun(), and select_new_release_weapon().
Referenced by drop_mine(), fire_weapon(), internal_damage(), remove_weapon(), RemovePlayerReleaseWeapon(), and your_internal_damage().
Definition at line 940 of file ship.c.
References acPlayerComponentDamageList, acShipDmg, aeObjectTypeList, aObjectTypeData, damage_ion_drive(), RandomBelowOrEqual(), repair_internal_damage(), and ReportComponentRepaired().
Referenced by repair_internal_damage(), and update_cockpit().
| unsigned int replenish_shields | ( | short | ship | ) |
Definition at line 2135 of file ship.c.
References aasShipMaximumShieldTable, aasShipShield, acPlayerComponentDamageList, aeObjectTypeList, aObjectTypeData, nCurrentSpaceFrameValue, and replenish_shields().
Referenced by replenish_shields(), and update_objects_in_space().
| unsigned int replenish_weapon_energy_bank | ( | short | ship | ) |
Definition at line 2158 of file ship.c.
References aasShipMaximumShieldTable, aasShipShield, acPlayerComponentDamageList, asShipWpnEnergyList, MinShort(), RandomInRange(), and replenish_weapon_energy_bank().
Referenced by replenish_weapon_energy_bank(), and update_objects_in_space().
| short ReportComponentRepaired | ( | short | component, |
| short | minimumDamage ) |
Definition at line 923 of file ship.c.
References acPlayerComponentDamageList, apszComponentNames, cRedColour, ReportComponentRepaired(), and ShowComponentHitHudMessage().
Referenced by repair_internal_damage(), and ReportComponentRepaired().
| unsigned int reposition_fixed_child_objects | ( | void | ) |
Definition at line 2074 of file ship.c.
References acObjOwnersTable, aeObjectClass, aeObjectTypeList, asObjDistancesTable, asObjectFlipArray, asObjectScreenXList, asObjectScreenYArray, asObjScreenAngles, asObjScreenScalesArray, awObjectScales, CosFixed(), MultiplyFixed(), OBJECT_CLASS_FIXED_OBJECT, OBJECT_TYPE_THRUSTERS, OBJECT_TYPE_TURRET, reposition_fixed_child_objects(), SinFixed(), and SPACE_LAST_MOVING_OBJECT.
Referenced by Draw_3Space_Frame(), and reposition_fixed_child_objects().
| void revise_shields | ( | short | obj | ) |
Definition at line 781 of file ship.c.
References aasShipMaximumShieldTable, aeObjectTypeList, aObjectTypeData, MaxShort(), and revise_shields().
Referenced by revise_shields(), and your_internal_damage().
| int rnd_aim | ( | short | radius, |
| short | speed, | ||
| short | maximum ) |
Definition at line 1631 of file ship.c.
References MinShort(), RandomBelowOrEqual(), rnd_aim(), and rnd_sign().
Referenced by pop_flack(), and rnd_aim().
| short rnd_sign | ( | short | v | ) |
Definition at line 1623 of file ship.c.
References RandomBelowOrEqual(), and rnd_sign().
Referenced by rnd_aim(), and rnd_sign().
| int rotate_object_to_goal | ( | short | obj | ) |
Definition at line 328 of file ship.c.
References aeObjectTypeList, aeSpecialManeuvers, alert_flag(), anObjectRollRotationList, anObjectYawRotation, anObjPitchRot, anPitchGoal, anRollGoal, anYawTarget, aObjectTypeData, asObjectCounterArray, match_rotation_goal(), ObjectTypeData::pitchRate, ObjectTypeData::rollRate, rotate_object_to_goal(), set_special(), skill_check(), SPECIAL_MANEUVER_BLOWING_UP, SPECIAL_MANEUVER_NONE, and ObjectTypeData::yawRate.
Referenced by rotate_object_to_goal(), and update_objects_in_space().
| unsigned int score_for_kill | ( | short | pilot, |
| short | victim ) |
Definition at line 1111 of file ship.c.
References aeObjectTypeList, aeShipSide, affect_mission_score(), OBJECT_TYPE_DORKIR, OBJECT_TYPE_DRALTHI, OBJECT_TYPE_FRALTHI, OBJECT_TYPE_GRATHA, OBJECT_TYPE_JALTHI, OBJECT_TYPE_KILRATHI_BASE, OBJECT_TYPE_KRANT, OBJECT_TYPE_LUMBARI, OBJECT_TYPE_RALARI, OBJECT_TYPE_SALTHI, OBJECT_TYPE_SIVAR, OBJECT_TYPE_SNAKEIR, OBJECT_TYPE_SPIKERI, score_for_kill(), and SIDE_KILRATHI.
Referenced by analyze_kill(), and score_for_kill().
| void send_appropriate_message | ( | short | attacker, |
| short | victim ) |
Definition at line 480 of file ship.c.
References acObjOwnersTable, aeObjectClass, aeShipSide, aeSpecialManeuvers, nYourWingman, OBJECT_CLASS_SHIP, RandomBelowOrEqual(), send_appropriate_message(), send_message(), SIDE_KILRATHI, and SPECIAL_MANEUVER_UNKNOWN_9.
Referenced by inflict_damage(), and send_appropriate_message().
| int send_at_point | ( | short | obj, |
| FixedVector * | point, | ||
| short | speed ) |
Definition at line 1389 of file ship.c.
References aShipPositionsArray, aShipVelocity, ComputeVectorDelta(), send_at_point(), and SetVectorFixedPoint().
Referenced by fire_flack(), and send_at_point().
| void set_objects_data | ( | short | obj, |
| enum ObjectType | type, | ||
| short | owner ) |
Definition at line 173 of file ship.c.
References aasShipArmor, aasShipMaximumShieldTable, aasShipShield, acLastCollisionObjects, acObjOwnersTable, acPilotHitPointsArray, acPreviousAttackers, acShipDmg, acShipIonDriveDmg, acShipTargetTable, aeObjectClass, aeObjectTypeList, ObjectTypeData::afterburnerVelocity, animate_shape(), ObjectTypeData::animation, anShipFuelsTable, aObjectTypeData, apObjShapeArray, ObjectTypeData::armorFront, ObjectTypeData::armorLeft, ObjectTypeData::armorRear, ObjectTypeData::armorRight, aShipWeaponsTable, asObjAfterburnerVelocities, asObjectAnimationDelay, asObjectAnimIndexes, asObjectCollisionRadius, asObjectFlipArray, asObjectViewFrames, asObjScreenAngles, asShipAccumulatedDmg, asShipWpnEnergyList, awObjectScales, awObjMassArray, ObjectTypeData::collisionRadius, eSelectedGunType, init_ijk(), ObjectTypeData::lifetime, ObjectTypeData::mass, nSelectedReleaseWeaponIndex, OBJECT_CLASS_DUST, OBJECT_CLASS_MISSILE, OBJECT_CLASS_PROJECTILE, OBJECT_CLASS_SHIP, OBJECT_TYPE_ASTEROID1, OBJECT_TYPE_ASTEROID2, OBJECT_TYPE_ASTEROID3, OBJECT_TYPE_ASTEROID4, OBJECT_TYPE_ASTEROID5, OBJECT_TYPE_ASTEROID6, OBJECT_TYPE_DEBRIS_METAL_SHEET, OBJECT_TYPE_DEBRIS_PIPE, OBJECT_TYPE_DEBRIS_SHIP_GIRDER_CHUNK, OBJECT_TYPE_DEBRIS_WING, OBJECT_TYPE_EXPLOSION0, OBJECT_TYPE_EXPLOSION1, OBJECT_TYPE_EXPLOSION2, OBJECT_TYPE_ROCK_CHUNK, OBJECT_TYPE_SPACE_DUST, ObjectTypeData::objectClass, recalc_max_velocity(), ObjectTypeData::scale, set_objects_data(), ObjectTypeData::shapeSet, ObjectTypeData::shieldAft, ObjectTypeData::shieldFore, ObjectTypeData::weaponLoadout, and ObjectTypeData::yawRate.
Referenced by animate_object(), Create_explosion_debris(), Create_ship_hit_debris(), ejection_sequence(), Explosion(), fire_flack(), house_keep_objects(), init_hazard(), initialize_object(), make_shard(), object_collision(), onboard_explosion(), place_exhaust_on_ships(), prepare_mission(), set_objects_data(), ShipExplosion(), ShowTigerClawEscapeScene(), start_dust(), unwarp(), update_star_field(), and warp().
| short ShipExplosion | ( | short | obj | ) |
Definition at line 1170 of file ship.c.
References acObjOwnersTable, aeObjectClass, apObjShapeArray, asCapitalShipViewFramesTable, aShipPositionsArray, aShipVelocity, awObjectScales, copy_frame(), find_vacant_3d_object(), FreePacketAndClear(), OBJECT_CLASS_CAPITAL_SHIP, OBJECT_TYPE_EXPLOSION1, set_objects_data(), and ShipExplosion().
Referenced by Explosion(), house_keep_objects(), and ShipExplosion().
| unsigned int sort_viable_target_list | ( | void | ) |
Definition at line 447 of file ship.c.
References acViableTargetList, asViableTgtDistList, cViableTargetCount, and sort_viable_target_list().
Referenced by build_your_target_list(), FF_missile_intelligence(), heat_seeking_missile_intelligence(), and sort_viable_target_list().
| unsigned int steady_object | ( | short | ship | ) |
Definition at line 422 of file ship.c.
References anPitchGoal, anRollGoal, anYawTarget, and steady_object().
Referenced by alter_objective(), chase_location(), fire_weapon(), formation_break(), goto_formation(), init_formation_burst(), Msit_n_spin(), reset_objective(), start_collision_alert(), steady_object(), and try2reset_maneuver().
| short the_creator | ( | short | obj | ) |
Definition at line 1276 of file ship.c.
References acObjOwnersTable, and the_creator().
Referenced by explode(), explosion_shock_wave(), and the_creator().
Definition at line 2200 of file ship.c.
References aeSpecialManeuvers, anShipFuelsTable, asShipAfterburnerTimer, fire_afterburner(), malf(), nAfterburnerSoundDeadline, nCurrentSpaceFrameValue, PlaySfxWaveFileByNumber(), SPECIAL_MANEUVER_AFTERBURNER, and your_afterburner().
Referenced by HandleSpaceFlightControls(), and your_afterburner().
| int your_internal_damage | ( | short | attacker, |
| short | damage, | ||
| short | quadrant ) |
Definition at line 794 of file ship.c.
References acPlayerComponentDamageList, acShipCommunicatorArray, acShipDestroyedWeaponCountArray, acShipDmg, aeObjectClass, aeObjectTypeList, anShipFuelsTable, aObjectTypeData, aShipWeaponsTable, asPlayerDamageSystemTable, asShipAccumulatedDmg, check_computer_damage(), cRedColour, damage_ion_drive(), damage_your_component(), drain_fuel(), explode(), MaxShort(), OBJECT_CLASS_ASTEROID, OBJECT_CLASS_PROJECTILE, OBJECT_CLASS_SHIP, pilot_hit(), place_damage_on_cockpit(), RandomBelowOrEqual(), remove_weapon(), revise_shields(), ShowComponentHitHudMessage(), and your_internal_damage().
Referenced by internal_damage(), and your_internal_damage().
|
static |
Definition at line 21 of file ship.c.
Referenced by Create_explosion_debris().
| signed char acGunRefireDelay[4] = {6, 10, 4, 0} |
Definition at line 55 of file ship.c.
Referenced by fire_weapon().
| enum ObjectType aeShipHitDebrisTypes[3] |
| short asPlayerDamageSystemTable[50] |
Definition at line 13 of file ship.c.
Referenced by your_internal_damage().
| int bAfterburnerSfxEnabled |
Definition at line 64 of file ship.c.
Referenced by accelerate_and_move_object(), and ResetSoundState().
| int dwOriginalFreeMem |
Definition at line 59 of file ship.c.
Referenced by LoadOriginFxDrivers(), LogMemoryUsage(), and ShowMemoryStatusDebug().
| int nAfterburnerSoundDeadline |
Definition at line 63 of file ship.c.
Referenced by your_afterburner().
| int nAvailableGameMemory |
Definition at line 61 of file ship.c.
Referenced by init_mission(), and LoadOriginFxDrivers().
| int nMemoryConfig |
Definition at line 58 of file ship.c.
Referenced by death_sequence(), InitializeCockpitResources(), load_ship(), LoadOriginFxDrivers(), PlayScrambleHangarScene(), and scramble().
| int nSceneResourceBudgetValue |
Definition at line 62 of file ship.c.
Referenced by init_mission(), InitializeCockpitResources(), and Title_Sequence().
| struct Shape* pMouseCursorResource |
Definition at line 60 of file ship.c.
Referenced by InitializeEventManagerResources().