Open source remastering of the Freespace 2 engine
aigoals.h File Reference

Go to the source code of this file.


#define AI_GOAL_CHASE   (1<<1)
#define AI_GOAL_DOCK   (1<<2)
#define AI_GOAL_WAYPOINTS   (1<<3)
#define AI_GOAL_WAYPOINTS_ONCE   (1<<4)
#define AI_GOAL_WARP   (1<<5)
#define AI_GOAL_FORM_ON_WING   (1<<7)
#define AI_GOAL_UNDOCK   (1<<8)
#define AI_GOAL_CHASE_WING   (1<<9)
#define AI_GOAL_GUARD   (1<<10)
#define AI_GOAL_DISABLE_SHIP   (1<<11)
#define AI_GOAL_DISARM_SHIP   (1<<12)
#define AI_GOAL_CHASE_ANY   (1<<13)
#define AI_GOAL_IGNORE   (1<<14)
#define AI_GOAL_GUARD_WING   (1<<15)
#define AI_GOAL_EVADE_SHIP   (1<<16)
#define AI_GOAL_STAY_NEAR_SHIP   (1<<17)
#define AI_GOAL_KEEP_SAFE_DISTANCE   (1<<18)
#define AI_GOAL_REARM_REPAIR   (1<<19)
#define AI_GOAL_STAY_STILL   (1<<20)
#define AI_GOAL_PLAY_DEAD   (1<<21)
#define AI_GOAL_CHASE_WEAPON   (1<<22)
#define AI_GOAL_FLY_TO_SHIP   (1<<23)
#define AI_GOAL_IGNORE_NEW   (1<<24)
#define MAX_AI_DOCK_NAMES   25


typedef flag_def_list ai_goal_list


const char * Ai_goal_text (int goal)
void ai_post_process_mission ()
void ai_maybe_add_form_goal (wing *wingp)
void ai_process_mission_orders (int objnum, ai_info *aip)
int ai_goal_num (ai_goal *goals)
void ai_add_ship_goal_scripting (int mode, int submode, int priority, char *shipname, ai_info *aip)
void ai_add_ship_goal_sexp (int sexp, int type, ai_info *aip)
void ai_add_wing_goal_sexp (int sexp, int type, int wingnum)
void ai_add_goal_sub_sexp (int sexp, int type, ai_goal *aigp)
int ai_remove_goal_sexp_sub (int sexp, ai_goal *aigp)
void ai_remove_wing_goal_sexp (int sexp, int wingnum)
void ai_add_ship_goal_player (int type, int mode, int submode, char *shipname, ai_info *aip)
void ai_add_wing_goal_player (int type, int mode, int submode, char *shipname, int wingnum)
void ai_remove_ship_goal (ai_info *aip, int index)
void ai_clear_ship_goals (ai_info *aip)
void ai_clear_wing_goals (int wingnum)
void ai_copy_mission_wing_goal (ai_goal *aigp, ai_info *aip)
void ai_mission_goal_complete (ai_info *aip)
void ai_mission_wing_goal_complete (int wingnum, ai_goal *remove_goalp)
void ai_update_goal_references (ai_goal *goals, int type, const char *old_name, const char *new_name)
int query_referenced_in_ai_goals (ai_goal *goals, int type, const char *name)
char * ai_add_dock_name (const char *str)
int ai_query_goal_valid (int ship, int ai_goal_type)
void ai_add_goal_ship_internal (ai_info *aip, int goal_type, char *name, int docker_point, int dockee_point, int immediate=1)
void ai_add_goal_wing_internal (wing *wingp, int goal_type, char *name, int immediate=1)


ai_goal_list Ai_goal_names []
int Num_ai_goals
int Num_ai_dock_names
char Ai_dock_names [MAX_AI_DOCK_NAMES][NAME_LENGTH]

Macro Definition Documentation

#define AI_GOAL_CHASE   (1<<1)

Definition at line 29 of file aigoals.h.

#define AI_GOAL_CHASE_ANY   (1<<13)

Definition at line 41 of file aigoals.h.

#define AI_GOAL_CHASE_WEAPON   (1<<22)

Definition at line 54 of file aigoals.h.

#define AI_GOAL_CHASE_WING   (1<<9)

Definition at line 37 of file aigoals.h.


Definition at line 34 of file aigoals.h.

#define AI_GOAL_DISABLE_SHIP   (1<<11)

Definition at line 39 of file aigoals.h.

#define AI_GOAL_DISARM_SHIP   (1<<12)

Definition at line 40 of file aigoals.h.

#define AI_GOAL_DOCK   (1<<2)

Definition at line 30 of file aigoals.h.

#define AI_GOAL_EVADE_SHIP   (1<<16)

Definition at line 44 of file aigoals.h.

#define AI_GOAL_FLY_TO_SHIP   (1<<23)

Definition at line 56 of file aigoals.h.

#define AI_GOAL_FORM_ON_WING   (1<<7)

Definition at line 35 of file aigoals.h.

#define AI_GOAL_GUARD   (1<<10)

Definition at line 38 of file aigoals.h.

#define AI_GOAL_GUARD_WING   (1<<15)

Definition at line 43 of file aigoals.h.

#define AI_GOAL_IGNORE   (1<<14)

Definition at line 42 of file aigoals.h.

#define AI_GOAL_IGNORE_NEW   (1<<24)

Definition at line 57 of file aigoals.h.

#define AI_GOAL_KEEP_SAFE_DISTANCE   (1<<18)

Definition at line 48 of file aigoals.h.

#define AI_GOAL_PLAY_DEAD   (1<<21)

Definition at line 53 of file aigoals.h.

#define AI_GOAL_REARM_REPAIR   (1<<19)

Definition at line 49 of file aigoals.h.

#define AI_GOAL_STAY_NEAR_SHIP   (1<<17)

Definition at line 47 of file aigoals.h.

#define AI_GOAL_STAY_STILL   (1<<20)

Definition at line 52 of file aigoals.h.

#define AI_GOAL_UNDOCK   (1<<8)

Definition at line 36 of file aigoals.h.

#define AI_GOAL_WARP   (1<<5)

Definition at line 33 of file aigoals.h.

#define AI_GOAL_WAYPOINTS   (1<<3)

Definition at line 31 of file aigoals.h.

#define AI_GOAL_WAYPOINTS_ONCE   (1<<4)

Definition at line 32 of file aigoals.h.

#define MAX_AI_DOCK_NAMES   25

Definition at line 79 of file aigoals.h.

Typedef Documentation

Definition at line 81 of file aigoals.h.

Function Documentation

char* ai_add_dock_name ( const char *  str)

Definition at line 2427 of file aigoals.cpp.

void ai_add_goal_ship_internal ( ai_info aip,
int  goal_type,
char *  name,
int  docker_point,
int  dockee_point,
int  immediate = 1 

Definition at line 1244 of file aigoals.cpp.

void ai_add_goal_sub_sexp ( int  sexp,
int  type,
ai_goal aigp 
void ai_add_goal_wing_internal ( wing wingp,
int  goal_type,
char *  name,
int  immediate = 1 

Definition at line 1324 of file aigoals.cpp.

void ai_add_ship_goal_player ( int  type,
int  mode,
int  submode,
char *  shipname,
ai_info aip 

Definition at line 757 of file aigoals.cpp.

void ai_add_ship_goal_scripting ( int  mode,
int  submode,
int  priority,
char *  shipname,
ai_info aip 

Definition at line 730 of file aigoals.cpp.

void ai_add_ship_goal_sexp ( int  sexp,
int  type,
ai_info aip 

Definition at line 1201 of file aigoals.cpp.

void ai_add_wing_goal_player ( int  type,
int  mode,
int  submode,
char *  shipname,
int  wingnum 

Definition at line 783 of file aigoals.cpp.

void ai_add_wing_goal_sexp ( int  sexp,
int  type,
int  wingnum 

Definition at line 1210 of file aigoals.cpp.

void ai_clear_ship_goals ( ai_info aip)

Definition at line 251 of file aigoals.cpp.

void ai_clear_wing_goals ( int  wingnum)

Definition at line 270 of file aigoals.cpp.

void ai_copy_mission_wing_goal ( ai_goal aigp,
ai_info aip 

Definition at line 1340 of file aigoals.cpp.

int ai_goal_num ( ai_goal goals)

Definition at line 691 of file aigoals.cpp.

const char* Ai_goal_text ( int  goal)

Definition at line 96 of file aigoals.cpp.

void ai_maybe_add_form_goal ( wing wingp)

Definition at line 134 of file aigoals.cpp.

void ai_mission_goal_complete ( ai_info aip)

Definition at line 360 of file aigoals.cpp.

void ai_mission_wing_goal_complete ( int  wingnum,
ai_goal remove_goalp 

Definition at line 300 of file aigoals.cpp.

void ai_post_process_mission ( )

Definition at line 159 of file aigoals.cpp.

void ai_process_mission_orders ( int  objnum,
ai_info aip 

Definition at line 1977 of file aigoals.cpp.

int ai_query_goal_valid ( int  ship,
int  ai_goal_type 

Determines if a goal is valid for a particular type of ship

shipShip type to test
ai_goal_typeGoal type to test

Definition at line 208 of file aigoals.cpp.

int ai_remove_goal_sexp_sub ( int  sexp,
ai_goal aigp 

Definition at line 1037 of file aigoals.cpp.

void ai_remove_ship_goal ( ai_info aip,
int  index 

Definition at line 231 of file aigoals.cpp.

void ai_remove_wing_goal_sexp ( int  sexp,
int  wingnum 

Definition at line 1175 of file aigoals.cpp.

void ai_update_goal_references ( ai_goal goals,
int  type,
const char *  old_name,
const char *  new_name 

Definition at line 2295 of file aigoals.cpp.

int query_referenced_in_ai_goals ( ai_goal goals,
int  type,
const char *  name 

Definition at line 2362 of file aigoals.cpp.

Variable Documentation

char Ai_dock_names[MAX_AI_DOCK_NAMES][NAME_LENGTH]

Definition at line 60 of file aigoals.cpp.

ai_goal_list Ai_goal_names[]

Definition at line 62 of file aigoals.cpp.

int Num_ai_dock_names

Definition at line 59 of file aigoals.cpp.

int Num_ai_goals

Definition at line 90 of file aigoals.cpp.