Freeciv-3.1
|
Go to the source code of this file.
Data Structures | |
struct | agent |
Macros | |
#define | LAST_AGENT_LEVEL 99 |
#define | MAX_AGENT_NAME_LEN 10 |
Enumerations | |
enum | callback_type { CB_NEW , CB_REMOVE , CB_CHANGE , CB_LAST } |
Functions | |
void | agents_init (void) |
void | agents_free (void) |
void | register_agent (const struct agent *agent) |
bool | agents_busy (void) |
void | agents_disconnect (void) |
void | agents_processing_started (void) |
void | agents_processing_finished (void) |
void | agents_freeze_hint (void) |
void | agents_thaw_hint (void) |
void | agents_game_joined (void) |
void | agents_game_start (void) |
void | agents_before_new_turn (void) |
void | agents_start_turn (void) |
void | agents_new_turn (void) |
void | agents_unit_changed (struct unit *punit) |
void | agents_unit_new (struct unit *punit) |
void | agents_unit_remove (struct unit *punit) |
void | agents_city_changed (struct city *pcity) |
void | agents_city_new (struct city *pcity) |
void | agents_city_remove (struct city *pcity) |
void | agents_tile_changed (struct tile *ptile) |
void | agents_tile_new (struct tile *ptile) |
void | agents_tile_remove (struct tile *ptile) |
void | cause_a_city_changed_for_agent (const char *name_of_calling_agent, struct city *pcity) |
void | cause_a_unit_changed_for_agent (const char *name_of_calling_agent, struct unit *punit) |
void | wait_for_requests (const char *agent_name, int first_request_id, int last_request_id) |
enum callback_type |
void agents_before_new_turn | ( | void | ) |
Called from client/packhand.c.
Definition at line 462 of file agents.c.
Referenced by handle_end_turn().
bool agents_busy | ( | void | ) |
Returns TRUE iff some agent is currently busy.
Definition at line 799 of file agents.c.
Referenced by can_end_turn(), and send_turn_done().
void agents_city_changed | ( | struct city * | pcity | ) |
Called from client/packhand.c. See agents_unit_changed() for a generic documentation.
Definition at line 584 of file agents.c.
Referenced by handle_city_info(), and handle_city_short_info().
void agents_city_new | ( | struct city * | pcity | ) |
Called from client/packhand.c. See agents_unit_changed() for a generic documentation.
Definition at line 610 of file agents.c.
Referenced by handle_city_info(), and handle_city_short_info().
void agents_city_remove | ( | struct city * | pcity | ) |
Called from client/packhand.c. See agents_unit_changed() for a generic documentation.
Definition at line 636 of file agents.c.
Referenced by handle_city_remove().
void agents_disconnect | ( | void | ) |
Called from client/packhand.c.
Definition at line 400 of file agents.c.
Referenced by set_client_state().
void agents_free | ( | void | ) |
Free resources allocated for agents framework
Definition at line 346 of file agents.c.
Referenced by client_game_free(), and client_game_reset().
void agents_freeze_hint | ( | void | ) |
Called from client/packhand.c.
Definition at line 427 of file agents.c.
Referenced by handle_freeze_client(), and input_from_server().
void agents_game_joined | ( | void | ) |
Called from client/packhand.c.
Definition at line 445 of file agents.c.
Referenced by handle_server_join_reply().
void agents_game_start | ( | void | ) |
Called from client/packhand.c.
Definition at line 453 of file agents.c.
Referenced by set_client_state().
void agents_init | ( | void | ) |
Called once per client startup.
Definition at line 332 of file agents.c.
Referenced by client_game_init(), and client_game_reset().
void agents_new_turn | ( | void | ) |
Called from client/packhand.c. See agents_unit_changed() for a generic documentation.
Definition at line 479 of file agents.c.
Referenced by handle_new_year().
void agents_processing_finished | ( | void | ) |
Called from client/packhand.c.
Definition at line 418 of file agents.c.
Referenced by handle_processing_finished().
void agents_processing_started | ( | void | ) |
Called from client/packhand.c.
Definition at line 409 of file agents.c.
Referenced by handle_processing_started().
void agents_start_turn | ( | void | ) |
Called from client/packhand.c.
Definition at line 470 of file agents.c.
Referenced by handle_start_phase().
void agents_thaw_hint | ( | void | ) |
Called from client/packhand.c.
Definition at line 436 of file agents.c.
Referenced by handle_thaw_client(), and input_from_server().
void agents_tile_changed | ( | struct tile * | ptile | ) |
Called from client/packhand.c. See agents_unit_changed() for a generic documentation.
Definition at line 687 of file agents.c.
Referenced by handle_tile_info().
void agents_tile_new | ( | struct tile * | ptile | ) |
Called from client/packhand.c. See agents_unit_changed() for a generic documentation.
Definition at line 711 of file agents.c.
Referenced by handle_tile_info().
void agents_tile_remove | ( | struct tile * | ptile | ) |
Called from client/packhand.c. See agents_unit_changed() for a generic documentation. Tiles got removed because of FOW.
Definition at line 663 of file agents.c.
Referenced by handle_tile_info().
void agents_unit_changed | ( | struct unit * | punit | ) |
Called from client/packhand.c. A call is created and added to the list of outstanding calls if an agent wants to be informed about this event and the change wasn't caused by the agent. We then try (this may not be successful in every case since we can be frozen or another call_handle_methods may be running higher up on the stack) to execute all outstanding calls.
Definition at line 507 of file agents.c.
Referenced by handle_unit_packet_common().
void agents_unit_new | ( | struct unit * | punit | ) |
Called from client/packhand.c. See agents_unit_changed() for a generic documentation.
Definition at line 532 of file agents.c.
Referenced by handle_unit_packet_common().
void agents_unit_remove | ( | struct unit * | punit | ) |
Called from client/packhand.c. See agents_unit_changed() for a generic documentation.
Definition at line 558 of file agents.c.
Referenced by handle_unit_remove().
void cause_a_city_changed_for_agent | ( | const char * | name_of_calling_agent, |
struct city * | pcity | ||
) |
Adds a specific call for the given agent.
Definition at line 786 of file agents.c.
Referenced by cma_put_city_under_agent().
void cause_a_unit_changed_for_agent | ( | const char * | name_of_calling_agent, |
struct unit * | punit | ||
) |
void register_agent | ( | const struct agent * | agent | ) |
Registers an agent.
Definition at line 378 of file agents.c.
Referenced by cma_init(), cmafec_init(), and simple_historian_init().
void wait_for_requests | ( | const char * | agent_name, |
int | first_request_id, | ||
int | last_request_id | ||
) |
Called from an agent. This function will return until the last request has been processed by the server.
Definition at line 735 of file agents.c.
Referenced by apply_result_on_server().