35 &predicted, &difference);
37 if (abs(relative.
x) < abs(relative.
y)) {
51 short predictionTicks,
short amount)
59 (
int)predictionTicks << 8, &predicted);
61 &predicted, &predicted);
63 &predicted, &difference);
65 if (abs(relative.
x) < abs(relative.
y)) {
90 if (collisionTime >= 30) {
117 (
short)(collisionTime >> 1), amount);
224 unsigned short travelTime;
232 brakingMargin = acceleration -
AbsInt(brakingMargin);
233 if (brakingMargin <= 0) {
237 if (brakingMargin < 12800) {
249 int pointAtDestination;
255 pointAtDestination = 0;
257 if (desiredSpeed < 0)
270 pointAtDestination = 1;
272 pointAtDestination = 1;
280 if (pointAtDestination != 0)
283 if (forwardFacing > 90) {
349 if (forwardFacing > 90) {
354 }
else if (
no_goal(obj) != 0) {
359 if (forwardFacing > 90)
393 }
else if (damage < 75) {
416 signed char *maneuvers;
422 while (maneuvers[count] != -1)
440 (event == 0 || event == 3 || event == 4 || event == 7) &&
493 if (chooseAgain == 0) {
497 if (chooseAgain != 0) {
583 }
else if (damage < 75) {
604 short previousStress;
645 if (event == -1 && targetGone != 0) {
signed char acShipRating[16]
signed char acShipStressList[16]
signed char acPlayerComponentDamageList[9]
enum ShipManeuver aeShipManeuversTable[12]
ManeuverChoice aKilrathiManeuverChoices[5][9][3]
ShortVector aShipFormationDeltaList[10]
signed char acWingmanMessageStatesArray[16]
FixedVector aShipDestinationsArray[10]
signed char abFlightPathList[MISSION_OBJECTIVE_COUNT]
signed char abShipTurnList[16]
short nFacingToTargetValue
signed char acPilotRecovery[20]
HazardField * pActiveHazardField
FixedVector aShipRightVector[64]
enum ObjectClass aeObjectClass[SPACE_OBJECT_COUNT]
int aiIntelligenceEvent[10]
FixedVector aShipVelocity[SPACE_OBJECT_COUNT]
signed char acPilotAggression[24]
short asShipWingLeaderArray[16]
FixedVector aShipUpVector[64]
unsigned char abCollisionAlertTargets[0x10]
signed char acTurnIntervalArray[16]
FixedVector aShipPositionsArray[SPACE_OBJECT_COUNT]
FixedVector aShipFwdVec[64]
signed char acShipTargetTable[16]
signed char * apDefenseManeuvers[5]
enum SpecialManeuver aeSpecialManeuvers[12]
ManeuverChoice aRatedManeuverChoices[13][9][3]
signed char acTurnRegulatorsArray[16]
signed char acShipAiCooldowns[16]
Umbrella header for the game core.
void clear_alert(short obj)
unsigned int approach_full_speed(short ship)
short match_roll_orientation(short obj, short reference)
void transform_to_objects_frame(const FixedVector *source, FixedVector *destination, short obj)
unsigned int approach_zero_speed(short ship)
unsigned int select_target(short obj)
void get_facing_range_from_point(short obj, const FixedVector *point)
short detect_collisions(short obj)
unsigned int reset_objective(short ship, enum ShipObjective objective)
void ship_vs_ship(short obj, short other)
unsigned int steady_object(short ship)
void fire_afterburner(short obj, short time)
int missile_on_tail(short obj)
void AddFixedVectors(const FixedVector *left, const FixedVector *right, FixedVector *sum)
short evaluate_damage(short obj)
enum ShipManeuver pick_from_list(const ManeuverChoice *choice, short obj)
unsigned int reset_stress(short obj)
short FixedToShortSaturating(int value)
enum ShipManeuver pick_regular_maneuver(short obj, int event)
short MinShort(short a, short b)
short crash_time(short obj, short other)
void steer_away_from_predicted_object(short obj, short other, short predictionTicks, short amount)
short find_ratio(short inputMinimum, short inputMaximum, short input, short outputMinimum, short outputMaximum)
short scan_for_enemy(short obj, unsigned short range)
unsigned int control_speed(short obj, unsigned short range, int desiredSpeed)
unsigned int offset_location(short obj, const ShortVector *offset, FixedVector *location)
enum ShipManeuver pick_kilrathi_maneuver(short obj, int event)
void point_ship(short obj, short turnRate, const FixedVector *direction)
unsigned int approach_ship_speed(short obj, short other)
unsigned int approach_half_speed(short obj)
short distance_from_object(short obj, short other)
unsigned int approach_speed(short ship, int targetSpeed)
void try2end_collision_alert(short obj)
void copy_frame(short source, short destination)
short mine_available(short obj)
unsigned int chase_location(short obj, const FixedVector *destination, short reference)
unsigned int goto_location(short obj, const FixedVector *destination)
void intelligence_events(short obj)
void ScaleFixedVector(const FixedVector *vector, int scale, FixedVector *result)
unsigned int process_maneuver_node(short obj, int event)
signed char no_goal(short ship)
void ship_vs_point(short obj, const FixedVector *point)
void send_message(short obj, short message)
int attacker_in_range(short obj, unsigned short range)
void handle_stress(short obj, int event)
short handle_collisions(short obj)
unsigned int goto_formation(short obj, const FixedVector *destination, short leader)
short RandomBelow(short n)
int any_enemy(short obj, short range)
void position_relative(FixedVector *position, FixedVector direction, short distance)
unsigned int approach_min_speed(short obj)
unsigned int veer_random(short obj, short amount)
void start_collision_alert(short obj, short other)
int regulate_turn(short obj)
unsigned int approach_cruise_speed(short ship)
unsigned int chase_speed(short obj, short range)
enum ShipManeuver any_defense(short obj)
void ComputeVectorDelta(const FixedVector *from, const FixedVector *to, FixedVector *delta)
short MaxShort(short a, short b,...)
unsigned int maintain_formation(short obj)
void prevent_collision(short obj)
short normal_speed(short obj)
int trim_goals(short obj, short amount)
unsigned int compute_formation_destination(short leader, const ShortVector *offset, FixedVector *destination)
void point_ship_at_point(short obj, const FixedVector *point)
int alert_flag(short ship, unsigned int bits)
unsigned int celerate(short ship, int delta)
void point_parallel(short obj, short other)
void reset_maneuver(short ship, short maneuver)
short RandomBelowOrEqual(short n)
short stress_morale(short obj)
unsigned int unactive(short ship)
unsigned int steer_away_from_object(short obj, short other, short amount)
int GetShipAccelerationRate(short ship)
#define SPACE_OBJECT_COUNT
@ SPECIAL_MANEUVER_UNKNOWN_9
#define MISSION_OBJECTIVE_COUNT
@ OBJECT_CLASS_CAPITAL_SHIP