Freeciv-3.2
Loading...
Searching...
No Matches
Functions
daiplayer.c File Reference
#include "ai.h"
#include "city.h"
#include "game.h"
#include "unit.h"
#include "world_object.h"
#include "citytools.h"
#include "daidata.h"
#include "daimilitary.h"
#include "daiplayer.h"

Go to the source code of this file.

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)
 

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