FS2_Open
Open source remastering of the Freespace 2 engine
autopilot.h File Reference
#include "globalincs/pstypes.h"
#include "object/object.h"
#include <map>

Go to the source code of this file.

Classes

class  NavPoint
 
struct  NavMessage
 

Macros

#define NPS_TICKRATE   125
 
#define MAX_NAVPOINTS   8
 
#define NP_WAYPOINT   0x0001
 
#define NP_SHIP   0x0002
 
#define NP_HIDDEN   0x0004
 
#define NP_NOACCESS   0x0008
 
#define NP_VISITED   0x0100
 
#define NP_NOSELECT   ( NP_HIDDEN | NP_NOACCESS )
 
#define NP_VALIDTYPE   ( NP_WAYPOINT | NP_SHIP )
 
#define NP_MSG_FAIL_NOSEL   0
 
#define NP_MSG_FAIL_GLIDING   1
 
#define NP_MSG_FAIL_TOCLOSE   2
 
#define NP_MSG_FAIL_HOSTILES   3
 
#define NP_MSG_MISC_LINKED   4
 
#define NP_MSG_FAIL_HAZARD   5
 
#define NP_MSG_FAIL_SUPPORT_PRESENT   6
 
#define NP_MSG_FAIL_SUPPORT_WORKING   7
 
#define NP_NUM_MESSAGES   8
 

Functions

bool Sel_NextNav ()
 
bool CanAutopilot (vec3d targetPos, bool send_msg=false)
 
bool CanAutopilot (bool send_msg=false)
 
bool StartAutopilot ()
 
void EndAutoPilot ()
 
void NavSystem_Do ()
 
void NavSystem_Init ()
 
void parse_autopilot_table (char *filename)
 
int FindNav (char *Nav)
 
void SelectNav (char *Nav)
 
void DeselectNav ()
 
void ZeroNav (int i)
 
bool DelNavPoint (char *Nav)
 
bool DelNavPoint (int nav)
 
bool AddNav_Ship (char *Nav, char *TargetName, int flags)
 
bool AddNav_Waypoint (char *Nav, char *WP_Path, int node, int flags)
 
bool Nav_Alt_Flags (char *Nav, int flags)
 
bool Nav_Set_Flag (char *Nav, int flag)
 
bool Nav_UnSet_Flag (char *Nav, int flag)
 
bool Nav_Set_Hidden (char *Nav)
 
bool Nav_Set_NoAccess (char *Nav)
 
bool Nav_Set_Visited (char *Nav)
 
bool Nav_UnSet_Hidden (char *Nav)
 
bool Nav_UnSet_NoAccess (char *Nav)
 
bool Nav_UnSet_Visited (char *Nav)
 
unsigned int DistanceTo (char *nav)
 
unsigned int DistanceTo (int nav)
 
bool IsVisited (char *nav)
 
bool IsVisited (int nav)
 
void send_autopilot_msg (char *msg, char *snd=NULL)
 
void send_autopilot_msgID (int msgid)
 

Variables

bool AutoPilotEngaged
 
int CurrentNav
 
NavPoint Navs [MAX_NAVPOINTS]
 
NavMessage NavMsgs [NP_NUM_MESSAGES]
 
int LockAPConv
 
SCP_map< int, intautopilot_wings
 

Macro Definition Documentation

#define MAX_NAVPOINTS   8

Definition at line 18 of file autopilot.h.

#define NP_HIDDEN   0x0004

Definition at line 22 of file autopilot.h.

#define NP_MSG_FAIL_GLIDING   1

Definition at line 53 of file autopilot.h.

#define NP_MSG_FAIL_HAZARD   5

Definition at line 57 of file autopilot.h.

#define NP_MSG_FAIL_HOSTILES   3

Definition at line 55 of file autopilot.h.

#define NP_MSG_FAIL_NOSEL   0

Definition at line 52 of file autopilot.h.

#define NP_MSG_FAIL_SUPPORT_PRESENT   6

Definition at line 58 of file autopilot.h.

#define NP_MSG_FAIL_SUPPORT_WORKING   7

Definition at line 59 of file autopilot.h.

#define NP_MSG_FAIL_TOCLOSE   2

Definition at line 54 of file autopilot.h.

#define NP_MSG_MISC_LINKED   4

Definition at line 56 of file autopilot.h.

#define NP_NOACCESS   0x0008

Definition at line 23 of file autopilot.h.

#define NP_NOSELECT   ( NP_HIDDEN | NP_NOACCESS )

Definition at line 26 of file autopilot.h.

#define NP_NUM_MESSAGES   8

Definition at line 60 of file autopilot.h.

#define NP_SHIP   0x0002

Definition at line 21 of file autopilot.h.

#define NP_VALIDTYPE   ( NP_WAYPOINT | NP_SHIP )

Definition at line 27 of file autopilot.h.

#define NP_VISITED   0x0100

Definition at line 24 of file autopilot.h.

#define NP_WAYPOINT   0x0001

Definition at line 20 of file autopilot.h.

#define NPS_TICKRATE   125

Definition at line 16 of file autopilot.h.

Function Documentation

bool AddNav_Ship ( char *  Nav,
char *  TargetName,
int  flags 
)

Definition at line 1384 of file autopilot.cpp.

bool AddNav_Waypoint ( char *  Nav,
char *  WP_Path,
int  node,
int  flags 
)

Definition at line 1427 of file autopilot.cpp.

bool CanAutopilot ( vec3d  targetPos,
bool  send_msg = false 
)

Definition at line 151 of file autopilot.cpp.

bool CanAutopilot ( bool  send_msg = false)
inline

Definition at line 90 of file autopilot.h.

bool DelNavPoint ( char *  Nav)

Definition at line 1355 of file autopilot.cpp.

bool DelNavPoint ( int  nav)

Definition at line 1363 of file autopilot.cpp.

void DeselectNav ( )

Definition at line 1585 of file autopilot.cpp.

unsigned int DistanceTo ( char *  nav)

Definition at line 1593 of file autopilot.cpp.

unsigned int DistanceTo ( int  nav)

Definition at line 1600 of file autopilot.cpp.

void EndAutoPilot ( )

Definition at line 869 of file autopilot.cpp.

int FindNav ( char *  Nav)

Definition at line 1342 of file autopilot.cpp.

bool IsVisited ( char *  nav)

Definition at line 1610 of file autopilot.cpp.

bool IsVisited ( int  nav)

Definition at line 1617 of file autopilot.cpp.

bool Nav_Alt_Flags ( char *  Nav,
int  flags 
)

Definition at line 1465 of file autopilot.cpp.

bool Nav_Set_Flag ( char *  Nav,
int  flag 
)

Definition at line 1497 of file autopilot.cpp.

bool Nav_Set_Hidden ( char *  Nav)

Definition at line 1530 of file autopilot.cpp.

bool Nav_Set_NoAccess ( char *  Nav)

Definition at line 1538 of file autopilot.cpp.

bool Nav_Set_Visited ( char *  Nav)

Definition at line 1545 of file autopilot.cpp.

bool Nav_UnSet_Flag ( char *  Nav,
int  flag 
)

Definition at line 1513 of file autopilot.cpp.

bool Nav_UnSet_Hidden ( char *  Nav)

Definition at line 1553 of file autopilot.cpp.

bool Nav_UnSet_NoAccess ( char *  Nav)

Definition at line 1560 of file autopilot.cpp.

bool Nav_UnSet_Visited ( char *  Nav)

Definition at line 1567 of file autopilot.cpp.

void NavSystem_Do ( )

Definition at line 1065 of file autopilot.cpp.

void NavSystem_Init ( )

Definition at line 1252 of file autopilot.cpp.

void parse_autopilot_table ( char *  filename)

Definition at line 1272 of file autopilot.cpp.

bool Sel_NextNav ( )

Definition at line 75 of file autopilot.cpp.

void SelectNav ( char *  Nav)

Definition at line 1574 of file autopilot.cpp.

void send_autopilot_msg ( char *  msg,
char *  snd = NULL 
)

Definition at line 1222 of file autopilot.cpp.

void send_autopilot_msgID ( int  msgid)

Definition at line 1213 of file autopilot.cpp.

bool StartAutopilot ( )

Definition at line 230 of file autopilot.cpp.

void ZeroNav ( int  i)

Variable Documentation

SCP_map<int,int> autopilot_wings

Definition at line 57 of file autopilot.cpp.

bool AutoPilotEngaged

Definition at line 40 of file autopilot.cpp.

int CurrentNav

Definition at line 43 of file autopilot.cpp.

int LockAPConv

Definition at line 50 of file autopilot.cpp.

Definition at line 46 of file autopilot.cpp.

Definition at line 45 of file autopilot.cpp.