Freeciv-3.3
Loading...
Searching...
No Matches
Data Structures | Functions
daiplayer.h File Reference
#include "city.h"
#include "player.h"

Go to the source code of this file.

Data Structures

struct  dai_private_data
 

Functions

void dai_player_alloc (struct ai_type *ait, struct player *pplayer)
 
void dai_player_free (struct ai_type *ait, struct player *pplayer)
 
void dai_player_save (struct ai_type *ait, const char *aitstr, struct player *pplayer, struct section_file *file, int plrno)
 
void dai_player_save_relations (struct ai_type *ait, const char *aitstr, struct player *pplayer, struct player *other, struct section_file *file, int plrno)
 
void dai_player_load (struct ai_type *ait, const char *aitstr, struct player *pplayer, const struct section_file *file, int plrno)
 
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)
 
void dai_player_copy (struct ai_type *ait, struct player *original, struct player *created)
 
void dai_gained_control (struct ai_type *ait, struct player *pplayer)
 
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 174 of file daiplayer.c.

Referenced by cai_gained_control(), and texwai_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 38 of file daiplayer.c.

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 151 of file daiplayer.c.

Referenced by cai_created_by_civil_war(), and texwai_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 50 of file daiplayer.c.

Referenced by cai_player_free().

◆ dai_player_load()

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

Load player specific data from savegame

Definition at line 108 of file daiplayer.c.

Referenced by texwai_player_load().

◆ 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 120 of file daiplayer.c.

Referenced by cai_player_load_relations(), and dai_player_load().

◆ dai_player_save()

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

Store player specific data to savegame

Definition at line 65 of file daiplayer.c.

Referenced by texwai_player_save().

◆ 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 77 of file daiplayer.c.

Referenced by cai_player_save_relations(), and dai_player_save().

◆ def_ai_city_data()

static struct ai_city * def_ai_city_data ( const struct city pcity,
struct ai_type deftype 
)
inlinestatic

◆ def_ai_player_data()

static struct ai_plr * def_ai_player_data ( const struct player pplayer,
struct ai_type deftype 
)
inlinestatic

◆ def_ai_unit_data()

static struct unit_ai * def_ai_unit_data ( const struct unit punit,
struct ai_type deftype 
)
inlinestatic