9 24, 24, 13, 14, -1, 0, 0, 0
12 8, 13, 15, 14, 19, 24, -1, 0
15 8, 15, 17, 23, 19, 9, 20, 24, 14, -1, 0, 0, 0, 0, 0, 0
18 17, 23, 15, 19, 9, 14, 20, 12, -1, 0, 0, 0, 0, 0, 0, 0
21 15, 19, 12, 11, 17, 23, 7, 9, -1, 0, 0, 0, 0, 0, 0, 0
31 3, 3, 3, 2, 2, 3, 0, 0
34 6, 7, 8, 8, 9, 8, 0, 0
52 if (labs(relative.
x) < labs(relative.
y)) {
73 short predictionTicks,
short amount)
81 (
int)predictionTicks << 8, &predicted);
83 &predicted, &predicted);
87 if (labs(relative.
x) < labs(relative.
y)) {
111 if (timeToImpact >= 30) {
134 obj, other, (
short)(timeToImpact >> 1),
160 for (obj = 0; obj < 10; obj++) {
259 unsigned short ticks;
268 brakingMargin = reachableSpeed -
AbsInt(speedError);
269 if (brakingMargin <= 0)
271 else if (brakingMargin < 12800)
281 short pointAtDestination;
287 pointAtDestination = 0;
303 pointAtDestination = 1;
305 pointAtDestination = 1;
313 if (pointAtDestination != 0)
374 if (facingAhead > 90) {
384 if (facingAhead > 90)
417 }
else if (damage < 75) {
442 signed char *maneuvers;
449 while (maneuvers[count] != -1)
465 (event == 0 || event == 3 || event == 4 || event == 7) &&
517 if (((choice->
primary != maneuver &&
524 if (chooseAgain == 0) {
528 if (chooseAgain != 0) {
569 for (other = 1; other < obj; other++) {
608 for (index = 0; index < 8; index++) {
620 if ((event == 3 || event == 7) &&
656 short aggressiveness;
687 }
else if (damage < 75) {
713 short previousStress;
767 if (event == -1 && targetGone != 0) {
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)
short CountAlliesOnSameTarget(short obj)
void ComputeVectorDelta(FixedVector *from, FixedVector *to, FixedVector *delta)
unsigned int approach_zero_speed(short ship)
short regulate_turn(short obj)
unsigned int select_target(short obj)
void get_facing_range_from_point(short obj, const FixedVector *point)
short MaxShort(short a, short b)
void goto_location(short obj, const FixedVector *destination)
short detect_collisions(short obj)
void steer_away_from_object(short obj, short other, short amount)
void fire_afterburner(short obj, short time)
void AddFixedVectors(const FixedVector *left, const FixedVector *right, FixedVector *sum)
short evaluate_damage(short obj)
unsigned int reset_stress(short obj)
signed char CanSetNewShipTurnGoal(short ship)
short unactive(short ship)
void ScaleFixedVector(FixedVector *vector, int scale, FixedVector *result)
short FixedToShortSaturating(int value)
void process_maneuver_node(short obj, short event)
short MinShort(short a, short b)
void steer_away_from_predicted_object(short obj, short other, short predictionTicks, short amount)
void intelligence_events(int obj)
short any_enemy(short obj, short range)
short find_ratio(short inputMinimum, short inputMaximum, short input, short outputMinimum, short outputMaximum)
short scan_for_enemy(short obj, unsigned short range)
unsigned int offset_location(short obj, const ShortVector *offset, FixedVector *location)
void goto_formation(short obj, const FixedVector *destination, short leader)
void point_ship(short obj, short turnRate, const FixedVector *direction)
unsigned int approach_ship_speed(short obj, short other)
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)
unsigned int maintain_formation(int obj)
void steady_object(short ship)
short attacker_in_range(short obj, unsigned short range)
void handle_stress(short obj, short event)
short GetAdaptiveTurnRate(void)
unsigned int reset_objective(short ship, short objective)
short handle_collisions(short obj)
short CountEnemyFighters(void)
void control_speed(short obj, unsigned short range, int desiredSpeed)
void chase_location(short obj, const FixedVector *destination, short reference)
short any_defense(short obj)
short RandomBelow(short n)
void trim_goals(short obj, short amount)
void position_relative(FixedVector *position, FixedVector direction, short distance)
unsigned int approach_min_speed(short obj)
unsigned int veer_random(short obj, short amount)
short FindMissileTargetingObject(short obj)
void get_facing_range_from_object(short obj, short other)
void start_collision_alert(short obj, short other)
unsigned int approach_cruise_speed(short ship)
void fire(short obj, short target)
void send_message(short obj, signed char message)
short pick_regular_maneuver(short obj, short event)
short pick_from_list(const ManeuverChoice *choice, short obj, short event)
void celerate(short ship, int delta)
void approach_half_speed(short obj)
short pick_kilrathi_maneuver(short obj, short event)
void prevent_collision(short obj)
short normal_speed(short obj)
unsigned int compute_formation_destination(short leader, const ShortVector *offset, FixedVector *destination)
void point_ship_at_point(short obj, const FixedVector *point)
void point_parallel(short obj, short other)
void reset_maneuver(short ship, short maneuver)
short RandomBelowOrEqual(short n)
short stress_morale(short obj)
short alert_flag(short ship, unsigned int bits)
int GetShipAccelerationRate(short ship)
Shared Win32 declarations, types and library interfaces.
@ SPECIAL_MANEUVER_UNKNOWN_9
@ OBJECT_CLASS_CAPITAL_SHIP
short g_asShipCloakCooldown[10]
short g_asProjectileEvasionTicks[8]
ShortVector g_aShipFormationOffset[10]
signed char g_aDefenseManeuversElite[16]
unsigned char g_aShipIntelligenceData[5][0x51]
short g_aeObjectClass[SPACE_OBJECT_COUNT]
signed char g_acShipTarget[16]
signed char g_acShipCollisionCooldown[16]
FixedVector g_aShipForwardVector[SPACE_OBJECT_COUNT]
signed char g_aDefenseManeuversAce[16]
short g_asShipIntelSlot[10]
short g_aeSpecialManeuver[12]
FixedVector g_aShipRightVector[SPACE_OBJECT_COUNT]
signed char g_acTurnInterval[16]
signed char g_acPilotRecovery[8]
signed char g_aDefenseManeuversBoss[16]
short g_asObjectDamage[SPACE_OBJECT_COUNT]
int g_anShipSpeed[SPACE_OBJECT_COUNT]
signed char * g_apDefenseManeuvers[5]
signed char g_acPilotAggression[8]
signed char g_36_cPilotKillCountValue
short g_asShipWingLeader[12]
short g_5_nCollisionCountdownNumber
int g_anShipCloakState[10]
signed char g_acShipPendingMessage[16]
signed char g_4_acInitialShipKillNumber[8]
FixedVector g_aShipPosition[SPACE_OBJECT_COUNT]
signed char g_aDefenseManeuversVeteran[8]
FixedVector g_aShipUpVector[SPACE_OBJECT_COUNT]
short g_asShipManeuver[12]
FixedVector g_aShipVelocity[SPACE_OBJECT_COUNT]
short g_asShipMissionIndex[12]
signed char g_acShipAlertSource[12]
signed char g_acTurnRegulator[16]
signed char g_acShipStress[16]
signed char g_abShipTurn[16]
FixedVector g_aShipDestination[10]
short g_bWingmanTurnRateUnlocked
short g_asIntelligenceEvent[12]
signed char g_aDefenseManeuversNovice[8]
MissionHeader g_13_stMissionHeaderBlock