|
Wing Commander
Reconstructed Win32 source (1996)
|
Ship mission logic, resource ownership and scene animation. More...
Go to the source code of this file.
Macros | |
| #define | WC1_LOGIC_SOURCE |
Functions | |
| short | ace_status (short ace, unsigned char bits) |
| void | unflag_ace (short ace, unsigned char bits) |
| void | flag_ace (short ace, unsigned char bits) |
| void | kill_ace (short ace) |
| void | ace_greeting (short obj) |
| void | prepare_ace (short ace) |
| short | signed_random (short range) |
| int | alert_flag (short ship, unsigned int bits) |
| unsigned int | HasSpeechBuffer (void) |
| unsigned short | set_alert (short i, unsigned int bits) |
| void | clear_alert (short i) |
| void | start_collision_alert (short obj, short other) |
| void | try2end_collision_alert (short obj) |
| short | normal_speed (short obj) |
| short | real_crash_time (short obj, short other) |
| void | clear_crash_cache (void) |
| short | crash_time (short obj, short other) |
| unsigned int | unactive (short ship) |
| short | detect_collisions (short obj) |
| int | are_alive (short obj) |
| int | trim_goals (short obj, short amount) |
| int | report_kilrathi_rout (int mode) |
| void | maneuver_complete (short ship) |
| int | being_tailed (short obj, short other) |
| unsigned int | build_squad_list (short leader) |
| unsigned int | find_squad_center (FixedVector *center) |
| unsigned int | reset_objective (short ship, enum ShipObjective objective) |
| unsigned int | reset_tactic (short ship, enum ShipTactic tactic) |
| void | zero_vector (FixedVector *vector) |
| short | find_ship_index (short missionShip) |
| unsigned int | reset_mission_type (short obj, enum ShipMissionType missionType) |
| short | try2rout (short obj) |
| signed char | no_goal (short ship) |
| int | any_enemy_tail (short obj) |
| unsigned int | alter_tactic (short ship, enum ShipTactic tactic) |
| short | detect_enemy_tail (short obj) |
| int | is_ship_tailing_player_target (short obj) |
| int | missile_on_tail (short obj) |
| short | select_weighted_value (short *choices) |
| unsigned int | init_formation_burst (short obj) |
| unsigned int | change_mission_type (short obj, enum ShipMissionType missionType) |
| unsigned int | alter_objective (short ship, enum ShipObjective objective) |
| void | reset_maneuver (short ship, short maneuver) |
| void | try2reset_maneuver (short obj, short maneuver) |
| unsigned int | set_special (short ship, enum SpecialManeuver special) |
| unsigned int | approach_zero_speed (short ship) |
| unsigned int | approach_min_speed (short obj) |
| unsigned int | approach_half_speed (short obj) |
| unsigned int | approach_cruise_speed (short ship) |
| unsigned int | approach_full_speed (short ship) |
| unsigned int | approach_ship_speed (short obj, short other) |
| unsigned int | get_front_spot (short obj, unsigned short distance, FixedVector *point) |
| unsigned int | get_rear_spot (short obj, unsigned short distance, FixedVector *point) |
| unsigned int | close_behind (volatile short range) |
| short | distance_from_point (short obj, const FixedVector *point) |
| void | get_facing_range_from_object (short obj, short other) |
| short | MinShort (short a, short b) |
| void | fire (short obj, short target) |
| unsigned int | IsVectorWithinRange (FixedVector *vector, short range) |
| unsigned int | ships_within_range (short obj, short other, short range) |
| short | build_target_list (short obj, short range) |
| int | in_danger (short obj) |
| void | inherit_leader_mission (short obj) |
| short | skill_rating (short obj) |
| unsigned int | dead_ship (short missionShip) |
| short | find_ships_sphere (short missionShip) |
| unsigned int | get_follow_point (short obj, FixedVector *point) |
| short | FindNearestNavPoint (short ship) |
| int | hostile_sphere (short obj, short navPoint) |
| int | explode (short attacker, short victim) |
| short | visited (short objective) |
| short | find_weapon (short obj, enum ObjectType weaponType) |
| void * | FetchDiskPacketRetrying (short logicalFile, short section, short flags) |
| void | FreePacketAndClear (void *slot, unsigned short releaseFlags) |
| void __stdcall | PromptInsertNumberedDisk (short logicalFile) |
| unsigned int __stdcall | GetPacketSize (const char *filename, short section) |
| void __stdcall | SetPaletteEntry (short index, short *rgb) |
| void | ClearViewport (Viewport *viewport, short colour) |
| void | DrawSpriteDefault (Viewport *viewport, short x, short y, struct Shape *shape, short frame) |
| void | ReleasePacketHandle (void *handle) |
| short | scan_for_enemy (short obj, unsigned short range) |
| int | any_enemy (short obj, short range) |
| short | nearest_enemy_range (short obj) |
| int | FindEnemyAimingWithinRange (short obj, short range) |
| unsigned int | FireOnAlternateTurns (short obj) |
| void | fire_when_ready (short obj, short aimed) |
| int | attacker_in_range (short obj, unsigned short range) |
| unsigned int | target_within_range (short obj) |
| int | select_safe_target (short obj) |
| void | inherit_leader (short obj) |
| int | gone_ship (short missionShip) |
| int | skill_check (short obj, short difficulty) |
| int | locate_ship (short missionShip, FixedVector *point) |
| unsigned int | get_first_follow_point (short obj, FixedVector *point) |
| int | abandoned (short obj, short other) |
| void | engage (short obj, short target, enum ShipObjective objective) |
| int | target_valid (short obj) |
| unsigned int | triumph (short obj) |
| short | find_ratio (short inputMinimum, short inputMaximum, short input, short outputMinimum, short outputMaximum) |
| short | evaluate_damage (short obj) |
| short | mine_available (short obj) |
| int | LoadShapeSet (PacketResourceDescriptor *resources, unsigned short flags, short defaultLogicalFile) |
| int | FreeShapeSet (PacketResourceDescriptor *resources, unsigned short releaseFlags) |
| int | LoadPacketResourceList (PacketResourceDescriptor *resources, short flags, int availableBytes) |
| unsigned int | ResetCockpitPaletteEntries (void) |
| unsigned int | initialize_cockpit (int requestedMode) |
| unsigned int | InitializeConstellationObject (const ConstellationObjectDefinition *definition, short object) |
| unsigned int | FreeConstellationObject (short object) |
| unsigned int | init_constellation (short scene) |
| unsigned int | free_constellation (void) |
| void | init_vdus (void) |
| unsigned int | InitializeCockpitResources (signed char mode) |
| unsigned int | free_cockpit (void) |
| unsigned int | init_3Space_objects (short scene) |
| unsigned int | load_common_3Space_objects (void) |
| unsigned int | remove_all_3d_objects (void) |
| unsigned int | free_3Space (void) |
| unsigned int | free_3Space_objects (void) |
| unsigned int | init_inflight_music (void) |
| unsigned int | free_inflight_music (void) |
| unsigned int | PreloadMusicTrackHook (short track) |
| unsigned int | ReleaseMusicTrackHook (short track) |
| unsigned short | LoadSceneAnimationResources (short scene, short variant) |
| void | ReleaseSceneAnimationResources (void) |
| signed char *__stdcall | FindSceneAnimationCommand (signed char *script, signed char command) |
| short __stdcall | SceneAnimationGoalReached (short delta, short current, short goal) |
| unsigned short __stdcall | UpdateSceneAnimationObject (SceneAnimationObject *object, Viewport *viewport) |
| void | PlaySceneAnimation (char *text, short animation, short duration) |
Ship mission logic, resource ownership and scene animation.
Address range 422010-42572f; its interior boundaries are provisional. The preceding startup unit has a separate pool of initialized data and string literals.
Definition in file logic.c.
| int abandoned | ( | short | obj, |
| short | other ) |
Definition at line 1286 of file logic.c.
References abandoned(), abShipTurnList, aeShipSide, distance_from_object(), explode(), FindNearestNavPoint(), hostile_sphere(), nCurrentNavigationPoint, RandomBelowOrEqual(), and SIDE_KILRATHI.
Referenced by abandoned(), close_behind(), cruise_home(), and cruise_to_destination().
| void ace_greeting | ( | short | obj | ) |
Definition at line 142 of file logic.c.
References ace_greeting(), ace_status(), aiPilotLevel, flag_ace(), and send_message().
Referenced by ace_greeting(), and engage().
| short ace_status | ( | short | ace, |
| unsigned char | bits ) |
Definition at line 115 of file logic.c.
References ace_status(), CampaignState::aceFlags, and stCampaignState.
Referenced by ace_greeting(), ace_status(), engage(), explode(), is_alive(), kill_ace(), and ParseTests().
| int alert_flag | ( | short | ship, |
| unsigned int | bits ) |
Definition at line 166 of file logic.c.
References alert_flag(), and anShipAlertFlags.
Referenced by accelerate_and_move_object(), alert_flag(), approach_speed(), handle_collisions(), rotate_object_to_goal(), and set_special().
| unsigned int alter_objective | ( | short | ship, |
| enum ShipObjective | objective ) |
Definition at line 685 of file logic.c.
References aeShipObjectiveList, alter_objective(), alter_tactic(), steady_object(), and TACTIC_NONE.
Referenced by alter_objective(), and request().
| unsigned int alter_tactic | ( | short | ship, |
| enum ShipTactic | tactic ) |
Definition at line 704 of file logic.c.
References aeShipTacticArray, alter_tactic(), MANEUVER_NONE, and reset_maneuver().
Referenced by alter_objective(), alter_tactic(), and patrol_area().
| int any_enemy | ( | short | obj, |
| short | range ) |
Definition at line 887 of file logic.c.
References aeObjectClass, aeShipSide, aeSpecialManeuvers, any_enemy(), distance_from_object(), nTargetShip, nTgtRange, OBJECT_CLASS_SHIP, and SPECIAL_MANEUVER_UNKNOWN_9.
Referenced by any_enemy(), BuildCommunicationCommandMenu(), BuildCommunicationRecipientMenu(), can_land(), check_stranded(), close_behind(), HandleSpaceFlightControls(), i_wanna_rout(), imperial_formation(), intelligence_events(), internal_damage(), and run_away().
| int any_enemy_tail | ( | short | obj | ) |
Definition at line 512 of file logic.c.
References acShipTargetTable, aeObjectClass, aeShipSide, aeSpecialManeuvers, any_enemy_tail(), being_tailed(), nTargetShip, OBJECT_CLASS_SHIP, and SPECIAL_MANEUVER_UNKNOWN_9.
Referenced by any_enemy_tail(), disobey_formation(), and gametrack().
| unsigned int approach_cruise_speed | ( | short | ship | ) |
Definition at line 770 of file logic.c.
References aeObjectTypeList, aObjectTypeData, approach_cruise_speed(), and approach_speed().
Referenced by approach_cruise_speed(), capital_ship_intelligence(), cruise_home(), cruise_to_destination(), destroyer_intelligence(), goto_location(), Msit_n_fire(), Mstrafe_enemy(), Mtarget_missile(), Mthink(), Mtight_loop(), patrol_area(), rendezvous_mission(), return_to_buddy(), and tanker_intelligence().
| unsigned int approach_full_speed | ( | short | ship | ) |
Definition at line 779 of file logic.c.
References approach_full_speed(), approach_speed(), and asShipMaximumSpeedArray.
Referenced by accelerate_and_jump(), approach_full_speed(), capital_ship_intelligence(), chase_speed(), cruise_to_destination(), formation_burst(), general_zig(), goto_formation(), goto_location(), Mbuzz_debris(), Mcorkscrew(), Mdrop_a_mine(), Mfish_hook(), Mfull_ahead(), Mget_distance(), Mhard_turn(), Mram_missile(), Mroll_over(), Msuicide_run(), Mtry2tail(), Mturn_n_kick(), Mveer_away(), Mwabble(), Mzip_past(), patrol_area(), prevent_collision(), rendezvous_mission(), run_away(), streak_toward(), and tanker_intelligence().
| unsigned int approach_half_speed | ( | short | obj | ) |
Definition at line 760 of file logic.c.
References aeObjectTypeList, aObjectTypeData, approach_half_speed(), approach_speed(), and ObjectTypeData::cruiseVelocity.
Referenced by approach_half_speed(), cruise_to_destination(), defend_mission(), destroyer_intelligence(), and goto_location().
| unsigned int approach_min_speed | ( | short | obj | ) |
Definition at line 753 of file logic.c.
References approach_min_speed(), and approach_speed().
Referenced by approach_min_speed(), and goto_formation().
| unsigned int approach_ship_speed | ( | short | obj, |
| short | other ) |
Definition at line 787 of file logic.c.
References anShipSpeed, approach_ship_speed(), and approach_speed().
Referenced by approach_ship_speed(), escort_buddy(), goto_formation(), and imperial_formation().
| unsigned int approach_zero_speed | ( | short | ship | ) |
Definition at line 746 of file logic.c.
References approach_speed(), and approach_zero_speed().
Referenced by accelerate_and_move_object(), approach_zero_speed(), chase_speed(), Msit_n_fire(), and prevent_collision().
| int are_alive | ( | short | obj | ) |
Definition at line 363 of file logic.c.
References aeShipObjectiveList, are_alive(), OBJECTIVE_WANDER, and unactive().
Referenced by are_alive().
| int attacker_in_range | ( | short | obj, |
| unsigned short | range ) |
Definition at line 979 of file logic.c.
References acShipTargetTable, aeObjectClass, aeShipSide, aeSpecialManeuvers, attacker_in_range(), distance_from_object(), nTargetShip, nTgtRange, OBJECT_CLASS_SHIP, and SPECIAL_MANEUVER_UNKNOWN_9.
Referenced by attacker_in_range(), close_behind(), imperial_formation(), rendezvous_mission(), select_target(), and tanker_intelligence().
| int being_tailed | ( | short | obj, |
| short | other ) |
Definition at line 503 of file logic.c.
References being_tailed(), nFacingToTargetValue, nTargetFacingValue, nTgtRange, and ship_vs_ship().
Referenced by any_enemy_tail(), being_tailed(), detect_enemy_tail(), and is_ship_tailing_player_target().
| unsigned int build_squad_list | ( | short | leader | ) |
Definition at line 593 of file logic.c.
References acFormationMemberLists, asShipWingLeaderArray, and build_squad_list().
Referenced by build_squad_list(), and init_formation_burst().
| short build_target_list | ( | short | obj, |
| short | range ) |
Definition at line 1044 of file logic.c.
References acFormationMemberLists, aeObjectClass, aeShipSide, aeSpecialManeuvers, asTargetListRangesArray, build_target_list(), distance_from_object(), OBJECT_CLASS_SHIP, and SPECIAL_MANEUVER_UNKNOWN_9.
Referenced by build_target_list(), close_behind(), fire_turrets(), and select_safe_target().
| unsigned int change_mission_type | ( | short | obj, |
| enum ShipMissionType | missionType ) |
Definition at line 665 of file logic.c.
References aeShipMissionType, aeShipObjectiveList, change_mission_type(), OBJECTIVE_ENGAGE_ENEMY, and reset_mission_type().
Referenced by change_mission_type(), defend_mission(), escort_mission(), kilrathi_wingman(), and rendezvous_mission().
| void clear_alert | ( | short | i | ) |
Definition at line 189 of file logic.c.
References abCollisionAlertTargets, anShipAlertFlags, asCollisionDelayList, and clear_alert().
Referenced by clear_alert(), init_intelligence_data(), prevent_collision(), remove_object(), and try2end_collision_alert().
Definition at line 295 of file logic.c.
References asCollisionPartnerTable, and clear_crash_cache().
Referenced by clear_crash_cache(), and update_objects_in_space().
| unsigned int close_behind | ( | volatile short | range | ) |
Definition at line 814 of file logic.c.
References close_behind(), nTargetFacingValue, and nTgtRange.
| short crash_time | ( | short | obj, |
| short | other ) |
Definition at line 306 of file logic.c.
References aeObjectClass, asCollisionPartnerTable, asCollisionTimes, asObjectScreenXList, crash_time(), OBJECT_CLASS_ASTEROID, and real_crash_time().
Referenced by crash_time(), detect_collisions(), and prevent_collision().
| unsigned int dead_ship | ( | short | missionShip | ) |
Definition at line 1126 of file logic.c.
References aMissionShips, and dead_ship().
Referenced by close_behind(), dead_ship(), locate_ship(), and triumph().
| short detect_collisions | ( | short | obj | ) |
Definition at line 325 of file logic.c.
References aeObjectClass, asCollisionPartnerTable, asCollisionTimes, crash_time(), detect_collisions(), OBJECT_CLASS_ASTEROID, and OBJECT_CLASS_MISSILE.
Referenced by detect_collisions(), and handle_collisions().
| short detect_enemy_tail | ( | short | obj | ) |
Definition at line 535 of file logic.c.
References acShipTargetTable, aeObjectClass, aeShipSide, aeSpecialManeuvers, being_tailed(), detect_enemy_tail(), OBJECT_CLASS_SHIP, and SPECIAL_MANEUVER_UNKNOWN_9.
Referenced by check_engage_target(), and detect_enemy_tail().
| short distance_from_point | ( | short | obj, |
| const FixedVector * | point ) |
| void engage | ( | short | obj, |
| short | target, | ||
| enum ShipObjective | objective ) |
Definition at line 1306 of file logic.c.
References ace_greeting(), ace_status(), acShipRating, acShipTargetTable, aeShipObjectiveList, aiPilotLevel, engage(), and reset_objective().
Referenced by approach_and_engage(), close_behind(), defend_mission(), engage(), escort_mission(), formation_break(), formation_burst(), imperial_formation(), kilrathi_wingman(), rendezvous_mission(), and request().
| short evaluate_damage | ( | short | obj | ) |
Definition at line 1366 of file logic.c.
References aasShipArmor, acShipDmg, aeObjectClass, aeObjectTypeList, aObjectTypeData, ObjectTypeData::armorFront, ObjectTypeData::armorLeft, ObjectTypeData::armorRear, ObjectTypeData::armorRight, ObjectTypeData::damageCapacity, evaluate_damage(), and OBJECT_CLASS_SHIP.
Referenced by approach_and_engage(), BuildCommunicationCommandMenu(), can_land(), check_destroy_target(), close_behind(), evaluate_damage(), handle_stress(), intelligence_events(), and reset_stress().
| void * FetchDiskPacketRetrying | ( | short | logicalFile, |
| short | section, | ||
| short | flags ) |
| short find_ratio | ( | short | inputMinimum, |
| short | inputMaximum, | ||
| short | input, | ||
| short | outputMinimum, | ||
| short | outputMaximum ) |
Definition at line 1352 of file logic.c.
References find_ratio().
Referenced by close_behind(), explosion_shock_wave(), find_ratio(), rear_sphere(), reset_stress(), and try_far_spot().
| short find_ship_index | ( | short | missionShip | ) |
Definition at line 439 of file logic.c.
References aeObjectClass, aeSpecialManeuvers, find_ship_index(), nLogicLastFoundShipValue, nShipMissionIndices, OBJECT_CLASS_FUTURION, OBJECT_CLASS_SHIP, and SPECIAL_MANEUVER_UNKNOWN_9.
Referenced by check_destroy_target(), cleanup_objectives(), coming_home(), defend_mission(), escort_mission(), Explosion(), find_ship_index(), flag_reached(), get_follow_point(), hidden_objective(), init_ship(), locate_ship(), new_view(), rendezvous_mission(), set_formation_position(), Set_up_ship_info(), SetScale(), and strike_mission().
| short find_ships_sphere | ( | short | missionShip | ) |
Definition at line 1165 of file logic.c.
References ACTIVE_MISSION_NAV_POINT_COUNT, aMissionNavPoints, find_ships_sphere(), MissionNavPoint::missionShips, and MissionNavPoint::type.
Referenced by close_behind(), find_ships_sphere(), locate_ship(), and prepare_mission().
| unsigned int find_squad_center | ( | FixedVector * | center | ) |
Definition at line 610 of file logic.c.
References acFormationMemberLists, AddFixedVectors(), aShipPositionsArray, divide_vector(), find_squad_center(), and zero_vector().
Referenced by find_squad_center(), and init_formation_burst().
| short find_weapon | ( | short | obj, |
| enum ObjectType | weaponType ) |
| int FindEnemyAimingWithinRange | ( | short | obj, |
| short | range ) |
Definition at line 927 of file logic.c.
References aeObjectClass, aeShipSide, aeSpecialManeuvers, FindEnemyAimingWithinRange(), get_facing_range_from_object(), nTargetFacingValue, nTargetShip, nTgtRange, OBJECT_CLASS_SHIP, and SPECIAL_MANEUVER_UNKNOWN_9.
Referenced by FindEnemyAimingWithinRange().
| signed char *__stdcall FindSceneAnimationCommand | ( | signed char * | script, |
| signed char | command ) |
Definition at line 2094 of file logic.c.
References FindSceneAnimationCommand().
Referenced by FindSceneAnimationCommand(), init_3Space_objects(), and UpdateSceneAnimationObject().
| void fire_when_ready | ( | short | obj, |
| short | aimed ) |
Definition at line 956 of file logic.c.
References acShipTargetTable, aiPilotLevel, fire(), fire_when_ready(), nFacingToTargetValue, nYourWingman, ship_vs_ship(), and void().
Referenced by close_behind(), fire_when_ready(), Msit_n_fire(), Mstrafe_enemy(), and Mtail_fire().
| unsigned int FireOnAlternateTurns | ( | short | obj | ) |
Definition at line 948 of file logic.c.
References abShipTurnList, acShipTargetTable, fire(), and FireOnAlternateTurns().
Referenced by FireOnAlternateTurns().
| void flag_ace | ( | short | ace, |
| unsigned char | bits ) |
Definition at line 127 of file logic.c.
References CampaignState::aceFlags, flag_ace(), and stCampaignState.
Referenced by ace_greeting(), flag_ace(), kill_ace(), and prepare_ace().
| unsigned int free_3Space | ( | void | ) |
Definition at line 1975 of file logic.c.
References b3SpaceObjectsActive, bViewBufferEnabled, free_3Space(), free_3Space_objects(), free_constellation(), GetScreenUpdateFlag(), remove_all_3d_objects(), and remove_all_hazards().
Referenced by free_3Space(), GameFlow(), init_3Space_objects(), RunAnimationDemoLoop(), RunTrainSim(), ShowCampaignVictorySequence(), ShowTigerClawEscapeScene(), and Title_Sequence().
| unsigned int free_3Space_objects | ( | void | ) |
Definition at line 1990 of file logic.c.
References aCommon3SpaceResources, aMissionResourceDescriptors, ObjectTypeData::animation, aObjectTypeData, free_3Space_objects(), free_ship(), FreeShapeSet(), OBJECT_TYPE_DEBRIS_GLASS, OBJECT_TYPE_DEBRIS_METAL_SHEET, OBJECT_TYPE_DEBRIS_O_RING, OBJECT_TYPE_DEBRIS_PIPE, OBJECT_TYPE_DEBRIS_SHIP_GIRDER_CHUNK, OBJECT_TYPE_DEBRIS_SHIP_TUBING, OBJECT_TYPE_DEBRIS_WING, OBJECT_TYPE_DUMB_FIRE_MISSILE, OBJECT_TYPE_FF_MISSILE, OBJECT_TYPE_IMAGE_RECOGNITION_MISSILE, and ObjectTypeData::shapeSet.
Referenced by free_3Space(), free_3Space_objects(), and init_3Space_objects().
| unsigned int free_cockpit | ( | void | ) |
Definition at line 1876 of file logic.c.
References aCockpitPrimaryResources, aCockpitSecondaryResources, bCockpitResourcesActive, cCockpitLogicalFile, cCurrentCockpitView, free_cockpit(), free_viewport(), FreeCommDisplayResources(), FreePacketAndClear(), FreeShapeSet(), GetScreenUpdateFlag(), pCockpitExplosionBackground, pCockpitPilotShape, pCurrentPilotHandShapePtr, pCurrentScreenViewportPkt, pDamageDisplayBackground, pRadarMarkerBackground, pReleaseWeaponDisplayBackground, ReleasePacketHandle(), ReleaseTextFont(), stPilotHandBackdropView, and stPilotHandComposite.
Referenced by close_behind(), death_sequence(), ejection_sequence(), free_cockpit(), GameFlow(), InitializeCockpitResources(), RunTrainSim(), and stranded_sequence().
| unsigned int free_constellation | ( | void | ) |
Definition at line 1697 of file logic.c.
References asConstellationObjectIndices, free_constellation(), FreeConstellationObject(), FreePacketAndClear(), and pCurrentConstellationShape.
Referenced by close_behind(), free_3Space(), free_constellation(), funeral_sequence(), RecRoom(), RunAnimationDemoLoop(), and SceneDirector().
| unsigned int free_inflight_music | ( | void | ) |
Definition at line 2024 of file logic.c.
References abAudioPlaybackSlots, free_inflight_music(), nInFlightMusicActive, nInFlightMusicSlotA, nInFlightMusicSlotB, and StopMusicUnlessSuppressed().
Referenced by free_inflight_music(), funeral_sequence(), init_3Space_objects(), and RunSpaceFlight().
| unsigned int FreeConstellationObject | ( | short | object | ) |
Definition at line 1657 of file logic.c.
References apObjShapeArray, FreeConstellationObject(), FreePacketAndClear(), and remove_object().
Referenced by close_behind(), free_constellation(), and FreeConstellationObject().
Definition at line 37 of file mathutil.c.
| int FreeShapeSet | ( | PacketResourceDescriptor * | resources, |
| unsigned short | releaseFlags ) |
Definition at line 1417 of file logic.c.
References FreePacketAndClear(), FreeShapeSet(), and PacketResourceDescriptor::resource.
Referenced by close_behind(), free_3Space_objects(), free_cockpit(), FreeShapeSet(), and Title_Sequence().
| unsigned int get_first_follow_point | ( | short | obj, |
| FixedVector * | point ) |
Definition at line 1260 of file logic.c.
References abShipNavPtIdx, aeShipSide, cCurrentNavPtIdx, get_first_follow_point(), get_follow_point(), and SIDE_IMPERIAL.
Referenced by close_behind(), coming_home(), get_first_follow_point(), and reach_warp().
| unsigned int get_follow_point | ( | short | obj, |
| FixedVector * | point ) |
Definition at line 1224 of file logic.c.
References abFlightPathList, abShipNavPtIdx, aeShipSide, aMissionNavPoints, aMissionObjectivesArray, anShipMissionShips, aShipPositionsArray, find_ship_index(), get_follow_point(), MissionNavPoint::position, MissionObjective::position, SIDE_KILRATHI, and MissionObjective::type.
Referenced by close_behind(), cruise_home(), cruise_to_destination(), get_first_follow_point(), and get_follow_point().
| unsigned int get_front_spot | ( | short | obj, |
| unsigned short | distance, | ||
| FixedVector * | point ) |
Definition at line 794 of file logic.c.
References AddFixedVectors(), aShipFwdVec, aShipPositionsArray, get_front_spot(), and ScaleFixedVector().
Referenced by get_front_spot(), and Mchill().
| unsigned int get_rear_spot | ( | short | obj, |
| unsigned short | distance, | ||
| FixedVector * | point ) |
Definition at line 804 of file logic.c.
References AddFixedVectors(), aShipFwdVec, aShipPositionsArray, get_rear_spot(), and ScaleFixedVector().
Referenced by get_rear_spot().
| unsigned int __stdcall GetPacketSize | ( | const char * | filename, |
| short | section ) |
| int gone_ship | ( | short | missionShip | ) |
Definition at line 1134 of file logic.c.
References aMissionShips, and gone_ship().
Referenced by check_destroy_target(), check_goal(), close_behind(), and gone_ship().
| unsigned int HasSpeechBuffer | ( | void | ) |
Definition at line 176 of file logic.c.
References anShipAlertFlags, and HasSpeechBuffer().
Referenced by HasSpeechBuffer().
| int hostile_sphere | ( | short | obj, |
| short | navPoint ) |
Definition at line 1270 of file logic.c.
References aeShipSide, aMissionNavPoints, aMissionShips, hostile_sphere(), and MissionNavPoint::missionShips.
Referenced by abandoned(), close_behind(), and hostile_sphere().
| int in_danger | ( | short | obj | ) |
Definition at line 1006 of file logic.c.
References acShipTargetTable, aeObjectClass, aeShipSide, aeSpecialManeuvers, distance_from_object(), in_danger(), nTargetShip, nTgtRange, OBJECT_CLASS_SHIP, and SPECIAL_MANEUVER_UNKNOWN_9.
Referenced by close_behind(), defend_mission(), escort_mission(), in_danger(), and select_safe_target().
| void inherit_leader | ( | short | obj | ) |
Definition at line 1110 of file logic.c.
References aeObjectClass, asShipWingLeaderArray, inherit_leader(), inherit_leader_mission(), and OBJECT_CLASS_SHIP.
Referenced by close_behind(), inherit_leader(), and kilrathi_wingman().
| void inherit_leader_mission | ( | short | obj | ) |
Definition at line 1093 of file logic.c.
References aeObjectClass, aeShipMissionType, anShipMissionShips, aShipMissionSpotArray, asShipWingLeaderArray, inherit_leader_mission(), and OBJECT_CLASS_SHIP.
Referenced by close_behind(), inherit_leader(), inherit_leader_mission(), and ship_intelligence().
| unsigned int init_3Space_objects | ( | short | scene | ) |
Definition at line 1904 of file logic.c.
References aObjectResourceSlotsArray, b3SpaceObjectsActive, bMissileCameraEnabled, bScriptedView, cScreenViewMode, init_3Space_objects(), init_constellation(), load_common_3Space_objects(), nClosestVisibleObject, nCurrentSpaceFrameValue, nExternalViewShip, nPlayerCollisionObject, nRenderedSpaceFrame, remove_all_3d_objects(), and ObjectResourceSlot::type.
| unsigned int init_constellation | ( | short | scene | ) |
Definition at line 1665 of file logic.c.
References asConstellationObjectIndices, FetchDiskPacketRetrying(), find_vacant_3d_object(), init_constellation(), InitializeConstellationObject(), nTrainSimActive, pConstellationDefinitionsPtr, and pCurrentConstellationShape.
Referenced by close_behind(), funeral_sequence(), init_3Space_objects(), init_constellation(), LoadFace(), RecRoom(), and SceneDirector().
| unsigned int init_formation_burst | ( | short | obj | ) |
Definition at line 627 of file logic.c.
References acFormationMemberLists, AddFixedVectors(), aShipDestinationsArray, aShipPositionsArray, build_squad_list(), ComputeVectorDelta(), find_squad_center(), init_formation_burst(), OBJECTIVE_BREAK_FORMATION, reset_objective(), ScaleFixedVector(), and steady_object().
Referenced by approach_and_engage(), init_formation_burst(), and patrol_area().
| unsigned int init_inflight_music | ( | void | ) |
Definition at line 2015 of file logic.c.
References init_inflight_music(), nCombatMusicActive, nInFlightMusicActive, and nInitialFlightMusicPending.
Referenced by init_3Space_objects(), init_inflight_music(), and RunSpaceFlight().
Definition at line 1716 of file logic.c.
References anVduModeCache, cBlackColour, cPrimaryTextColour, init_vdus(), InitializeTextContextFromFont(), nTrainSimActive, set_mode(), stLeftVdu, stLeftVduTextContext, stRightVduTxtContext, stRightVduViewport, stScreenView, szDefaultTxtBuf, TextContext::text, and TextContext::viewport.
Referenced by close_behind(), init_vdus(), and InitializeCockpitResources().
| unsigned int initialize_cockpit | ( | int | requestedMode | ) |
Definition at line 1481 of file logic.c.
References apCockpitShapesList, bCockpitlessView, bIntroSceneResourcesActive, Viewport::bottom, bViewBufferEnabled, cBlackColour, cCockpitLogicalFile, cCurrentCockpitView, clear_head_up_display(), ClearViewport(), cPrimaryViewBufferColour, cScreenViewMode, DIBslam(), DIBslamReal(), DrawSpriteDefault(), EndCommMenu(), explosion_draw(), FetchDiskPacketRetrying(), GetScreenUpdateFlag(), initialize_cockpit(), initialize_view_buffer(), InvalidateVduMode(), Viewport::left, message_showing(), nScreenHeight, nScreenWidth, pCinematicViewBackdropPtr, Viewport::pixels, pLogicRearViewBackdropPtr, ReleasePacketHandle(), reset_cockpit(), ResetCockpitPaletteEntries(), ResetPilotHandAnimation(), Viewport::right, set_up_screen_viewport(), SetViewportRect(), stModalSrcViewport, stScreenView, stSpaceBufferViewport, Viewport::top, and update_VDUs().
Referenced by close_behind(), HandleSpaceFlightControls(), initialize_cockpit(), new_view(), RunSpaceFlight(), and SetFleetOverviewView().
| unsigned int InitializeCockpitResources | ( | signed char | mode | ) |
Definition at line 1741 of file logic.c.
References aCockpitPrimaryResources, aCockpitSecondaryResources, AllocateTaggedMemory(), AllocateViewport(), aObjectTypeData, aShipWeaponsTable, bCockpitResourcesActive, bCommVideoEnabled, ShortRect::bottom, bRadioSilence, cBlackColour, cCockpitLogicalFile, cCurrentCockpitView, clear_cockpit_damage(), ClearHudGunReadouts(), cPrimaryTextColour, free_cockpit(), GetScreenUpdateFlag(), init_personalities(), init_vdus(), InitializeCockpitReadout(), InitializeCockpitResources(), InitializeTextContextFromFont(), ShortRect::left, Viewport::left, CockpitLayout::leftVduBounds, LoadPacketAllocated(), LoadShapeSet(), MaxShort(), MeasureShapeFrameStorage(), nCockpitExplosionFrame, nMemoryConfig, nSceneResourceBudgetValue, OBJECT_CLASS_MISSILE, pCockpitExplosionBackground, pCockpitExplosionShape, pCockpitWeaponShapePtr, pCurrentPilotHandShapePtr, pCurrentScreenViewportPkt, pDamageDisplayBackground, CockpitLayout::pilotHandBounds, pRadarMarkerBackground, pReleaseWeaponDisplayBackground, pTgtLockShapePtr, CockpitLayout::readoutOrigins, reset_cockpit(), ResetScannerContacts(), ShortRect::right, CockpitLayout::rightVduBounds, SetTextContext(), SetTextCursor(), SetViewportRect(), stCockpitBar, stCockpitLayout, stCurrentCockpitReadoutTextCtx, stLeftVdu, stPilotHandBackdropView, stPilotHandComposite, stPilotHandView, stRightVduViewport, stScreenView, ShortRect::top, TextContext::viewport, ShortPoint::x, and ShortPoint::y.
Referenced by close_behind(), init_mission(), InitializeCockpitResources(), and RunAnimationDemoLoop().
| unsigned int InitializeConstellationObject | ( | const ConstellationObjectDefinition * | definition, |
| short | object ) |
Definition at line 1633 of file logic.c.
References aeObjectClass, aeObjectTypeList, alter_pitch(), alter_roll(), alter_yaw(), apObjShapeArray, aShipFwdVec, aShipPositionsArray, asObjectViewFrames, asObjScreenAngles, asObjScreenScalesArray, FetchDiskPacketRetrying(), init_ijk(), InitializeConstellationObject(), OBJECT_CLASS_PLANET, OBJECT_TYPE_HORNET, ConstellationObjectDefinition::pitch, ConstellationObjectDefinition::roll, ScaleFixedVector(), ConstellationObjectDefinition::shapePacket, and ConstellationObjectDefinition::yaw.
Referenced by close_behind(), init_constellation(), and InitializeConstellationObject().
| int is_ship_tailing_player_target | ( | short | obj | ) |
Definition at line 552 of file logic.c.
References acShipTargetTable, being_tailed(), is_ship_tailing_player_target(), and unactive().
Referenced by gametrack(), and is_ship_tailing_player_target().
| unsigned int IsVectorWithinRange | ( | FixedVector * | vector, |
| short | range ) |
Definition at line 1212 of file eventmgr.c.
| void kill_ace | ( | short | ace | ) |
Definition at line 133 of file logic.c.
References ace_status(), flag_ace(), kill_ace(), and unflag_ace().
Referenced by kill_ace(), and personality_killed().
| unsigned int load_common_3Space_objects | ( | void | ) |
Definition at line 1930 of file logic.c.
References aCommon3SpaceResources, ObjectTypeData::animation, aObjectTypeData, load_common_3Space_objects(), load_ship(), LoadShapeSet(), OBJECT_TYPE_DEBRIS_GLASS, OBJECT_TYPE_DEBRIS_O_RING, OBJECT_TYPE_DEBRIS_PIPE, OBJECT_TYPE_DEBRIS_SHIP_GIRDER_CHUNK, OBJECT_TYPE_DEBRIS_SHIP_TUBING, 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_TURRET, and ObjectTypeData::shapeSet.
Referenced by init_3Space_objects(), init_3Space_objects(), and load_common_3Space_objects().
| int LoadPacketResourceList | ( | PacketResourceDescriptor * | resources, |
| short | flags, | ||
| int | availableBytes ) |
Definition at line 1429 of file logic.c.
References FetchDiskPacketRetrying(), GetPacketSize(), LoadPacketResourceList(), PacketResourceDescriptor::logicalFile, DiskFileRecord::name, pDiskFileRecords, PromptInsertNumberedDisk(), PacketResourceDescriptor::resource, and PacketResourceDescriptor::section.
Referenced by close_behind(), init_mission(), LoadPacketResourceList(), and Title_Sequence().
| unsigned short LoadSceneAnimationResources | ( | short | scene, |
| short | variant ) |
Definition at line 2058 of file logic.c.
References asSceneAnimationLogicalFiles, FetchDiskPacketRetrying(), LoadSceneAnimationResources(), pCurrentSceneAnimationPrimaryShape, pSceneAnimationDefinitionsPtr, pSceneAnimationObjects, pSceneAnimationPacketPtr, pSceneAnimationSceneDataPtr, pSceneAnimationSecondaryShape, and pSceneAnimationTextData.
Referenced by init_3Space_objects(), LoadSceneAnimationResources(), and ShowMeanwhileTransition().
| int LoadShapeSet | ( | PacketResourceDescriptor * | resources, |
| unsigned short | flags, | ||
| short | defaultLogicalFile ) |
Definition at line 1395 of file logic.c.
References FetchDiskPacketRetrying(), LoadShapeSet(), PacketResourceDescriptor::logicalFile, PacketResourceDescriptor::resource, and PacketResourceDescriptor::section.
Referenced by close_behind(), InitializeCockpitResources(), load_common_3Space_objects(), LoadShapeSet(), and LoadSpaceflightResources().
| int locate_ship | ( | short | missionShip, |
| FixedVector * | point ) |
Definition at line 1200 of file logic.c.
References AddFixedVectors(), aMissionNavPoints, aMissionShips, aShipPositionsArray, dead_ship(), find_ship_index(), find_ships_sphere(), locate_ship(), and zero_vector().
Referenced by close_behind(), init_intelligence_data(), locate_ship(), and LocateMobileObjective().
| short mine_available | ( | short | obj | ) |
Definition at line 1389 of file logic.c.
References find_weapon(), mine_available(), and OBJECT_TYPE_SPACE_MINE.
Referenced by close_behind(), Mdrop_a_mine(), mine_available(), and pick_regular_maneuver().
| short MinShort | ( | short | a, |
| short | b ) |
Definition at line 20 of file mathutil.c.
| int missile_on_tail | ( | short | obj | ) |
Definition at line 562 of file logic.c.
References acShipTargetTable, aeObjectClass, missile_on_tail(), and OBJECT_CLASS_MISSILE.
Referenced by gametrack(), intelligence_events(), missile_on_tail(), Mkill_missile(), and update_missile_warning().
| short nearest_enemy_range | ( | short | obj | ) |
Definition at line 908 of file logic.c.
References aeObjectClass, aeShipSide, aeSpecialManeuvers, distance_from_object(), MinShort(), nearest_enemy_range(), nTargetShip, OBJECT_CLASS_SHIP, and SPECIAL_MANEUVER_UNKNOWN_9.
Referenced by close_behind(), and nearest_enemy_range().
| signed char no_goal | ( | short | ship | ) |
Definition at line 495 of file logic.c.
References anPitchGoal, anRollGoal, anYawTarget, and no_goal().
Referenced by chase_location(), coming_home(), cruise_home(), cruise_to_destination(), defend_mission(), escort_buddy(), formation_break(), formation_burst(), general_zig(), goto_formation(), goto_location(), Mburnout(), Mbuzz_debris(), Mcorkscrew(), Mfish_hook(), Mget_distance(), Mhard_turn(), Mline_up_drop(), Mram_missile(), Msit_n_fire(), Msit_n_spin(), Msplit_left(), Msplit_right(), Msuicide_run(), Mtail_fire(), Mtarget_missile(), Mtight_loop(), Mtry2tail(), Mturn_n_kick(), Mturn_n_spin(), Mveer_away(), Mwabble(), Mzip_past(), no_goal(), orbit_sphere(), patrol_area(), prepare_for_jump(), prevent_collision(), rendezvous_mission(), return_to_buddy(), streak_toward(), and tanker_intelligence().
| short normal_speed | ( | short | obj | ) |
Definition at line 220 of file logic.c.
References aeSpecialManeuvers, asShipMaximumSpeedArray, normal_speed(), real_velocity(), and SPECIAL_MANEUVER_AFTERBURNER.
Referenced by cruise_home(), goto_formation(), house_keep_objects(), Mfish_hook(), Mget_distance(), Mveer_away(), normal_speed(), prevent_collision(), run_away(), and streak_toward().
| void PlaySceneAnimation | ( | char * | text, |
| short | animation, | ||
| short | duration ) |
Definition at line 2418 of file logic.c.
References AddPCName(), bEscapePressedFlag, bSceneAnimationWaitCommand, bSlowSceneAnimation, cBlackColour, CheckEscaped(), ClearInputKeyState(), ClearViewport(), DIBslam(), DIBslamReal(), FormatTextBufferFromStart(), IsFrameTickElapsed(), SceneAnimationObject::layer, nConvTextColorValue, nFrameSkip, nFrameSkipCounter, nSceneAnimationDelayFrames, pCurrentSceneAnimationPrimaryShape, PlaySceneAnimation(), pSceneAnimationDefinitionsPtr, pSceneAnimationObjects, pSceneAnimationSecondaryShape, RefreshMemoryStatusOverlay(), SetFrameTimerPeriodDirect(), stCurrentConvTextViewport, stSceneBuffer, szTxtWorkspaceBuffer, and UpdateSceneAnimationObject().
Referenced by init_3Space_objects(), PlaySceneAnimation(), and SceneDirector().
| unsigned int PreloadMusicTrackHook | ( | short | track | ) |
Definition at line 2044 of file logic.c.
References PreloadMusicTrackHook(), and void().
Referenced by AwardCampaignMedal(), BarracksScreen(), Briefing(), DeBriefing(), ejection_sequence(), funeral_sequence(), init_3Space_objects(), landing(), Office(), PlayScrambleHangarScene(), PreloadMusicTrackHook(), RecRoom(), RunTrainSim(), ShowCampaignVictorySequence(), ShowCarrierLaunchSequence(), ShowMeanwhileTransition(), ShowTheEndScreen(), ShowTigerClawEscapeScene(), and Title_Sequence().
| void prepare_ace | ( | short | ace | ) |
Definition at line 153 of file logic.c.
References flag_ace(), prepare_ace(), and unflag_ace().
Referenced by init_personalities(), and prepare_ace().
| short real_crash_time | ( | short | obj, |
| short | other ) |
Definition at line 230 of file logic.c.
References AddFixedVectors(), aShipPositionsArray, aShipVelocity, asObjectCollisionRadius, ComputeVectorDelta(), DivideFixed(), FixedToShortSaturating(), MaxShort(), real_crash_time(), ScaleFixedVector(), and Vector_magnitude().
Referenced by crash_time(), and real_crash_time().
| unsigned int ReleaseMusicTrackHook | ( | short | track | ) |
Definition at line 2051 of file logic.c.
References ReleaseMusicTrackHook(), and void().
Referenced by AwardCampaignMedal(), BarracksScreen(), Briefing(), DeBriefing(), ejection_sequence(), funeral_sequence(), init_3Space_objects(), landing(), Office(), RecRoom(), ReleaseMusicTrackHook(), RunTrainSim(), scramble(), ShowCampaignVictorySequence(), ShowCarrierLaunchSequence(), ShowMeanwhileTransition(), ShowTheEndScreen(), ShowTigerClawEscapeScene(), and Title_Sequence().
Definition at line 2085 of file logic.c.
References pCurrentSceneAnimationPrimaryShape, pSceneAnimationDefinitionsPtr, pSceneAnimationPacketPtr, pSceneAnimationSecondaryShape, ReleasePacketHandle(), and ReleaseSceneAnimationResources().
Referenced by init_3Space_objects(), ReleaseSceneAnimationResources(), and ShowMeanwhileTransition().
| unsigned int remove_all_3d_objects | ( | void | ) |
Definition at line 1963 of file logic.c.
References remove_all_3d_objects(), and remove_object().
Referenced by free_3Space(), init_3Space_objects(), init_3Space_objects(), and remove_all_3d_objects().
| int report_kilrathi_rout | ( | int | mode | ) |
Definition at line 391 of file logic.c.
References aeObjectClass, aeShipMissionType, aeShipObjectiveList, aeShipSide, aeSpecialManeuvers, check_next_wave(), distance_from_object(), MISSION_TYPE_ROUT, nCurrentWave, OBJECT_CLASS_SHIP, OBJECTIVE_DESTROY_SHIP, OBJECTIVE_ENGAGE_ENEMY, report_kilrathi_rout(), SIDE_KILRATHI, and SPECIAL_MANEUVER_UNKNOWN_9.
Referenced by auto_pilot_sequence(), disobey_formation(), gametrack(), new_space_music_changes(), report_kilrathi_rout(), and reset_mission_type().
| void reset_maneuver | ( | short | ship, |
| short | maneuver ) |
Definition at line 712 of file logic.c.
References acShipSequence, aeShipManeuversTable, asShipTotal, and reset_maneuver().
Referenced by alter_tactic(), explode(), house_keep_objects(), maneuver_complete(), Mchill(), Mkill_missile(), Msit_n_spin(), Mtarget_missile(), process_maneuver_node(), reset_maneuver(), reset_tactic(), ShipAiState35(), and try2reset_maneuver().
| unsigned int reset_mission_type | ( | short | obj, |
| enum ShipMissionType | missionType ) |
Definition at line 653 of file logic.c.
References aeShipMissionType, aeShipSide, MISSION_TYPE_ROUT, OBJECTIVE_NONE, report_kilrathi_rout(), reset_mission_type(), reset_objective(), and SIDE_KILRATHI.
Referenced by arrive_from_warp(), change_mission_type(), check_goal(), rendezvous_mission(), reset_mission_type(), Set_up_ship_info(), and try2rout().
| unsigned int reset_objective | ( | short | ship, |
| enum ShipObjective | objective ) |
Definition at line 676 of file logic.c.
References aeShipObjectiveList, reset_objective(), reset_tactic(), steady_object(), and TACTIC_NONE.
Referenced by clean_up_cockpit(), defend_mission(), engage(), escort_mission(), fail(), imperial_wingman(), init_formation_burst(), intelligence_events(), kilrathi_wingman(), rendezvous_mission(), request(), reset_mission_type(), reset_objective(), return_to_buddy(), return_to_master(), and strike_mission().
| unsigned int reset_tactic | ( | short | ship, |
| enum ShipTactic | tactic ) |
Definition at line 694 of file logic.c.
References acShipTargetTable, aeShipTacticArray, MANEUVER_NONE, reset_maneuver(), and reset_tactic().
Referenced by capital_ship_intelligence(), coming_home(), cruise_home(), cruise_to_destination(), patrol_area(), prepare_for_jump(), reach_warp(), reset_objective(), reset_tactic(), and warp_arrival().
| unsigned int ResetCockpitPaletteEntries | ( | void | ) |
Definition at line 1457 of file logic.c.
References aPaletteFadeEntries, asDamageFlashColour, cPrimaryViewBufferColour, ResetCockpitPaletteEntries(), and SetPaletteEntry().
Referenced by close_behind(), initialize_cockpit(), LoadGamePaletteFile(), ResetCockpitPaletteEntries(), and RunSpaceFlight().
| short scan_for_enemy | ( | short | obj, |
| unsigned short | range ) |
Definition at line 856 of file logic.c.
References aeObjectClass, aeShipSide, aeSpecialManeuvers, aShipPositionsArray, distance_from_object(), distance_from_point(), get_facing_range_from_object(), nTargetShip, nTgtRange, OBJECT_CLASS_SHIP, scan_for_enemy(), and SPECIAL_MANEUVER_UNKNOWN_9.
Referenced by approach_and_engage(), capital_ship_intelligence(), close_behind(), cruise_to_destination(), defend_mission(), scan_and_lock(), scan_for_enemy(), and select_target().
| short __stdcall SceneAnimationGoalReached | ( | short | delta, |
| short | current, | ||
| short | goal ) |
Definition at line 2135 of file logic.c.
References SceneAnimationGoalReached().
Referenced by init_3Space_objects(), SceneAnimationGoalReached(), and UpdateSceneAnimationObject().
| int select_safe_target | ( | short | obj | ) |
Definition at line 1070 of file logic.c.
References acFormationMemberLists, build_target_list(), in_danger(), nTargetShip, RandomBelowOrEqual(), and select_safe_target().
Referenced by close_behind(), and select_safe_target().
| short select_weighted_value | ( | short * | choices | ) |
Definition at line 575 of file logic.c.
References RandomBelowOrEqual(), and select_weighted_value().
Referenced by select_weighted_value().
| unsigned short set_alert | ( | short | i, |
| unsigned int | bits ) |
Definition at line 182 of file logic.c.
References anShipAlertFlags, and set_alert().
Referenced by set_alert(), start_collision_alert(), and try2end_collision_alert().
| unsigned int set_special | ( | short | ship, |
| enum SpecialManeuver | special ) |
Definition at line 729 of file logic.c.
References aeSpecialManeuvers, alert_flag(), set_special(), SPECIAL_MANEUVER_BLOWING_UP, and SPECIAL_MANEUVER_NONE.
Referenced by accelerate_and_move_object(), check_for_lost_control(), cruise_home(), cruise_to_destination(), Explosion(), fire_afterburner(), fire_super_brake(), maneuver_complete(), Mgloat(), Mhard_break(), Msit_n_spin(), Mturn_n_spin(), pilot_hit(), prepare_for_jump(), rotate_object_to_goal(), set_special(), and start_collision_alert().
| unsigned int ships_within_range | ( | short | obj, |
| short | other, | ||
| short | range ) |
Definition at line 969 of file logic.c.
References aShipPositionsArray, ComputeVectorDelta(), IsVectorWithinRange(), and ships_within_range().
Referenced by close_behind(), ships_within_range(), and target_within_range().
| short signed_random | ( | short | range | ) |
Definition at line 160 of file logic.c.
References RandomBelowOrEqual(), and signed_random().
Referenced by generate_stars(), make_shard(), Mwabble(), prepare_for_jump(), signed_random(), tanker_intelligence(), try_far_spot(), and update_star_field().
| int skill_check | ( | short | obj, |
| short | difficulty ) |
Definition at line 1158 of file logic.c.
References difficulty(), MinShort(), RandomBelowOrEqual(), skill_check(), and skill_rating().
Referenced by check_for_lost_control(), close_behind(), pilot_hit(), rotate_object_to_goal(), and skill_check().
| short skill_rating | ( | short | obj | ) |
Definition at line 1144 of file logic.c.
References aiPilotLevel, MaxShort(), and skill_rating().
Referenced by close_behind(), skill_check(), and skill_rating().
| void start_collision_alert | ( | short | obj, |
| short | other ) |
Definition at line 197 of file logic.c.
References abCollisionAlertTargets, asCollisionDelayList, asShipAfterburnerTimer, set_alert(), set_special(), SPECIAL_MANEUVER_NONE, start_collision_alert(), and steady_object().
Referenced by handle_collisions(), and start_collision_alert().
| int target_valid | ( | short | obj | ) |
Definition at line 1319 of file logic.c.
References acShipTargetTable, aeShipSide, target_valid(), and unactive().
Referenced by check_destroy_target(), check_engage_target(), close_behind(), and target_valid().
| unsigned int target_within_range | ( | short | obj | ) |
Definition at line 1034 of file logic.c.
References acShipTargetTable, ships_within_range(), target_within_range(), and unactive().
Referenced by close_behind(), and target_within_range().
| int trim_goals | ( | short | obj, |
| short | amount ) |
Definition at line 372 of file logic.c.
References anPitchGoal, anYawTarget, and trim_goals().
Referenced by chase_location(), goto_formation(), orbit_sphere(), patrol_area(), and trim_goals().
| unsigned int triumph | ( | short | obj | ) |
Definition at line 1328 of file logic.c.
References abFlightPathList, aeShipMissionType, anShipMissionShips, dead_ship(), MISSION_TYPE_DEFEND, MISSION_TYPE_ESCORT, MISSION_TYPE_PATROL, MISSION_TYPE_STRIKE, MISSION_TYPE_WINGMAN, triumph(), and visited().
Referenced by changetrack(), close_behind(), i_wanna_rout(), and triumph().
| void try2end_collision_alert | ( | short | obj | ) |
Definition at line 210 of file logic.c.
References asCollisionDelayList, clear_alert(), set_alert(), and try2end_collision_alert().
Referenced by prevent_collision(), and try2end_collision_alert().
| void try2reset_maneuver | ( | short | obj, |
| short | maneuver ) |
Definition at line 720 of file logic.c.
References aeShipManeuversTable, reset_maneuver(), steady_object(), and try2reset_maneuver().
Referenced by perform_maneuver(), and try2reset_maneuver().
| short try2rout | ( | short | obj | ) |
Definition at line 464 of file logic.c.
References acShipStressList, aeObjectClass, aeShipSide, aeSpecialManeuvers, maneuver_complete(), MISSION_TYPE_ROUT, nTrainSimActive, nYourWingman, OBJECT_CLASS_CAPITAL_SHIP, reset_mission_type(), send_message(), SPECIAL_MANEUVER_UNKNOWN_9, and try2rout().
Referenced by Mrout_me(), request(), and try2rout().
| unsigned int unactive | ( | short | ship | ) |
Definition at line 353 of file logic.c.
References aeObjectClass, aeShipManeuversTable, MANEUVER_HARD_BRAKE, OBJECT_CLASS_SHIP, and unactive().
Referenced by are_alive(), capital_ship_intelligence(), escort_mission(), have_target(), intelligence_events(), is_ship_tailing_player_target(), kilrathi_wingman(), Mtry2tail(), Mzip_past(), patrol_area(), perform_maneuver(), rendezvous_mission(), run_away(), target_valid(), target_within_range(), and unactive().
| void unflag_ace | ( | short | ace, |
| unsigned char | bits ) |
Definition at line 121 of file logic.c.
References CampaignState::aceFlags, stCampaignState, and unflag_ace().
Referenced by explode(), kill_ace(), prepare_ace(), and unflag_ace().
| unsigned short __stdcall UpdateSceneAnimationObject | ( | SceneAnimationObject * | object, |
| Viewport * | viewport ) |
Definition at line 2151 of file logic.c.
References bSceneAnimationWaitCommand, SceneAnimationObject::delay, SceneAnimationObject::deltaFrame, SceneAnimationObject::deltaRotation, SceneAnimationObject::deltaScale, SceneAnimationObject::deltaX, SceneAnimationObject::deltaY, DrawSpriteScaled(), FindSceneAnimationCommand(), SceneAnimationObject::frame, SceneAnimationObject::goalFrame, SceneAnimationObject::goalRotation, SceneAnimationObject::goalScale, SceneAnimationObject::goalX, SceneAnimationObject::goalY, nFrameSkipCounter, nSceneAnimationDelayFrames, pSceneAnimationDefinitionsPtr, pSceneAnimationObjects, SceneAnimationObject::rotation, SceneAnimationObject::scale, SceneAnimationGoalReached(), SceneAnimationObject::shape, UpdateSceneAnimationObject(), SceneAnimationObject::x, and SceneAnimationObject::y.
Referenced by init_3Space_objects(), PlaySceneAnimation(), and UpdateSceneAnimationObject().
| void zero_vector | ( | FixedVector * | vector | ) |
| PacketResourceDescriptor aCockpitPrimaryResources[8] |
Definition at line 77 of file logic.c.
Referenced by free_cockpit(), and InitializeCockpitResources().
| PacketResourceDescriptor aCockpitResourceDescriptors[19] |
Definition at line 49 of file logic.c.
Referenced by LoadSpaceflightResources().
| PacketResourceDescriptor aCockpitSecondaryResources[5] |
Definition at line 70 of file logic.c.
Referenced by free_cockpit(), and InitializeCockpitResources().
| PacketResourceDescriptor aCommon3SpaceResources[12] |
Definition at line 24 of file logic.c.
Referenced by free_3Space_objects(), load_common_3Space_objects(), and LoadSpaceflightResources().
| PacketResourceDescriptor aMissionResourceDescriptors[5] |
Definition at line 40 of file logic.c.
Referenced by free_3Space_objects(), init_mission(), and LoadSpaceflightResources().
| struct Shape* apCockpitShapesList[4] |
Definition at line 108 of file logic.c.
Referenced by initialize_cockpit().
| short asConstellationObjectIndices[4] |
Definition at line 88 of file logic.c.
Referenced by free_constellation(), and init_constellation().
| short asSceneAnimationLogicalFiles[8] |
Definition at line 93 of file logic.c.
Referenced by LoadSceneAnimationResources().
| int b3SpaceObjectsActive = 0 |
Definition at line 92 of file logic.c.
Referenced by free_3Space(), and init_3Space_objects().
| int bCockpitResourcesActive = 0 |
Definition at line 91 of file logic.c.
Referenced by free_cockpit(), and InitializeCockpitResources().
| int bCurrentPlayerDestroyed |
Definition at line 111 of file logic.c.
Referenced by explode(), and prepare_mission().
| unsigned int bIntroSceneResourcesActive = 1 |
Definition at line 87 of file logic.c.
Referenced by initialize_cockpit(), ShowCampaignVictorySequence(), ShowCarrierLaunchSequence(), ShowTigerClawEscapeScene(), and Title_Sequence().
| short bSceneAnimationWaitCommand = 0 |
Definition at line 96 of file logic.c.
Referenced by PlaySceneAnimation(), and UpdateSceneAnimationObject().
| signed char cCockpitLogicalFile |
Definition at line 107 of file logic.c.
Referenced by death_sequence(), DrawPendingCockpitDamage(), ejection_sequence(), EnterPilotNameAndCallsign(), explosion_draw(), free_cockpit(), initialize_cockpit(), InitializeCockpitResources(), landing(), RunTrainSim(), scramble(), and ShowTrainSimHighScores().
| short nPlayerKillTotal |
Definition at line 112 of file logic.c.
Referenced by AddPCName(), analyze_kill(), can_land(), ParseTests(), PostMission(), prepare_mission(), and show_info_disp().
| short nSceneAnimationDelayFrames |
Definition at line 104 of file logic.c.
Referenced by PlaySceneAnimation(), and UpdateSceneAnimationObject().
| struct Shape* pCinematicViewBackdropPtr |
Definition at line 109 of file logic.c.
Referenced by initialize_cockpit().
| struct Shape* pCurrentSceneAnimationPrimaryShape |
Definition at line 100 of file logic.c.
Referenced by LoadSceneAnimationResources(), PlaySceneAnimation(), and ReleaseSceneAnimationResources().
| struct Shape* pLogicRearViewBackdropPtr |
Definition at line 110 of file logic.c.
Referenced by initialize_cockpit().
| unsigned char* pSceneAnimationDefinitionsPtr |
Definition at line 105 of file logic.c.
Referenced by LoadSceneAnimationResources(), PlaySceneAnimation(), ReleaseSceneAnimationResources(), and UpdateSceneAnimationObject().
| SceneAnimationObject* pSceneAnimationObjects |
Definition at line 103 of file logic.c.
Referenced by LoadSceneAnimationResources(), PlaySceneAnimation(), and UpdateSceneAnimationObject().
| unsigned char* pSceneAnimationPacketPtr |
Definition at line 102 of file logic.c.
Referenced by LoadSceneAnimationResources(), and ReleaseSceneAnimationResources().
| unsigned char* pSceneAnimationSceneDataPtr |
Definition at line 99 of file logic.c.
Referenced by LoadSceneAnimationResources(), and ShowMeanwhileTransition().
| struct Shape* pSceneAnimationSecondaryShape |
Definition at line 106 of file logic.c.
Referenced by LoadSceneAnimationResources(), PlaySceneAnimation(), and ReleaseSceneAnimationResources().
| unsigned char* pSceneAnimationTextData |
Definition at line 101 of file logic.c.
Referenced by LoadSceneAnimationResources(), and ShowMeanwhileTransition().