Freeciv21
Develop your civilization from humble roots to a global empire
aiplayer.cpp File Reference
#include "ai.h"
#include "city.h"
#include "game.h"
#include "multipliers.h"
#include "registry_ini.h"
#include "citytools.h"
#include "aidata.h"
#include "daimilitary.h"
#include "aiplayer.h"
+ Include dependency graph for aiplayer.cpp:

Go to the source code of this file.

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...
 

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().