Wing Commander II
Reconstructed Win32 source (1996)
Loading...
Searching...
No Matches
fl.c File Reference

Flight maneuvers. More...

#include "game.h"

Go to the source code of this file.

Macros

#define FL_C
#define MANEUVER_REROLL_CHANCE(m)
#define COLLISION_RADIUS_OF(obj)

Functions

void HandleUnsupportedManeuver (short maneuver, short ship, short target)
void BeginShipCloak (short ship)
void ResetShipCloakState (short ship)
void chase_speed (short obj, short range)
void SetShipAiScratchWord (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, short target)
void Mchill (short ship, short target)
void Mdrop_a_mine (short ship, short target)
void Mthink (short ship, short target)
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)
void Mtail_fire (short ship, short target)
void Mzip_past (short ship, short target)
void ShipAiState47 (short ship, short target)
void ShipAiState28 (short ship, short target)
void ShipAiState46 (short ship)
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 Mtarget_missile (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, unsigned int target, short pitch)
void Mzig_zag (short ship, unsigned int target)
void Mzig_zag_pitch (short ship, unsigned int 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 ShipAiState3 (short ship, short target)
void ShipAiState45 (short ship, short target)
void Mnone (void)
void Mreset (short ship)
void perform_maneuver (short obj)

Variables

unsigned char g_abManeuverRerollChance [50]
void(* g_apManeuverHandlers [50])(short, short)

Detailed Description

Flight maneuvers.

Definition in file fl.c.

Macro Definition Documentation

◆ COLLISION_RADIUS_OF

#define COLLISION_RADIUS_OF ( obj)
Value:
short g_asObjectCollisionRadius[SPACE_OBJECT_COUNT]
Definition viewrect.c:120

Definition at line 81 of file fl.c.

Referenced by perform_maneuver().

◆ FL_C

#define FL_C

Definition at line 7 of file fl.c.

◆ MANEUVER_REROLL_CHANCE

#define MANEUVER_REROLL_CHANCE ( m)
Value:
unsigned char g_abManeuverRerollChance[50]
Definition fl.c:10

Definition at line 75 of file fl.c.

Referenced by perform_maneuver().

Function Documentation

◆ advance()

◆ BeginShipCloak()

◆ chase_speed()

void chase_speed ( short obj,
short range )

◆ general_zig()

void general_zig ( short ship,
unsigned int target,
short pitch )

◆ HandleUnsupportedManeuver()

void HandleUnsupportedManeuver ( short maneuver,
short ship,
short target )

◆ maneuver_complete()

◆ Mbest_strafe()

void Mbest_strafe ( short ship,
short target )

Definition at line 743 of file fl.c.

References g_nTargetFacing, Mbest_strafe(), Mstrafe_enemy(), and Mzip_past().

Referenced by Mbest_strafe().

◆ Mburnout()

void Mburnout ( short ship,
short target )

◆ Mbuzz_debris()

◆ Mchill()

void Mchill ( short ship,
short target )

Definition at line 202 of file fl.c.

References HandleUnsupportedManeuver(), and Mchill().

Referenced by Mchill().

◆ Mcorkscrew()

void Mcorkscrew ( short ship)

◆ Mdrop_a_mine()

void Mdrop_a_mine ( short ship,
short target )

Definition at line 209 of file fl.c.

References HandleUnsupportedManeuver(), and Mdrop_a_mine().

Referenced by Mdrop_a_mine().

◆ Mfish_hook()

◆ Mfull_ahead()

void Mfull_ahead ( short ship,
short target )

Definition at line 195 of file fl.c.

References HandleUnsupportedManeuver(), and Mfull_ahead().

Referenced by Mfull_ahead().

◆ Mget_distance()

◆ Mgloat()

◆ Mhard_break()

void Mhard_break ( short ship)

◆ Mhard_turn()

void Mhard_turn ( short ship)

◆ Mkickit()

void Mkickit ( short ship)

◆ Mkill_missile()

◆ Mline_up_drop()

void Mline_up_drop ( short ship,
short target )

◆ Mnone()

void Mnone ( void )

Definition at line 1003 of file fl.c.

References Mnone().

Referenced by Mnone().

◆ Mram_missile()

void Mram_missile ( short ship,
short target )

◆ Mreset()

void Mreset ( short ship)

Definition at line 1008 of file fl.c.

References maneuver_complete(), and Mreset().

Referenced by Mreset().

◆ Mroll_over()

void Mroll_over ( short ship)

◆ Mrout_me()

void Mrout_me ( short ship)

Definition at line 973 of file fl.c.

References Mrout_me(), and try2rout().

Referenced by Mrout_me().

◆ Msit_n_fire()

void Msit_n_fire ( short ship,
short target )

◆ Msit_n_spin()

◆ Msplit_left()

◆ Msplit_right()

◆ Mstrafe_enemy()

◆ Mstrafe_n_roll()

void Mstrafe_n_roll ( short ship,
short target )

Definition at line 793 of file fl.c.

References g_anRollGoal, g_asObjectCounter, Mstrafe_enemy(), and Mstrafe_n_roll().

Referenced by Mstrafe_n_roll().

◆ Msuicide_run()

void Msuicide_run ( short ship,
short target )

Definition at line 826 of file fl.c.

References fire_afterburner(), Msuicide_run(), and point_ship_at_object().

Referenced by Msuicide_run().

◆ Mtail_fire()

void Mtail_fire ( short ship,
short target )

◆ Mtarget_laser()

void Mtarget_laser ( short ship,
short target )

Definition at line 967 of file fl.c.

References HandleUnsupportedManeuver(), and Mtarget_laser().

Referenced by Mtarget_laser().

◆ Mtarget_missile()

◆ Mthink()

void Mthink ( short ship,
short target )

Definition at line 216 of file fl.c.

References HandleUnsupportedManeuver(), and Mthink().

Referenced by Mthink().

◆ Mtight_loop()

void Mtight_loop ( short ship)

◆ Mtry2tail()

◆ Mturn_n_kick()

◆ Mturn_n_spin()

◆ Mveer_away()

◆ Mwabble()

◆ Mzig_zag()

void Mzig_zag ( short ship,
unsigned int target )

Definition at line 886 of file fl.c.

References general_zig(), and Mzig_zag().

Referenced by Mzig_zag().

◆ Mzig_zag_pitch()

void Mzig_zag_pitch ( short ship,
unsigned int target )

Definition at line 892 of file fl.c.

References general_zig(), and Mzig_zag_pitch().

Referenced by Mzig_zag_pitch().

◆ Mzip_past()

◆ perform_maneuver()

◆ ResetShipCloakState()

void ResetShipCloakState ( short ship)

◆ SetShipAiScratchWord()

void SetShipAiScratchWord ( unsigned short v)

Definition at line 128 of file fl.c.

References g_nShipAiScratchValue, and SetShipAiScratchWord().

Referenced by perform_maneuver(), and SetShipAiScratchWord().

◆ ShipAiState28()

void ShipAiState28 ( short ship,
short target )

Definition at line 655 of file fl.c.

References HandleUnsupportedManeuver(), and ShipAiState28().

Referenced by ShipAiState28().

◆ ShipAiState3()

void ShipAiState3 ( short ship,
short target )

Definition at line 980 of file fl.c.

References HandleUnsupportedManeuver(), and ShipAiState3().

Referenced by ShipAiState3().

◆ ShipAiState35()

void ShipAiState35 ( short ship,
short target )

Definition at line 188 of file fl.c.

References HandleUnsupportedManeuver(), and ShipAiState35().

Referenced by ShipAiState35().

◆ ShipAiState44()

void ShipAiState44 ( short ship)

Definition at line 959 of file fl.c.

References g_acShipStress, maneuver_complete(), and ShipAiState44().

Referenced by ShipAiState44().

◆ ShipAiState45()

void ShipAiState45 ( short ship,
short target )

◆ ShipAiState46()

◆ ShipAiState47()

void ShipAiState47 ( short ship,
short target )

Variable Documentation

◆ g_abManeuverRerollChance

unsigned char g_abManeuverRerollChance[50]
Initial value:
= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 3, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0,
0, 0, 0
}

Definition at line 10 of file fl.c.

◆ g_apManeuverHandlers

void(* g_apManeuverHandlers[50])(short, short) ( short ,
short  )

Definition at line 18 of file fl.c.

Referenced by perform_maneuver().