Freeciv21
Develop your civilization from humble roots to a global empire
aiplayer.h File Reference
#include "player.h"
#include "unit.h"
+ Include dependency graph for aiplayer.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  dai_private_data
 

Functions

void dai_player_alloc (struct ai_type *ait, struct player *pplayer)
 Initialize player for use with default AI. More...
 
void dai_player_free (struct ai_type *ait, struct player *pplayer)
 Free player from use with default AI. More...
 
void dai_player_save_relations (struct ai_type *ait, const char *aitstr, struct player *pplayer, struct player *other, struct section_file *file, int plrno)
 Store player specific data to savegame. More...
 
void dai_player_load_relations (struct ai_type *ait, const char *aitstr, struct player *pplayer, struct player *other, const struct section_file *file, int plrno)
 Load player vs player specific data from savegame. More...
 
void dai_player_copy (struct ai_type *ait, struct player *original, struct player *created)
 Copy default ai data from player to player. More...
 
void dai_gained_control (struct ai_type *ait, struct player *pplayer)
 Ai got control of the player. More...
 
static struct ai_citydef_ai_city_data (const struct city *pcity, struct ai_type *deftype)
 
static struct unit_aidef_ai_unit_data (const struct unit *punit, struct ai_type *deftype)
 
static struct ai_plrdef_ai_player_data (const struct player *pplayer, struct ai_type *deftype)
 

Function Documentation

◆ dai_gained_control()

void dai_gained_control ( struct ai_type ait,
struct player pplayer 
)

Ai got control of the player.

Definition at line 144 of file aiplayer.cpp.

Referenced by cai_gained_control(), texwai_control_gained(), and twai_control_gained().

◆ dai_player_alloc()

void dai_player_alloc ( struct ai_type ait,
struct player pplayer 
)

Initialize player for use with default AI.

Note that this is called for all players, not just for those default AI is controlling.

Definition at line 34 of file aiplayer.cpp.

Referenced by cai_player_alloc().

◆ dai_player_copy()

void dai_player_copy ( struct ai_type ait,
struct player original,
struct player created 
)

Copy default ai data from player to player.

Definition at line 117 of file aiplayer.cpp.

Referenced by cai_created_by_civil_war(), texwai_created_by_civil_war(), and twai_created_by_civil_war().

◆ dai_player_free()

void dai_player_free ( struct ai_type ait,
struct player pplayer 
)

Free player from use with default AI.

Definition at line 46 of file aiplayer.cpp.

Referenced by cai_player_free().

◆ dai_player_load_relations()

void dai_player_load_relations ( struct ai_type ait,
const char *  aitstr,
struct player pplayer,
struct player other,
const struct section_file file,
int  plrno 
)

Load player vs player specific data from savegame.

Definition at line 87 of file aiplayer.cpp.

Referenced by cai_player_load_relations().

◆ dai_player_save_relations()

void dai_player_save_relations ( struct ai_type ait,
const char *  aitstr,
struct player pplayer,
struct player other,
struct section_file file,
int  plrno 
)

Store player specific data to savegame.

Definition at line 62 of file aiplayer.cpp.

Referenced by cai_player_save_relations().

◆ def_ai_city_data()

◆ def_ai_player_data()

◆ def_ai_unit_data()