85 bool finished =
FALSE;
160 return plr_data->
units;
182 case TEXAI_MSG_FIRST_ACTIVITIES:
198 if (tex_city != NULL) {
224 case TEXAI_MSG_TILE_INFO:
227 case TEXAI_MSG_UNIT_MOVED:
230 case TEXAI_MSG_UNIT_CREATED:
231 case TEXAI_MSG_UNIT_CHANGED:
234 case TEXAI_MSG_UNIT_DESTROYED:
237 case TEXAI_MSG_CITY_CREATED:
238 case TEXAI_MSG_CITY_CHANGED:
241 case TEXAI_MSG_CITY_DESTROYED:
244 case TEXAI_MSG_PHASE_FINISHED:
247 case TEXAI_MSG_THR_EXIT:
250 case TEXAI_MSG_MAP_ALLOC:
253 case TEXAI_MSG_MAP_FREE:
257 log_error(
"Illegal message type %s (%d) for tex ai!",
258 texaimsgtype_name(msg->
type), msg->
type);
262 if (new_abort < ret_abort) {
263 ret_abort = new_abort;
287 player_data->
units = unit_list_new();
288 player_data->
cities = city_list_new();
301 if (player_data != NULL) {
303 unit_list_destroy(player_data->
units);
304 city_list_destroy(player_data->
cities);
381 case TEXAI_REQ_WORKER_TASK:
384 case TEXAI_BUILD_CHOICE:
397 case TEXAI_REQ_TURN_DONE:
void adv_free_choice(struct adv_choice *choice)
static void adv_choice_copy(struct adv_choice *dest, struct adv_choice *src)
void dai_data_init(struct ai_type *ait, struct player *pplayer)
void dai_data_close(struct ai_type *ait, struct player *pplayer)
static struct ai_city * def_ai_city_data(const struct city *pcity, struct ai_type *deftype)
#define city_list_iterate_safe(citylist, _city)
#define city_list_iterate(citylist, pcity)
#define city_owner(_pcity_)
#define city_list_iterate_end
#define city_list_iterate_safe_end
struct adv_choice * military_advisor_choose_build(struct ai_type *ait, const struct civ_map *nmap, struct player *pplayer, struct city *pcity, player_unit_list_getter ul_cb)
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
void fc_thread_cond_destroy(fc_thread_cond *cond)
void fc_thread_cond_signal(fc_thread_cond *cond)
void fc_thread_cond_wait(fc_thread_cond *cond, fc_mutex *mutex)
void fc_thread_cond_init(fc_thread_cond *cond)
int fc_thread_start(fc_thread *thread, void(*function)(void *arg), void *arg)
void fc_allocate_mutex(fc_mutex *mutex)
void fc_release_mutex(fc_mutex *mutex)
void fc_thread_wait(fc_thread *thread)
void fc_destroy_mutex(fc_mutex *mutex)
void fc_init_mutex(fc_mutex *mutex)
struct city * game_city_by_number(int id)
void initialize_infrastructure_cache(struct player *pplayer)
#define log_debug(message,...)
#define log_error(message,...)
#define whole_map_iterate(_map, _tile)
#define whole_map_iterate_end
#define fc_calloc(n, esz)
void * player_ai_data(const struct player *pplayer, const struct ai_type *ai)
void player_set_ai_data(struct player *pplayer, const struct ai_type *ai, void *data)
#define players_iterate_end
#define players_iterate(_pplayer)
struct civ_game::@30::@34 server
struct civ_game::@30::@34::@38 mutexes
struct city_list * cities
struct texaimsg_list * msglist
struct city_list * cities
struct texaireq_list * reqlist
struct texai_reqs reqs_from
struct texai_msgs msgs_to
struct ai_type * texai_get_self(void)
void texai_city_worker_requests_create(struct ai_type *ait, struct player *pplayer, struct city *pcity)
void texai_city_worker_wants(struct ai_type *ait, struct player *pplayer, struct city *pcity)
void texai_req_worker_task_rcv(struct texai_req *req)
void texai_send_msg(enum texaimsgtype type, struct player *pplayer, void *data)
void texai_send_req(enum texaireqtype type, struct player *pplayer, void *data)
void texai_player_alloc(struct ai_type *ait, struct player *pplayer)
void texai_control_gained(struct ai_type *ait, struct player *pplayer)
void texai_player_free(struct ai_type *ait, struct player *pplayer)
struct unit_list * texai_player_units(struct player *pplayer)
bool texai_thread_running(void)
void texai_control_lost(struct ai_type *ait, struct player *pplayer)
void texai_req_from_thr(struct texai_req *req)
static void texai_thread_start(void *arg)
static void texai_map_free_recv(void)
static enum texai_abort_msg_class texai_check_messages(struct ai_type *ait)
void texai_refresh(struct ai_type *ait, struct player *pplayer)
void texai_init_threading(void)
void texai_msg_to_thr(struct texai_msg *msg)
void texai_map_alloc(void)
void texai_whole_map_copy(void)
static void texai_map_alloc_recv(void)
void texai_map_free(void)
void texai_city_info_recv(void *data, enum texaimsgtype msgtype)
struct civ_map * texai_map_get(void)
void texai_city_created(struct city *pcity)
void texai_city_destruction_recv(void *data)
void texai_tile_info_recv(void *data)
void texai_map_close(void)
void texai_world_init(void)
void texai_tile_info(struct tile *ptile)
void texai_unit_info_recv(void *data, enum texaimsgtype msgtype)
void texai_unit_created(struct unit *punit)
struct city * texai_map_city(int city_id)
void texai_unit_moved_recv(void *data)
void texai_map_init(void)
void texai_world_close(void)
void texai_unit_destruction_recv(void *data)
#define unit_list_iterate(unitlist, punit)
#define unit_list_iterate_end