|
Wing Commander
Reconstructed Win32 source (1996)
|
Flight manoeuvre handlers and their dispatch. More...
Go to the source code of this file.
Typedefs | |
| typedef void(*) | ShipManeuverHandler(short, short) |
Functions | |
| void | SetManeuverProximityRange (unsigned short v) |
| void | maneuver_complete (short ship) |
| void | Mline_up_drop (short ship, short target) |
| void | Mwabble (short ship) |
| void | advance (short ship) |
| void | ShipAiState35 (short ship, short target) |
| void | Mfull_ahead (short ship) |
| void | Mchill (short ship, short target) |
| void | Mdrop_a_mine (short ship) |
| void | Mthink (short ship) |
| void | Mtight_loop (short ship) |
| void | Mhard_break (short ship) |
| void | Msit_n_spin (short ship, short target) |
| void | Mturn_n_spin (short ship, short target) |
| void | Mburnout (short ship, short target) |
| void | Mkickit (short ship) |
| void | Mturn_n_kick (short ship) |
| void | Mroll_over (short ship) |
| void | Mhard_turn (short ship) |
| void | Mfish_hook (short ship, short target) |
| void | Mtry2tail (short ship, short target) |
| void | Msplit_left (short ship) |
| void | Msplit_right (short ship) |
| void | Mgloat (short ship, short target) |
| void | Mtail_fire (short ship, short target) |
| void | Mzip_past (short ship, short target) |
| void | Mtarget_missile (short ship, short target) |
| void | Mram_missile (short ship, short target) |
| void | Mbuzz_debris (short ship) |
| void | Mstrafe_enemy (short ship, short target) |
| void | Mbest_strafe (short ship, short target) |
| void | Msit_n_fire (short ship, short target) |
| void | Mstrafe_n_roll (short ship, short target) |
| void | Mkill_missile (short ship, short target) |
| void | Msuicide_run (short ship, short target) |
| void | Mget_distance (short ship, short target) |
| void | general_zig (short ship, short target, short pitch) |
| void | Mzig_zag (short ship, short target) |
| void | Mzig_zag_pitch (short ship, short target) |
| void | Mcorkscrew (short ship) |
| void | Mveer_away (short ship, short target) |
| void | ShipAiState44 (short ship) |
| void | Mtarget_laser (short ship, short target) |
| void | Mrout_me (short ship) |
| void | Mnone (void) |
| void | Mreset (short ship) |
| void | perform_maneuver (short obj) |
Variables | |
| static unsigned char | abManeuverRerollChance [47] |
| static ShipManeuverHandler | apShipAiManeuverHandlers [47] |
| static short | nManeuverProximityRange |
| static unsigned char | bCurrentManeuverReroll |
| short | nScrambleCanopyOffset |
| short | nFuneralMainDist |
| signed char | bScrambleCanopyClosed |
| short | nCutsceneFuneralGuardFrame |
| ShortPoint | stScrambleOverlay |
| struct Shape * | pScrambleOverlayShape |
Flight manoeuvre handlers and their dispatch.
Address range 4060a0-40770f. The Mac fl symbol run corroborates this group; its dispatch tables precede the cutscene data.
Definition in file fl.c.
| void advance | ( | short | ship | ) |
Definition at line 141 of file fl.c.
References acShipSequence, advance(), aeShipManeuversTable, and MANEUVER_NONE.
Referenced by advance(), general_zig(), Mburnout(), Mbuzz_debris(), Mcorkscrew(), Mfish_hook(), Mgloat(), Mhard_break(), Mhard_turn(), Mkickit(), Mroll_over(), Msit_n_spin(), Msplit_left(), Msplit_right(), Mtight_loop(), Mturn_n_kick(), Mturn_n_spin(), Mveer_away(), and ShipAiState35().
| void general_zig | ( | short | ship, |
| short | target, | ||
| short | pitch ) |
Definition at line 800 of file fl.c.
References acShipSequence, advance(), anPitchGoal, anYawTarget, approach_full_speed(), asShipTotal, general_zig(), maneuver_complete(), no_goal(), and void().
Referenced by general_zig(), Mzig_zag(), and Mzig_zag_pitch().
| void maneuver_complete | ( | short | ship | ) |
Definition at line 90 of file fl.c.
References maneuver_complete(), MANEUVER_NONE, reset_maneuver(), set_special(), and SPECIAL_MANEUVER_NONE.
Referenced by general_zig(), maneuver_complete(), Mburnout(), Mbuzz_debris(), Mcorkscrew(), Mdrop_a_mine(), Mfish_hook(), Mfull_ahead(), Mget_distance(), Mgloat(), Mhard_break(), Mhard_turn(), Mkickit(), Mkill_missile(), Mline_up_drop(), Mram_missile(), Mreset(), Mroll_over(), Msplit_left(), Msplit_right(), Mtarget_missile(), Mthink(), Mtight_loop(), Mtry2tail(), Mturn_n_kick(), Mturn_n_spin(), Mveer_away(), Mwabble(), Mzip_past(), perform_maneuver(), ShipAiState35(), ShipAiState44(), and try2rout().
| void Mbest_strafe | ( | short | ship, |
| short | target ) |
Definition at line 713 of file fl.c.
References Mbest_strafe(), Mstrafe_enemy(), Mzip_past(), and nTargetFacingValue.
Referenced by Mbest_strafe(), Msit_n_fire(), and Mtarget_laser().
| void Mburnout | ( | short | ship, |
| short | target ) |
Definition at line 390 of file fl.c.
References acShipSequence, advance(), aeSpecialManeuvers, anYawTarget, fire_afterburner(), maneuver_complete(), Mburnout(), no_goal(), SPECIAL_MANEUVER_NONE, and void().
Referenced by Mburnout(), and Mkill_missile().
| void Mbuzz_debris | ( | short | ship | ) |
Definition at line 668 of file fl.c.
References acShipSequence, advance(), aeSpecialManeuvers, approach_full_speed(), fire_afterburner(), maneuver_complete(), Mbuzz_debris(), nFacingToTargetValue, no_goal(), SPECIAL_MANEUVER_NONE, and veer_random().
Referenced by Mbuzz_debris().
| void Mchill | ( | short | ship, |
| short | target ) |
Definition at line 199 of file fl.c.
References acShipSequence, chase_location(), close_behind(), get_front_spot(), Mchill(), and reset_maneuver().
Referenced by Mchill().
| void Mcorkscrew | ( | short | ship | ) |
Definition at line 845 of file fl.c.
References acShipSequence, advance(), anRollGoal, anYawTarget, approach_full_speed(), asShipTotal, maneuver_complete(), Mcorkscrew(), and no_goal().
Referenced by Mcorkscrew().
| void Mdrop_a_mine | ( | short | ship | ) |
Definition at line 210 of file fl.c.
References approach_full_speed(), fire_weapon(), maneuver_complete(), Mdrop_a_mine(), mine_available(), and nTgtRange.
Referenced by Mdrop_a_mine().
| void Mfish_hook | ( | short | ship, |
| short | target ) |
Definition at line 483 of file fl.c.
References acShipSequence, advance(), aeObjectTypeList, anYawTarget, aObjectTypeData, approach_full_speed(), ObjectTypeData::cruiseVelocity, fire_afterburner(), fire_super_brake(), maneuver_complete(), Mfish_hook(), no_goal(), normal_speed(), RandomBelowOrEqual(), real_velocity(), and void().
Referenced by Mfish_hook(), and Mkill_missile().
| void Mfull_ahead | ( | short | ship | ) |
Definition at line 185 of file fl.c.
References approach_full_speed(), asShipTotal, maneuver_complete(), and Mfull_ahead().
Referenced by Mfull_ahead().
| void Mget_distance | ( | short | ship, |
| short | target ) |
Definition at line 780 of file fl.c.
References approach_full_speed(), fire_afterburner(), maneuver_complete(), Mget_distance(), MinShort(), nFacingToTargetValue, no_goal(), normal_speed(), nTgtRange, and steer_away_from_object().
Referenced by Mget_distance().
| void Mgloat | ( | short | ship, |
| short | target ) |
Definition at line 569 of file fl.c.
References acShipSequence, advance(), anPitchGoal, asShipTotal, maneuver_complete(), Mgloat(), RandomBelow(), set_special(), and SPECIAL_MANEUVER_KILL_ENGINES.
Referenced by Mgloat(), and perform_maneuver().
| void Mhard_break | ( | short | ship | ) |
Definition at line 262 of file fl.c.
References acShipSequence, advance(), asShipTotal, fire_super_brake(), maneuver_complete(), Mhard_break(), set_special(), and SPECIAL_MANEUVER_KILL_ENGINES.
Referenced by Mhard_break().
| void Mhard_turn | ( | short | ship | ) |
Definition at line 466 of file fl.c.
References acShipSequence, advance(), anYawTarget, approach_full_speed(), maneuver_complete(), Mhard_turn(), no_goal(), and RandomBelowOrEqual().
Referenced by Mhard_turn().
| void Mkickit | ( | short | ship | ) |
Definition at line 413 of file fl.c.
References acShipSequence, advance(), aeSpecialManeuvers, fire_afterburner(), maneuver_complete(), Mkickit(), and SPECIAL_MANEUVER_NONE.
Referenced by Mkickit().
| void Mkill_missile | ( | short | ship, |
| short | target ) |
Definition at line 749 of file fl.c.
References acShipTargetTable, fire(), MANEUVER_BURNOUT, maneuver_complete(), MANEUVER_FISH_HOOK, Mburnout(), Mfish_hook(), missile_on_tail(), Mkill_missile(), nFacingToTargetValue, nTargetShip, nTgtRange, point_ship_at_object(), reset_maneuver(), and ship_vs_ship().
Referenced by Mkill_missile().
| void Mline_up_drop | ( | short | ship, |
| short | target ) |
Definition at line 97 of file fl.c.
References aeSpecialManeuvers, anRollGoal, aShipPositionsArray, maneuver_complete(), Mline_up_drop(), no_goal(), point_ship_at_point(), and SPECIAL_MANEUVER_NORMAL.
Referenced by Mline_up_drop(), and perform_maneuver().
| void Mram_missile | ( | short | ship, |
| short | target ) |
Definition at line 655 of file fl.c.
References approach_full_speed(), fire_missile(), maneuver_complete(), Mram_missile(), nFacingToTargetValue, no_goal(), nTgtRange, and point_ship_at_object().
Referenced by Mram_missile().
| void Mreset | ( | short | ship | ) |
Definition at line 933 of file fl.c.
References maneuver_complete(), and Mreset().
Referenced by Mreset().
| void Mroll_over | ( | short | ship | ) |
Definition at line 452 of file fl.c.
References acShipSequence, advance(), anRollGoal, approach_full_speed(), maneuver_complete(), Mroll_over(), and RandomBelowOrEqual().
Referenced by Mroll_over().
| void Mrout_me | ( | short | ship | ) |
Definition at line 921 of file fl.c.
References Mrout_me(), and try2rout().
Referenced by Mrout_me().
| void Msit_n_fire | ( | short | ship, |
| short | target ) |
Definition at line 723 of file fl.c.
References aeObjectClass, approach_cruise_speed(), approach_zero_speed(), fire_when_ready(), Mbest_strafe(), Msit_n_fire(), no_goal(), nTgtRange, OBJECT_CLASS_CAPITAL_SHIP, and point_ship_at_object().
Referenced by Msit_n_fire().
| void Msit_n_spin | ( | short | ship, |
| short | target ) |
Definition at line 290 of file fl.c.
References acShipSequence, AddFixedVectors(), advance(), anShipSpeed, approach_speed(), aShipFwdVec, aShipPositionsArray, asShipTotal, close_behind(), fire(), MANEUVER_CHILL, MANEUVER_ROLL_OVER, Msit_n_spin(), nFacingToTargetValue, no_goal(), nTgtRange, point_ship_at_object(), point_ship_at_point(), reset_maneuver(), ScaleFixedVector(), set_special(), SPECIAL_MANEUVER_KILL_ENGINES, SPECIAL_MANEUVER_NONE, steady_object(), and veer_random().
Referenced by Msit_n_spin().
| void Msplit_left | ( | short | ship | ) |
Definition at line 539 of file fl.c.
References acShipSequence, advance(), anYawTarget, maneuver_complete(), Msplit_left(), and no_goal().
Referenced by Msplit_left().
| void Msplit_right | ( | short | ship | ) |
Definition at line 554 of file fl.c.
References acShipSequence, advance(), anYawTarget, maneuver_complete(), Msplit_right(), and no_goal().
Referenced by Msplit_right().
| void Mstrafe_enemy | ( | short | ship, |
| short | target ) |
Definition at line 695 of file fl.c.
References anPitchGoal, anYawTarget, approach_cruise_speed(), fire_when_ready(), Mstrafe_enemy(), point_ship_at_object(), and ship_vs_ship().
Referenced by Mbest_strafe(), Mstrafe_enemy(), and Mstrafe_n_roll().
| void Mstrafe_n_roll | ( | short | ship, |
| short | target ) |
Definition at line 739 of file fl.c.
References anRollGoal, asObjectCounterArray, Mstrafe_enemy(), and Mstrafe_n_roll().
Referenced by Mstrafe_n_roll().
| void Msuicide_run | ( | short | ship, |
| short | target ) |
Definition at line 772 of file fl.c.
References approach_full_speed(), Msuicide_run(), no_goal(), and point_ship_at_object().
Referenced by Msuicide_run().
| void Mtail_fire | ( | short | ship, |
| short | target ) |
Definition at line 594 of file fl.c.
References asObjectCollisionRadius, chase_speed(), fire_when_ready(), Mtail_fire(), no_goal(), and point_ship_at_object().
Referenced by Mtail_fire(), and Mzip_past().
| void Mtarget_laser | ( | short | ship, |
| short | target ) |
Definition at line 915 of file fl.c.
References Mbest_strafe(), and Mtarget_laser().
Referenced by Mtarget_laser().
| void Mtarget_missile | ( | short | ship, |
| short | target ) |
Definition at line 626 of file fl.c.
References acObjOwnersTable, aeObjectClass, approach_cruise_speed(), fire_missile(), maneuver_complete(), MANEUVER_STRAFE_ENEMY, Mtarget_missile(), nFacingToTargetValue, no_goal(), nTargetFacingValue, nTgtRange, OBJECT_CLASS_MISSILE, point_ship_at_object(), RandomBelowOrEqual(), and reset_maneuver().
Referenced by Mtarget_missile().
| void Mthink | ( | short | ship | ) |
Definition at line 224 of file fl.c.
References approach_cruise_speed(), asShipTotal, maneuver_complete(), and Mthink().
Referenced by Mthink().
| void Mtight_loop | ( | short | ship | ) |
Definition at line 234 of file fl.c.
References acShipSequence, advance(), anPitchGoal, approach_cruise_speed(), maneuver_complete(), Mtight_loop(), and no_goal().
Referenced by Mtight_loop().
| void Mtry2tail | ( | short | ship, |
| short | target ) |
Definition at line 525 of file fl.c.
References approach_full_speed(), maneuver_complete(), Mtry2tail(), no_goal(), point_ship_at_object(), RandomBelowOrEqual(), unactive(), and veer_random().
Referenced by Mtry2tail().
| void Mturn_n_kick | ( | short | ship | ) |
Definition at line 429 of file fl.c.
References acShipSequence, advance(), aeSpecialManeuvers, approach_full_speed(), fire_afterburner(), maneuver_complete(), Mturn_n_kick(), no_goal(), SPECIAL_MANEUVER_NONE, and veer_random().
Referenced by Mturn_n_kick().
| void Mturn_n_spin | ( | short | ship, |
| short | target ) |
Definition at line 359 of file fl.c.
References acShipSequence, advance(), asShipTotal, maneuver_complete(), Mturn_n_spin(), no_goal(), nTargetFacingValue, point_ship_at_object(), set_special(), SPECIAL_MANEUVER_KILL_ENGINES, and veer_random().
Referenced by Mturn_n_spin().
| void Mveer_away | ( | short | ship, |
| short | target ) |
Definition at line 871 of file fl.c.
References acShipSequence, advance(), approach_full_speed(), asObjectCollisionRadius, fire_afterburner(), maneuver_complete(), Mveer_away(), nFacingToTargetValue, nManeuverProximityRange, no_goal(), normal_speed(), nTgtRange, RandomBelowOrEqual(), steer_away_from_object(), and veer_random().
Referenced by Mveer_away(), and perform_maneuver().
| void Mwabble | ( | short | ship | ) |
Definition at line 113 of file fl.c.
References anPitchGoal, anRollGoal, anYawTarget, approach_full_speed(), asShipTotal, maneuver_complete(), Mwabble(), no_goal(), RandomBelowOrEqual(), and signed_random().
Referenced by Mwabble().
| void Mzig_zag | ( | short | ship, |
| short | target ) |
Definition at line 833 of file fl.c.
References general_zig(), and Mzig_zag().
Referenced by Mzig_zag().
| void Mzig_zag_pitch | ( | short | ship, |
| short | target ) |
Definition at line 839 of file fl.c.
References general_zig(), and Mzig_zag_pitch().
Referenced by Mzig_zag_pitch().
| void Mzip_past | ( | short | ship, |
| short | target ) |
Definition at line 605 of file fl.c.
References approach_full_speed(), asObjectCollisionRadius, close_behind(), maneuver_complete(), Mtail_fire(), Mzip_past(), no_goal(), nTargetFacingValue, point_ship_behind_object(), point_ship_below_object(), and unactive().
Referenced by Mbest_strafe(), and Mzip_past().
| void perform_maneuver | ( | short | obj | ) |
Definition at line 939 of file fl.c.
References abManeuverRerollChance, acShipTargetTable, aeShipManeuversTable, apShipAiManeuverHandlers, asObjectCollisionRadius, bCurrentManeuverReroll, maneuver_complete(), MANEUVER_GLOAT, MANEUVER_LINE_UP_DROP, MANEUVER_VEER_AWAY, Mgloat(), Mline_up_drop(), Mveer_away(), nManeuverProximityRange, nTargetFacingValue, nTgtRange, perform_maneuver(), RandomBelowOrEqual(), SetManeuverProximityRange(), ship_vs_ship(), try2reset_maneuver(), and unactive().
Referenced by maneuvering(), and perform_maneuver().
| void SetManeuverProximityRange | ( | unsigned short | v | ) |
Definition at line 84 of file fl.c.
References nManeuverProximityRange, and SetManeuverProximityRange().
Referenced by perform_maneuver(), and SetManeuverProximityRange().
| void ShipAiState35 | ( | short | ship, |
| short | target ) |
Definition at line 148 of file fl.c.
References acShipSequence, advance(), approach_speed(), asShipTotal, maneuver_complete(), MANEUVER_TAIL_FIRE, nFacingToTargetValue, nTargetFacingValue, nTgtRange, point_ship(), reset_maneuver(), ShipAiState35(), veer_random(), void(), and vToTgt.
Referenced by ShipAiState35().
| void ShipAiState44 | ( | short | ship | ) |
Definition at line 908 of file fl.c.
References acShipStressList, maneuver_complete(), and ShipAiState44().
Referenced by ShipAiState44().
|
static |
Definition at line 17 of file fl.c.
Referenced by perform_maneuver().
|
static |
Definition at line 22 of file fl.c.
Referenced by perform_maneuver().
|
static |
Definition at line 73 of file fl.c.
Referenced by perform_maneuver().
| signed char bScrambleCanopyClosed |
Definition at line 78 of file fl.c.
Referenced by DrawScrambleFrame(), landing(), and scramble().
| short nCutsceneFuneralGuardFrame |
Definition at line 79 of file fl.c.
Referenced by funeral_player(), and funeral_sequence().
| short nFuneralMainDist |
Definition at line 77 of file fl.c.
Referenced by funeral_player(), and funeral_sequence().
|
static |
Definition at line 72 of file fl.c.
Referenced by Mveer_away(), perform_maneuver(), and SetManeuverProximityRange().
| short nScrambleCanopyOffset |
Definition at line 76 of file fl.c.
Referenced by DrawScrambleFrame(), landing(), and scramble().
| struct Shape* pScrambleOverlayShape |
Definition at line 81 of file fl.c.
Referenced by DrawScrambleFrame(), and landing().
| ShortPoint stScrambleOverlay |
Definition at line 80 of file fl.c.
Referenced by DrawScrambleFrame(), landing(), and scramble().