64#define TAI_AIT struct ai_type *ait = tai_get_self();
65#define TAI_TFUNC(_func, ...) _func(ait, ## __VA_ARGS__ );
66#define TAI_DFUNC(_func, ...) _func(ait, ## __VA_ARGS__ );
484 enum casus_belli_range scope,
485 const struct action *paction,
565 log_error(
_(
"This Freeciv compilation has no full threads "
566 "implementation, threaded ai cannot be used."));
570 strncpy(ai->
name,
"threaded",
sizeof(ai->
name));
573 private->contemplace_workers =
TRUE;
void dai_gov_value(struct ai_type *ait, struct player *pplayer, struct government *gov, adv_want *val, bool *override)
void dai_data_phase_begin(struct ai_type *ait, struct player *pplayer, bool is_new_phase)
void dai_data_phase_finished(struct ai_type *ait, struct player *pplayer)
void dai_ferry_lost(struct ai_type *ait, struct unit *punit)
void dai_ferry_transformed(struct ai_type *ait, struct unit *ferry, const struct unit_type *old)
void dai_ferry_init_ferry(struct ai_type *ait, struct unit *ferry)
void dai_do_last_activities(struct ai_type *ait, struct player *pplayer)
void dai_do_first_activities(struct ai_type *ait, struct player *pplayer)
void dai_unit_log(struct ai_type *ait, char *buffer, int buflength, const struct unit *punit)
void dai_city_log(struct ai_type *ait, char *buffer, int buflength, const struct city *pcity)
void dai_player_save(struct ai_type *ait, const char *aitstr, struct player *pplayer, struct section_file *file, int plrno)
void dai_player_copy(struct ai_type *ait, struct player *original, struct player *created)
void dai_player_load(struct ai_type *ait, const char *aitstr, struct player *pplayer, const struct section_file *file, int plrno)
void dai_gained_control(struct ai_type *ait, struct player *pplayer)
void dai_unit_save(struct ai_type *ait, const char *aitstr, struct section_file *file, const struct unit *punit, const char *unitstr)
void dai_units_ruleset_init(struct ai_type *ait)
void dai_switch_to_explore(struct ai_type *ait, struct unit *punit, struct tile *target, enum override_bool *allow)
void dai_unit_turn_end(struct ai_type *ait, struct unit *punit)
void dai_unit_init(struct ai_type *ait, struct unit *punit)
void dai_consider_tile_dangerous(struct ai_type *ait, struct tile *ptile, struct unit *punit, enum override_bool *result)
void dai_unit_load(struct ai_type *ait, const char *aitstr, const struct section_file *file, struct unit *punit, const char *unitstr)
void dai_unit_close(struct ai_type *ait, struct unit *punit)
void dai_units_ruleset_close(struct ai_type *ait)
void dai_city_save(struct ai_type *ait, const char *aitstr, struct section_file *file, const struct city *pcity, const char *citystr)
void dai_city_load(struct ai_type *ait, const char *aitstr, const struct section_file *file, struct city *pcity, const char *citystr)
void dai_city_alloc(struct ai_type *ait, struct city *pcity)
void dai_consider_wonder_city(struct ai_type *ait, struct city *pcity, bool *result)
void dai_build_adv_adjust(struct ai_type *ait, struct player *pplayer, struct city *wonder_city)
void dai_city_free(struct ai_type *ait, struct city *pcity)
void dai_build_adv_init(struct ai_type *ait, struct player *pplayer)
void dai_treaty_accepted(struct ai_type *ait, struct player *pplayer, struct player *aplayer, struct Treaty *ptreaty)
void dai_incident(struct ai_type *ait, enum incident_type type, enum casus_belli_range scope, const struct action *paction, struct player *receiver, struct player *violator, struct player *victim)
void dai_diplomacy_actions(struct ai_type *ait, struct player *pplayer)
void dai_treaty_evaluate(struct ai_type *ait, struct player *pplayer, struct player *aplayer, struct Treaty *ptreaty)
void dai_diplomacy_first_contact(struct ai_type *ait, struct player *pplayer, struct player *aplayer)
void dai_wonder_city_distance(struct ai_type *ait, struct player *pplayer, struct adv_data *adv)
void dai_assess_danger_player(struct ai_type *ait, const struct civ_map *nmap, struct player *pplayer)
void dai_auto_settler_cont(struct ai_type *ait, const struct civ_map *nmap, struct player *pplayer, struct unit *punit, struct settlermap *state)
void dai_auto_settler_reset(struct ai_type *ait, struct player *pplayer)
void dai_auto_settler_run(struct ai_type *ait, const struct civ_map *nmap, struct player *pplayer, struct unit *punit, struct settlermap *state)
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit * punit
bool has_thread_cond_impl(void)
#define log_error(message,...)
void(* log_fragment_unit)(char *buffer, int buflength, const struct unit *punit)
void(* city_alloc)(struct city *pcity)
void(* created_by_civil_war)(struct player *original, struct player *created)
void(* consider_tile_dangerous)(struct tile *ptile, struct unit *punit, enum override_bool *result)
void(* unit_lost)(struct unit *punit)
void(* treaty_evaluate)(struct player *pplayer, struct player *aplayer, struct Treaty *ptreaty)
void(* gov_value)(struct player *pplayer, struct government *gov, adv_want *val, bool *override)
void(* treaty_accepted)(struct player *pplayer, struct player *aplayer, struct Treaty *ptreaty)
void(* unit_transformed)(struct unit *punit, const struct unit_type *old_type)
void(* log_fragment_city)(char *buffer, int buflength, const struct city *pcity)
void(* settler_run)(struct player *pplayer, struct unit *punit, struct settlermap *state)
void(* unit_load)(const struct section_file *file, struct unit *punit, const char *unitstr)
void(* unit_move)(struct unit *punit, struct tile *ptile, struct pf_path *path, int step)
void(* unit_free)(struct unit *punit)
void(* phase_finished)(struct player *pplayer)
void(* restart_phase)(struct player *pplayer)
void(* settler_reset)(struct player *pplayer)
void(* unit_save)(struct section_file *file, const struct unit *punit, const char *unitstr)
void(* refresh)(struct player *pplayer)
void(* units_ruleset_close)(void)
void(* diplomacy_actions)(struct player *pplayer)
void(* player_alloc)(struct player *pplayer)
void(* build_adv_prepare)(struct player *pplayer, struct adv_data *adv)
void(* build_adv_adjust_want)(struct player *pplayer, struct city *wonder_city)
void(* player_load)(struct player *pplayer, const struct section_file *file, int plrno)
void(* build_adv_init)(struct player *pplayer)
void(* unit_task)(struct unit *punit, enum adv_unit_task task, struct tile *ptile)
void(* last_activities)(struct player *pplayer)
void(* incident)(enum incident_type type, enum casus_belli_range scope, const struct action *paction, struct player *receiver, struct player *violator, struct player *victim)
void(* settler_cont)(struct player *pplayer, struct unit *punit, struct settlermap *state)
void(* first_contact)(struct player *pplayer, struct player *aplayer)
void(* city_save)(struct section_file *file, const struct city *pcity, const char *citystr)
void(* consider_wonder_city)(struct city *pcity, bool *result)
void(* city_free)(struct city *pcity)
void(* choose_building)(struct city *pcity, struct adv_choice *choice)
struct ai_type::@14 funcs
void(* module_close)(void)
void(* city_load)(const struct section_file *file, struct city *pcity, const char *citystr)
void(* phase_begin)(struct player *pplayer, bool new_phase)
void(* player_free)(struct player *pplayer)
void(* split_by_civil_war)(struct player *original, struct player *created)
void(* unit_turn_end)(struct unit *punit)
void(* unit_alloc)(struct unit *punit)
void(* gained_control)(struct player *pplayer)
void(* unit_got)(struct unit *punit)
void(* player_save)(struct player *pplayer, struct section_file *file, int plrno)
void(* first_activities)(struct player *pplayer)
void(* consider_plr_dangerous)(struct player *plr1, struct player *plr2, enum override_bool *result)
void(* lost_control)(struct player *pplayer)
void(* units_ruleset_init)(void)
void(* want_to_explore)(struct unit *punit, struct tile *target, enum override_bool *allow)
void tai_phase_finished(struct ai_type *ait, struct player *pplayer)
void tai_first_activities(struct ai_type *ait, struct player *pplayer)
void tai_control_gained(struct ai_type *ait, struct player *pplayer)
void tai_control_lost(struct ai_type *ait, struct player *pplayer)
void tai_player_alloc(struct ai_type *ait, struct player *pplayer)
void tai_player_free(struct ai_type *ait, struct player *pplayer)
void tai_init_threading(void)
void tai_refresh(struct ai_type *ait, struct player *pplayer)
static void twai_ferry_init_ferry(struct unit *ferry)
static void twai_consider_plr_dangerous(struct player *plr1, struct player *plr2, enum override_bool *result)
static void twai_refresh(struct player *pplayer)
static void twai_city_load(const struct section_file *file, struct city *pcity, const char *citystr)
static void twai_auto_settler_cont(struct player *pplayer, struct unit *punit, struct settlermap *state)
const char * fc_ai_threaded_capstr(void)
static void twai_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 twai_city_alloc(struct city *pcity)
static void twai_control_lost(struct player *pplayer)
static void twai_diplomacy_first_contact(struct player *pplayer, struct player *aplayer)
static void twai_city_log(char *buffer, int buflength, const struct city *pcity)
static void twai_control_gained(struct player *pplayer)
static void twai_treaty_evaluate(struct player *pplayer, struct player *aplayer, struct Treaty *ptreaty)
static void twai_first_activities(struct player *pplayer)
bool fc_ai_threaded_setup(struct ai_type *ai)
static void twai_auto_settler_run(struct player *pplayer, struct unit *punit, struct settlermap *state)
static void tai_module_close(void)
static void twai_diplomacy_actions(struct player *pplayer)
static void twai_ferry_lost(struct unit *punit)
static void twai_player_alloc(struct player *pplayer)
static void twai_build_adv_override(struct city *pcity, struct adv_choice *choice)
static void twai_player_save(struct player *pplayer, struct section_file *file, int plrno)
static void twai_build_adv_init(struct player *pplayer)
static void twai_unit_move_or_attack(struct unit *punit, struct tile *ptile, struct pf_path *path, int step)
static void twai_phase_begin(struct player *pplayer, bool is_new_phase)
static void twai_consider_wonder_city(struct city *pcity, bool *result)
static void twai_player_free(struct player *pplayer)
static void twai_unit_save(struct section_file *file, const struct unit *punit, const char *unitstr)
static void twai_restart_phase(struct player *pplayer)
static void twai_phase_finished(struct player *pplayer)
static void twai_gov_value(struct player *pplayer, struct government *gov, adv_want *val, bool *override)
static void twai_units_ruleset_init(void)
static void twai_switch_to_explore(struct unit *punit, struct tile *target, enum override_bool *allow)
static void twai_unit_new_adv_task(struct unit *punit, enum adv_unit_task task, struct tile *ptile)
static void twai_created_by_civil_war(struct player *original, struct player *created)
#define TAI_TFUNC(_func,...)
static void twai_last_activities(struct player *pplayer)
static void twai_unit_load(const struct section_file *file, struct unit *punit, const char *unitstr)
static void twai_treaty_accepted(struct player *pplayer, struct player *aplayer, struct Treaty *ptreaty)
static void twai_unit_log(char *buffer, int buflength, const struct unit *punit)
static struct ai_type * tai_get_self(void)
#define TAI_DFUNC(_func,...)
static struct ai_type * self
static void twai_unit_alloc(struct unit *punit)
static void twai_player_load(struct player *pplayer, const struct section_file *file, int plrno)
static void twai_units_ruleset_close(void)
static void twai_unit_turn_end(struct unit *punit)
static void twai_auto_settler_reset(struct player *pplayer)
static void twai_city_free(struct city *pcity)
static void twai_ferry_transformed(struct unit *ferry, const struct unit_type *old)
static void twai_split_by_civil_war(struct player *original, struct player *created)
static void twai_unit_free(struct unit *punit)
static void tai_init_self(struct ai_type *ai)
static void twai_consider_tile_dangerous(struct tile *ptile, struct unit *punit, enum override_bool *result)
static void twai_wonder_city_distance(struct player *pplayer, struct adv_data *adv)
static void twai_city_save(struct section_file *file, const struct city *pcity, const char *citystr)
static void twai_build_adv_adjust(struct player *pplayer, struct city *wonder_city)