![]() |
Freeciv21
Develop your civilization from humble roots to a global empire
|
#include <fc_config.h>#include "ai.h"#include "aidata.h"#include "aiferry.h"#include "aihand.h"#include "ailog.h"#include "aiplayer.h"#include "aisettler.h"#include "aitools.h"#include "daicity.h"#include "daidiplomacy.h"#include "daidomestic.h"#include "daimilitary.h"#include "texaicity.h"#include "texaimsg.h"#include "texaiplayer.h"#include "texaiworld.h"
Include dependency graph for texai.c: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) |
| Return module capability string. More... | |
| bool | fc_ai_tex_setup (struct ai_type *ai) |
| Setup player ai_funcs function pointers. More... | |
| static void | texai_init_self (struct ai_type *ai) |
| Set pointer to ai type of the tex ai. More... | |
| struct ai_type * | texai_get_self (void) |
| Get pointer to ai type of the tex ai. More... | |
| static void | texai_module_close (void) |
| Free resources allocated by the tex AI module. More... | |
| static void | texwai_player_alloc (struct player *pplayer) |
| Call default ai with tex ai type as parameter. More... | |
| static void | texwai_player_free (struct player *pplayer) |
| Call default ai with tex ai type as parameter. More... | |
| static void | texwai_player_save (struct player *pplayer, struct section_file *file, int plrno) |
| Call default ai with tex ai type as parameter. More... | |
| static void | texwai_player_load (struct player *pplayer, const struct section_file *file, int plrno) |
| Call default ai with tex ai type as parameter. More... | |
| static void | texwai_control_gained (struct player *pplayer) |
| Call default ai with tex ai type as parameter. More... | |
| static void | texwai_control_lost (struct player *pplayer) |
| Call default ai with tex ai type as parameter. More... | |
| static void | texwai_split_by_civil_war (struct player *original, struct player *created) |
| Call default ai with tex ai type as parameter. More... | |
| static void | texwai_created_by_civil_war (struct player *original, struct player *created) |
| Call default ai with tex ai type as parameter. More... | |
| static void | texwai_phase_begin (struct player *pplayer, bool is_new_phase) |
| Call default ai with tex ai type as parameter. More... | |
| static void | texwai_phase_finished (struct player *pplayer) |
| Call default ai with tex ai type as parameter. More... | |
| static void | texwai_city_alloc (struct city *pcity) |
| Call default ai with tex ai type as parameter. More... | |
| static void | texwai_city_free (struct city *pcity) |
| Call default ai with tex ai type as parameter. More... | |
| static void | texwai_city_save (struct section_file *file, const struct city *pcity, const char *citystr) |
| Call default ai with tex ai type as parameter. More... | |
| static void | texwai_city_load (const struct section_file *file, struct city *pcity, const char *citystr) |
| Call default ai with tex ai type as parameter. More... | |
| static void | texwai_build_adv_override (struct city *pcity, struct adv_choice *choice) |
| Call default ai with tex ai type as parameter. More... | |
| static void | texwai_wonder_city_distance (struct player *pplayer, struct adv_data *adv) |
| Call default ai with tex ai type as parameter. More... | |
| static void | texwai_build_adv_init (struct player *pplayer) |
| Call default ai with tex ai type as parameter. More... | |
| static void | texwai_build_adv_adjust (struct player *pplayer, struct city *wonder_city) |
| Call default ai with tex ai type as parameter. More... | |
| static void | texwai_gov_value (struct player *pplayer, struct government *gov, adv_want *val, bool *override) |
| Call default ai with tex ai type as parameter. More... | |
| static void | texwai_units_ruleset_init (void) |
| Call default ai with tex ai type as parameter. More... | |
| static void | texwai_units_ruleset_close (void) |
| Call default ai with tex ai type as parameter. More... | |
| static void | texwai_unit_alloc (struct unit *punit) |
| Call default ai with tex ai type as parameter. More... | |
| static void | texwai_unit_free (struct unit *punit) |
| Call default ai with tex ai type as parameter. More... | |
| static void | texwai_ferry_init_ferry (struct unit *ferry) |
| Call default ai with tex ai type as parameter. More... | |
| static void | texwai_ferry_transformed (struct unit *ferry, const struct unit_type *old) |
| Call default ai with tex ai type as parameter. More... | |
| static void | texwai_ferry_lost (struct unit *punit) |
| Call default ai with tex ai type as parameter. More... | |
| static void | texwai_unit_turn_end (struct unit *punit) |
| Call default ai with tex ai type as parameter. More... | |
| static void | texwai_unit_move_or_attack (struct unit *punit, struct tile *ptile, struct pf_path *path, int step) |
| Call default ai with tex ai type as parameter. More... | |
| static void | texwai_unit_new_adv_task (struct unit *punit, enum adv_unit_task task, struct tile *ptile) |
| Call default ai with tex ai type as parameter. More... | |
| static void | texwai_unit_save (struct section_file *file, const struct unit *punit, const char *unitstr) |
| Call default ai with tex ai type as parameter. More... | |
| static void | texwai_unit_load (const struct section_file *file, struct unit *punit, const char *unitstr) |
| Call default ai with tex ai type as parameter. More... | |
| static void | texwai_auto_settler_reset (struct player *pplayer) |
| Call default ai with tex ai type as parameter. More... | |
| static void | texwai_auto_settler_run (struct player *pplayer, struct unit *punit, struct settlermap *state) |
| Call default ai with tex ai type as parameter. More... | |
| static void | texwai_auto_settler_cont (struct player *pplayer, struct unit *punit, struct settlermap *state) |
| Call default ai with tex ai type as parameter. More... | |
| static void | texwai_switch_to_explore (struct unit *punit, struct tile *target, enum override_bool *allow) |
| Call default ai with tex ai type as parameter. More... | |
| static void | texwai_first_activities (struct player *pplayer) |
| Call default ai with tex ai type as parameter. More... | |
| static void | texwai_restart_phase (struct player *pplayer) |
| Start working on the thread again. More... | |
| static void | texwai_diplomacy_actions (struct player *pplayer) |
| Call default ai with tex ai type as parameter. More... | |
| static void | texwai_last_activities (struct player *pplayer) |
| Call default ai with tex ai type as parameter. More... | |
| static void | texwai_treaty_evaluate (struct player *pplayer, struct player *aplayer, struct Treaty *ptreaty) |
| Call default ai with tex ai type as parameter. More... | |
| static void | texwai_treaty_accepted (struct player *pplayer, struct player *aplayer, struct Treaty *ptreaty) |
| Call default ai with tex ai type as parameter. More... | |
| static void | texwai_diplomacy_first_contact (struct player *pplayer, struct player *aplayer) |
| Call default ai with tex ai type as parameter. More... | |
| 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) |
| Call default ai with tex ai type as parameter. More... | |
| static void | texwai_city_log (char *buffer, int buflength, const struct city *pcity) |
| Call default ai with tex ai type as parameter. More... | |
| static void | texwai_unit_log (char *buffer, int buflength, const struct unit *punit) |
| Call default ai with tex ai type as parameter. More... | |
| static void | texwai_consider_plr_dangerous (struct player *plr1, struct player *plr2, enum override_bool *result) |
| Call default ai with tex ai type as parameter. More... | |
| static void | texwai_consider_tile_dangerous (struct tile *ptile, struct unit *punit, enum override_bool *result) |
| Call default ai with tex ai type as parameter. More... | |
| static void | texwai_consider_wonder_city (struct city *pcity, bool *result) |
| Call default ai with tex ai type as parameter. More... | |
| static void | texwai_refresh (struct player *pplayer) |
| Call default ai with tex ai type as parameter. More... | |
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 | ) |
| bool fc_ai_tex_setup | ( | struct ai_type * | ai | ) |
| struct ai_type* texai_get_self | ( | void | ) |
Get pointer to ai type of the tex ai.
Definition at line 58 of file texai.c.
Referenced by texai_check_messages(), texai_unit_destruction_recv(), and texai_unit_info_recv().
|
static |
Set pointer to ai type of the tex ai.
Definition at line 48 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Free resources allocated by the tex AI module.
Definition at line 67 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 399 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 379 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 388 of file texai.c.
Referenced by fc_ai_tex_setup().
Call default ai with tex ai type as parameter.
Definition at line 244 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 235 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 215 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 177 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 186 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 205 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 503 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 195 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 523 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 534 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 545 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 119 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 129 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 148 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 439 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 479 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 300 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 319 of file texai.c.
Referenced by fc_ai_tex_setup().
Call default ai with tex ai type as parameter.
Definition at line 309 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 420 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 254 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 489 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 448 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 158 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 167 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 78 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 89 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 109 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 99 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 554 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Start working on the thread again.
Definition at line 430 of file texai.c.
Referenced by fc_ai_tex_setup().
Call default ai with tex ai type as parameter.
Definition at line 138 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 410 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 468 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 457 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 282 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 291 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 369 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 513 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 337 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 348 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 359 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 328 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 273 of file texai.c.
Referenced by fc_ai_tex_setup().
|
static |
Call default ai with tex ai type as parameter.
Definition at line 264 of file texai.c.
Referenced by fc_ai_tex_setup().
Call default ai with tex ai type as parameter.
Definition at line 225 of file texai.c.
Referenced by fc_ai_tex_setup().