Freeciv-3.3
|
#include "log.h"
#include "ai.h"
#include "city.h"
#include "game.h"
#include "map.h"
#include "unit.h"
#include "advchoice.h"
#include "infracache.h"
#include "daimilitary.h"
#include "daiplayer.h"
#include "texaicity.h"
#include "texaiworld.h"
#include "texaiplayer.h"
Go to the source code of this file.
Data Structures | |
struct | texai_thr |
struct | texai_build_choice_req |
Enumerations | |
enum | texai_abort_msg_class { TEXAI_ABORT_EXIT , TEXAI_ABORT_PHASE_END , TEXAI_ABORT_NONE } |
Functions | |
static enum texai_abort_msg_class | texai_check_messages (struct ai_type *ait) |
void | texai_init_threading (void) |
static void | texai_thread_start (void *arg) |
void | texai_map_alloc (void) |
void | texai_whole_map_copy (void) |
static void | texai_map_alloc_recv (void) |
void | texai_map_free (void) |
static void | texai_map_free_recv (void) |
struct unit_list * | texai_player_units (struct player *pplayer) |
void | texai_player_alloc (struct ai_type *ait, struct player *pplayer) |
void | texai_player_free (struct ai_type *ait, struct player *pplayer) |
void | texai_control_gained (struct ai_type *ait, struct player *pplayer) |
void | texai_control_lost (struct ai_type *ait, struct player *pplayer) |
void | texai_refresh (struct ai_type *ait, struct player *pplayer) |
void | texai_msg_to_thr (struct texai_msg *msg) |
void | texai_req_from_thr (struct texai_req *req) |
bool | texai_thread_running (void) |
Variables | |
struct texai_thr | exthrai |
Enumerator | |
---|---|
TEXAI_ABORT_EXIT | |
TEXAI_ABORT_PHASE_END | |
TEXAI_ABORT_NONE |
Definition at line 46 of file texaiplayer.c.
|
static |
Handle messages from message queue.
Definition at line 166 of file texaiplayer.c.
Referenced by texai_check_messages(), and texai_thread_start().
We actually control the player
Definition at line 312 of file texaiplayer.c.
Referenced by texwai_control_gained().
We no longer control the player
Definition at line 343 of file texaiplayer.c.
Referenced by texwai_control_lost().
Main map has been allocated
Definition at line 114 of file texaiplayer.c.
Referenced by fc_ai_tex_setup().
Map allocation message received
Definition at line 132 of file texaiplayer.c.
Referenced by texai_check_messages().
Main map has been freed
Definition at line 140 of file texaiplayer.c.
Referenced by fc_ai_tex_setup().
Map free message received
Definition at line 148 of file texaiplayer.c.
Referenced by texai_check_messages().
Send message to thread. Be sure that thread is running so that messages are not just piling up to the list without anybody reading them.
Definition at line 414 of file texaiplayer.c.
Referenced by texai_send_msg().
Initialize player for use with tex AI.
Definition at line 278 of file texaiplayer.c.
Referenced by texwai_player_alloc().
Free player from use with tex AI.
Definition at line 294 of file texaiplayer.c.
Referenced by texwai_player_free().
Callback that returns unit list from player tex ai data.
Definition at line 156 of file texaiplayer.c.
Referenced by texai_check_messages(), and texai_city_worker_task_select().
Check for messages sent by player thread
Definition at line 366 of file texaiplayer.c.
Referenced by texwai_refresh().
Return whether player thread is running
Definition at line 435 of file texaiplayer.c.
Referenced by texai_city_destroyed(), texai_city_update(), texai_send_msg(), texai_tile_info(), texai_unit_destroyed(), texai_unit_move_seen(), and texai_unit_update().
This is main function of ai thread.
Definition at line 83 of file texaiplayer.c.
Referenced by texai_control_gained().
Send all tiles to tex thread
Definition at line 122 of file texaiplayer.c.
Referenced by fc_ai_tex_setup().