Freeciv-3.1
|
#include "ai.h"
#include "aidata.h"
#include "aiferry.h"
#include "aihand.h"
#include "ailog.h"
#include "aiplayer.h"
#include "aitools.h"
#include "daicity.h"
#include "daidiplomacy.h"
#include "daidomestic.h"
#include "daimilitary.h"
#include "daisettler.h"
#include "texaicity.h"
#include "texaimsg.h"
#include "texaiplayer.h"
#include "texaiworld.h"
Go to the source code of this file.
Macros | |
#define | TEXAI_AIT struct ai_type *ait = texai_get_self(); |
#define | TEXAI_TFUNC(_func, ...) _func(ait, ## __VA_ARGS__ ); |
#define | TEXAI_DFUNC(_func, ...) _func(ait, ## __VA_ARGS__ ); |
Functions | |
const char * | fc_ai_tex_capstr (void) |
bool | fc_ai_tex_setup (struct ai_type *ai) |
static void | texai_init_self (struct ai_type *ai) |
struct ai_type * | texai_get_self (void) |
static void | texai_module_close (void) |
static void | texwai_player_alloc (struct player *pplayer) |
static void | texwai_player_free (struct player *pplayer) |
static void | texwai_player_save (struct player *pplayer, struct section_file *file, int plrno) |
static void | texwai_player_load (struct player *pplayer, const struct section_file *file, int plrno) |
static void | texwai_control_gained (struct player *pplayer) |
static void | texwai_control_lost (struct player *pplayer) |
static void | texwai_split_by_civil_war (struct player *original, struct player *created) |
static void | texwai_created_by_civil_war (struct player *original, struct player *created) |
static void | texwai_phase_begin (struct player *pplayer, bool is_new_phase) |
static void | texwai_phase_finished (struct player *pplayer) |
static void | texwai_city_alloc (struct city *pcity) |
static void | texwai_city_free (struct city *pcity) |
static void | texwai_city_save (struct section_file *file, const struct city *pcity, const char *citystr) |
static void | texwai_city_load (const struct section_file *file, struct city *pcity, const char *citystr) |
static void | texwai_build_adv_override (struct city *pcity, struct adv_choice *choice) |
static void | texwai_wonder_city_distance (struct player *pplayer, struct adv_data *adv) |
static void | texwai_build_adv_init (struct player *pplayer) |
static void | texwai_build_adv_adjust (struct player *pplayer, struct city *wonder_city) |
static void | texwai_gov_value (struct player *pplayer, struct government *gov, adv_want *val, bool *override) |
static void | texwai_units_ruleset_init (void) |
static void | texwai_units_ruleset_close (void) |
static void | texwai_unit_alloc (struct unit *punit) |
static void | texwai_unit_free (struct unit *punit) |
static void | texwai_ferry_init_ferry (struct unit *ferry) |
static void | texwai_ferry_transformed (struct unit *ferry, const struct unit_type *old) |
static void | texwai_ferry_lost (struct unit *punit) |
static void | texwai_unit_turn_end (struct unit *punit) |
static void | texwai_unit_move_or_attack (struct unit *punit, struct tile *ptile, struct pf_path *path, int step) |
static void | texwai_unit_new_adv_task (struct unit *punit, enum adv_unit_task task, struct tile *ptile) |
static void | texwai_unit_save (struct section_file *file, const struct unit *punit, const char *unitstr) |
static void | texwai_unit_load (const struct section_file *file, struct unit *punit, const char *unitstr) |
static void | texwai_auto_settler_reset (struct player *pplayer) |
static void | texwai_auto_settler_run (struct player *pplayer, struct unit *punit, struct settlermap *state) |
static void | texwai_auto_settler_cont (struct player *pplayer, struct unit *punit, struct settlermap *state) |
static void | texwai_switch_to_explore (struct unit *punit, struct tile *target, enum override_bool *allow) |
static void | texwai_first_activities (struct player *pplayer) |
static void | texwai_restart_phase (struct player *pplayer) |
static void | texwai_diplomacy_actions (struct player *pplayer) |
static void | texwai_last_activities (struct player *pplayer) |
static void | texwai_treaty_evaluate (struct player *pplayer, struct player *aplayer, struct Treaty *ptreaty) |
static void | texwai_treaty_accepted (struct player *pplayer, struct player *aplayer, struct Treaty *ptreaty) |
static void | texwai_diplomacy_first_contact (struct player *pplayer, struct player *aplayer) |
static void | texwai_incident (enum incident_type type, enum casus_belli_range scope, const struct action *paction, struct player *receiver, struct player *violator, struct player *victim) |
static void | texwai_city_log (char *buffer, int buflength, const struct city *pcity) |
static void | texwai_unit_log (char *buffer, int buflength, const struct unit *punit) |
static void | texwai_consider_plr_dangerous (struct player *plr1, struct player *plr2, enum override_bool *result) |
static void | texwai_consider_tile_dangerous (struct tile *ptile, struct unit *punit, enum override_bool *result) |
static void | texwai_consider_wonder_city (struct city *pcity, bool *result) |
static void | texwai_refresh (struct player *pplayer) |
Variables | |
static struct ai_type * | self = NULL |
#define TEXAI_AIT struct ai_type *ait = texai_get_self(); |
#define TEXAI_DFUNC | ( | _func, | |
... | |||
) | _func(ait, ## __VA_ARGS__ ); |
#define TEXAI_TFUNC | ( | _func, | |
... | |||
) | _func(ait, ## __VA_ARGS__ ); |
const char * fc_ai_tex_capstr | ( | void | ) |
struct ai_type * texai_get_self | ( | void | ) |
Get pointer to ai type of the tex ai.
Definition at line 60 of file texai.c.
Referenced by texai_city_destruction_recv(), texai_city_info_recv(), texai_player_units(), texai_unit_destruction_recv(), and texai_unit_info_recv().
|
static |
Set pointer to ai type of the tex ai.
Definition at line 50 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Free resources allocated by the tex AI module
Definition at line 72 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 405 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 383 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 392 of file texai.c.
Referenced by fc_ai_tex_setup().
Call default ai with tex ai type as parameter.
Definition at line 248 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 239 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 219 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 181 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 190 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 209 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 511 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 199 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 531 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 542 of file texai.c.
Referenced by fc_ai_tex_setup().
Call default ai with tex ai type as parameter.
Definition at line 553 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 123 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 133 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 152 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 447 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 487 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 304 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 323 of file texai.c.
Referenced by fc_ai_tex_setup().
Call default ai with tex ai type as parameter.
Definition at line 313 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 428 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 258 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 497 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 456 of file texai.c.
Referenced by fc_ai_tex_setup().
Call default ai with tex ai type as parameter.
Definition at line 162 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 171 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 82 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 92 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 112 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 102 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 562 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Start working on the thread again.
Definition at line 438 of file texai.c.
Referenced by fc_ai_tex_setup().
Call default ai with tex ai type as parameter.
Definition at line 142 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 418 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 476 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 465 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 286 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 295 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 373 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 521 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 341 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 352 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 363 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 332 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 277 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 268 of file texai.c.
Referenced by fc_ai_tex_setup().
Call default ai with tex ai type as parameter.
Definition at line 229 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Definition at line 45 of file texai.c.
Referenced by texai_get_self(), and texai_init_self().