106#undef DEBUG_TRANSPORT
110 struct tile_list *worked_tiles,
111 bool is_new,
bool popup,
bool investigate);
138#define REQEST_BACKGROUND_REFRESH (1)
140#define REQEST_BACKGROUND_FAST_AUTO_ATTACK (2)
144 ACTION_CAPTURE_UNITS,
145 ACTION_BOMBARD, ACTION_BOMBARD2, ACTION_BOMBARD3,
146 ACTION_NUKE, ACTION_NUKE_CITY, ACTION_NUKE_UNITS,
147 ACTION_ATTACK, ACTION_SUICIDE_ATTACK,
148 ACTION_CONQUER_CITY, ACTION_CONQUER_CITY2,
149 ACTION_CONQUER_CITY3, ACTION_CONQUER_CITY4,
150 ACTION_STRIKE_PRODUCTION,
151 ACTION_CONQUER_EXTRAS, ACTION_CONQUER_EXTRAS2,
152 ACTION_CONQUER_EXTRAS3, ACTION_CONQUER_EXTRAS4,
159 ACTION_ESTABLISH_EMBASSY, ACTION_ESTABLISH_EMBASSY_STAY,
160 ACTION_SPY_INVESTIGATE_CITY, ACTION_INV_CITY_SPEND,
161 ACTION_SPY_POISON, ACTION_SPY_POISON_ESC,
162 ACTION_SPY_STEAL_GOLD, ACTION_SPY_STEAL_GOLD_ESC,
163 ACTION_SPY_SPREAD_PLAGUE,
164 ACTION_SPY_SABOTAGE_CITY, ACTION_SPY_SABOTAGE_CITY_ESC,
165 ACTION_SPY_TARGETED_SABOTAGE_CITY,
166 ACTION_SPY_TARGETED_SABOTAGE_CITY_ESC,
167 ACTION_SPY_SABOTAGE_CITY_PRODUCTION,
168 ACTION_SPY_SABOTAGE_CITY_PRODUCTION_ESC,
169 ACTION_SPY_STEAL_TECH, ACTION_SPY_STEAL_TECH_ESC,
170 ACTION_SPY_TARGETED_STEAL_TECH,
171 ACTION_SPY_TARGETED_STEAL_TECH_ESC,
172 ACTION_SPY_INCITE_CITY, ACTION_SPY_INCITE_CITY_ESC,
173 ACTION_TRADE_ROUTE, ACTION_MARKETPLACE,
175 ACTION_SPY_BRIBE_UNIT,
176 ACTION_SPY_SABOTAGE_UNIT, ACTION_SPY_SABOTAGE_UNIT_ESC,
180 ACTION_STEAL_MAPS, ACTION_STEAL_MAPS_ESC,
181 ACTION_SPY_NUKE, ACTION_SPY_NUKE_ESC,
184 ACTION_DISBAND_UNIT_RECOVER,
188 ACTION_PARADROP, ACTION_PARADROP_CONQUER, ACTION_PARADROP_FRIGHTEN,
189 ACTION_PARADROP_FRIGHTEN_CONQUER, ACTION_PARADROP_ENTER,
190 ACTION_PARADROP_ENTER_CONQUER,
192 ACTION_HEAL_UNIT, ACTION_HEAL_UNIT2,
193 ACTION_TRANSFORM_TERRAIN,
197 ACTION_CLEAN_POLLUTION,
198 ACTION_CLEAN_FALLOUT,
203 ACTION_HUT_ENTER, ACTION_HUT_ENTER2, ACTION_HUT_ENTER3, ACTION_HUT_ENTER4,
204 ACTION_HUT_FRIGHTEN, ACTION_HUT_FRIGHTEN2,
205 ACTION_HUT_FRIGHTEN3, ACTION_HUT_FRIGHTEN4,
207 ACTION_STRIKE_BUILDING,
417 const char *capability,
418 const char *challenge_file,
int conn_id)
441#ifdef EMERGENCY_VERSION
461 _(
"You were rejected from the game: %s"),
message);
487 bool need_menus_update;
490 city_id32 = city_id16;
504 if (need_menus_update) {
516 struct unit_list *cargos;
518 bool need_economy_report_update;
521 unit_id32 = unit_id16;
527 log_error(
"Server wants us to remove unit id %d, "
528 "but we don't know about this unit!",
546 if (unit_list_size(cargos) > 0) {
563 if (need_economy_report_update) {
598 bool show_combat =
FALSE;
601 int attacker_unit_id;
602 int defender_unit_id;
615 if (punit0 && punit1) {
694 bool city_is_new =
FALSE;
695 bool city_has_changed_owner =
FALSE;
696 bool need_science_dialog_update =
FALSE;
697 bool need_units_dialog_update =
FALSE;
698 bool need_economy_dialog_update =
FALSE;
699 bool name_changed =
FALSE;
700 bool update_descriptions =
FALSE;
701 bool shield_stock_changed =
FALSE;
702 bool production_changed =
FALSE;
703 bool trade_routes_changed =
FALSE;
706 struct tile_list *worked_tiles = NULL;
708 struct tile *ptile = NULL;
713 city_id = packet->
id16;
715 city_id = packet->
id32;
724 log_error(
"handle_city_info() bad production_kind %d.",
726 product.
kind = VUT_NONE;
730 if (!universals_n_is_valid(product.
kind)) {
732 "production_kind %d with bad production_value %d.",
734 product.
kind = VUT_NONE;
743 city_list_remove(
invisible.cities, pcity);
746 pcity->
tile = pcenter;
748 pcity->
owner = powner;
753 ptile, pworked, _index, _x, _y) {
755 if (NULL == worked_tiles) {
756 worked_tiles = tile_list_new();
758 tile_list_append(worked_tiles, pworked);
763 city_has_changed_owner =
TRUE;
772 update_descriptions =
TRUE;
773 }
else if (pcity->
id != city_id) {
774 log_error(
"handle_city_info() city id %d != id %d.",
777 }
else if (ptile != pcenter) {
778 log_error(
"handle_city_info() city tile (%d, %d) != (%d, %d).",
782 name_changed = (0 != strncmp(packet->
name, pcity->
name,
788 trade_route_list_remove(pcity->
routes, proute);
790 trade_routes_changed =
TRUE;
835 "%d citizens not equal %d city size in \"%s\".",
856 need_science_dialog_update =
TRUE;
861 shield_stock_changed =
TRUE;
868 production_changed =
TRUE;
872 if ((city_is_new && VUT_UTYPE == product.
kind)
874 || VUT_UTYPE == product.
kind))
876 || shield_stock_changed) {
877 need_units_dialog_update =
TRUE;
890#ifdef DONE_BY_create_city_virtual
911 log_error(
"handle_city_info() bad changed_from_kind %d.",
913 product.
kind = VUT_NONE;
917 if (!universals_n_is_valid(product.
kind)) {
918 log_error(
"handle_city_info() bad changed_from_value %d.",
920 product.
kind = VUT_NONE;
933 if (have && !city_is_new
937 need_economy_dialog_update |=
947 = (unit_list_size(pcity->
tile->
units) > 0);
956 if (packet->
capital == CAPITAL_PRIMARY) {
975 if (city_is_new && !city_has_changed_owner) {
982 if (update_descriptions) {
989 if (pfocus_unit->homecity == pcity->
id) {
997 if (need_science_dialog_update) {
1002 if (need_units_dialog_update) {
1007 if (need_economy_dialog_update) {
1015 if ((production_changed || shield_stock_changed)
1029 && (trade_routes_changed
1084 if (pcity != NULL) {
1096 struct tile_list *worked_tiles,
1097 bool is_new,
bool popup,
bool investigate)
1099 if (NULL != worked_tiles) {
1105 tile_list_destroy(worked_tiles);
1110 city_list_prepend(powner->
cities, pcity);
1211 if (pcity == NULL) {
1215 proute = trade_route_list_get(pcity->
routes, packet->
index);
1216 if (proute == NULL) {
1220 trade_route_list_append(pcity->
routes, proute);
1242 bool city_has_changed_owner =
FALSE;
1243 bool city_is_new =
FALSE;
1244 bool name_changed =
FALSE;
1245 bool update_descriptions =
FALSE;
1248 struct tile *ptile = NULL;
1249 struct tile_list *worked_tiles = NULL;
1255 city_id = packet->
id16;
1257 city_id = packet->
id32;
1265 if (NULL != pcity) {
1268 if (NULL == ptile) {
1270 city_list_remove(
invisible.cities, pcity);
1273 pcity->
tile = pcenter;
1274 pcity->
owner = powner;
1278 if (wtile->worked == pcity) {
1290 pworked, _index, _x, _y) {
1292 if (NULL == worked_tiles) {
1293 worked_tiles = tile_list_new();
1295 tile_list_append(worked_tiles, pworked);
1301 city_has_changed_owner =
TRUE;
1305 if (NULL == pcity) {
1308 pcity->
id = city_id;
1311 }
else if (pcity->
id != city_id) {
1312 log_error(
"handle_city_short_info() city id %d != id %d.",
1313 pcity->
id, city_id);
1315 }
else if (
city_tile(pcity) != pcenter) {
1316 log_error(
"handle_city_short_info() city tile (%d, %d) != (%d, %d).",
1320 name_changed = (0 != strncmp(packet->
name, pcity->
name,
1325 update_descriptions =
TRUE;
1330 memset(pcity->
feel, 0,
sizeof(pcity->
feel));
1342 update_descriptions =
TRUE;
1351 if (packet->
capital == CAPITAL_PRIMARY) {
1375 if (city_is_new && !city_has_changed_owner) {
1382 if (update_descriptions) {
1413 if (ptask == NULL) {
1414 if (packet->
activity == ACTIVITY_LAST) {
1418 worker_task_list_append(pcity->
task_reqs, ptask);
1421 if (packet->
activity == ACTIVITY_LAST) {
1422 worker_task_list_remove(pcity->
task_reqs, ptask);
1428 if (ptask != NULL) {
1431 if (packet->
tgt >= 0) {
1441 worker_task_list_remove(pcity->
task_reqs, ptask);
1475 turn_gold_difference =
1525 log_error(
"handle_start_phase() illegal phase %d.", phase);
1555 pcity->client.colored =
FALSE;
1670 int minor_version,
int patch_version,
int emerg_version)
1672 if (emerg_version > 0) {
1674 major_version, minor_version, patch_version, emerg_version,
1678 major_version, minor_version, patch_version, version_label);
1690 ||
event != E_BROADCAST_REPORT) {
1800 bool need_menus_update =
FALSE;
1801 bool need_economy_report_update =
FALSE;
1802 bool need_units_report_update =
FALSE;
1803 bool repaint_unit =
FALSE;
1804 bool repaint_city =
FALSE;
1805 struct tile *old_tile = NULL;
1806 bool check_focus =
FALSE;
1837 repaint_unit =
TRUE;
1848 repaint_unit =
TRUE;
1866 && (packet_unit->
activity != ACTIVITY_IDLE
1871 repaint_unit =
TRUE;
1879 && packet_unit->
activity == ACTIVITY_IDLE
1884 check_focus =
FALSE;
1906 need_menus_update =
TRUE;
1933 need_menus_update =
TRUE;
1948 repaint_city =
TRUE;
1952 need_units_report_update =
TRUE;
1958 repaint_unit =
TRUE;
1966 repaint_unit =
TRUE;
1967 repaint_city =
TRUE;
1973 need_menus_update =
TRUE;
1975 need_units_report_update =
TRUE;
1994 if (ccity != NULL) {
1998 (unit_list_size(ccity->
tile->
units) > 0);
2010 repaint_city =
TRUE;
2029 repaint_city =
TRUE;
2037 if (repaint_city || repaint_unit) {
2102 punit = packet_unit;
2114 log_debug(
"New %s %s id %d (%d %d) hc %d %s",
2128 if (aunit->client.transported_by ==
punit->
id) {
2146 need_units_report_update =
TRUE;
2163#ifdef DEBUG_TRANSPORT
2164 log_debug(
"load %s (ID: %d) onto %s (ID: %d)",
2168 log_debug(
"%s (ID: %d) is loaded onto %s (ID: %d)",
2197 if (need_menus_update) {
2202 if (need_economy_report_update) {
2205 if (need_units_report_update) {
2220 int city_id16,
int city_id32)
2225 city_id32 = city_id16;
2231 if (pcity == NULL) {
2232 log_error(
"Investigate city: unknown city id %d!",
2252 int city_id16,
int city_id32)
2277 static int last_serial_num = 0;
2281 log_error(
"Investigate city: unknown city id %d!",
2312 "Supported units list NULL");
2323 "Present units list NULL");
2332 log_error(
"handle_unit_short_info() for own unit.");
2353 const char *ts_to_load;
2381 _(
"Map topology (%s) and tileset (%s) incompatible."),
2406 bool update_aifill_button =
FALSE, update_ai_skill_level =
FALSE;
2407 bool toggle_edit_ui =
FALSE;
2410 update_aifill_button =
TRUE;
2413 update_ai_skill_level =
TRUE;
2417 toggle_edit_ui =
TRUE;
2427 _(
"This scenario may have manually set properties the editor "
2430 _(
"They won't be saved when scenario is saved from the editor."));
2438#define VALIDATE(_count, _maximum, _string) \
2439 if (game.info._count > _maximum) { \
2440 log_error("handle_game_info(): Too many " _string "; using %d of %d", \
2441 _maximum, game.info._count); \
2442 game.info._count = _maximum; \
2461 if (update_aifill_button || update_ai_skill_level) {
2469 if (toggle_edit_ui) {
2552 pconn->playing = NULL;
2575 bool is_new_nation =
FALSE;
2576 bool turn_done_changed =
FALSE;
2577 bool new_player =
FALSE;
2579 struct player *pplayer, *my_player;
2665 bool music_change =
FALSE;
2669 music_change =
TRUE;
2673 music_change =
TRUE;
2700 for (i = 0; i <
B_LAST; i++) {
2707 if (pplayer == my_player) {
2708 if (
is_ai(my_player)) {
2752 if (pplayer == pconn->playing) {
2754 if (pconn->observer) {
2767 if (turn_done_changed) {
2784 if (is_new_nation) {
2818 bool tech_changed =
FALSE;
2819 bool poptechup =
FALSE;
2821 int gained_techs_num = 0, i;
2822 enum tech_state newstate, oldstate;
2836 gained_techs[gained_techs_num++] =
A_FUTURE;
2849 if (newstate != oldstate) {
2850 if (TECH_KNOWN == newstate) {
2851 tech_changed =
TRUE;
2853 gained_techs[gained_techs_num++] = advi;
2855 }
else if (TECH_KNOWN == oldstate) {
2856 tech_changed =
TRUE;
2882 for (i = 0; i < gained_techs_num; i++) {
2903 if (presearch == NULL) {
2904 log_error(
"Received unknown research for clearing: %d.",
id);
2935 bool need_players_dialog_update =
FALSE;
2941 need_players_dialog_update =
TRUE;
2948 && DS_ARMISTICE == packet->
type) {
2969 if (need_players_dialog_update) {
2973 if (need_players_dialog_update
2978 struct tile *tgt_tile = NULL;
2982 struct unit *tgt_unit;
2986 if (tgt_unit != NULL && tgt_unit->
owner == plr1) {
2995 struct city *tgt_city;
2999 if (tgt_city != NULL && tgt_city->
owner == plr1) {
3036 bool preparing_client_state =
FALSE;
3038 log_debug(
"conn_info id%d used%d est%d plr%d obs%d acc%d",
3041 log_debug(
"conn_info \"%s\" \"%s\" \"%s\"",
3047 log_verbose(
"Server removed unknown connection %d", pinfo->
id);
3054 struct player *pplayer = NULL;
3056 if (NULL != pslot) {
3061 log_verbose(
"Server reports new connection %d %s",
3074 log_packet(
"Server reports updated connection %d %s",
3076 if (pplayer != pconn->
playing) {
3086 pconn->
id = pinfo->
id;
3108 preparing_client_state =
TRUE;
3130 if (preparing_client_state) {
3140 const float *ping_time)
3167 log_error(
"Received illegal achievement info %d",
id);
3267 bool known_changed =
FALSE;
3268 bool tile_changed =
FALSE;
3284 tile_changed =
TRUE;
3285 switch (old_known) {
3294 tile_changed =
FALSE;
3295 log_error(
"handle_tile_info() unknown terrain (%d, %d).",
3304 tile_changed =
TRUE;
3307 tile_changed = tile_changed || (
tile_resource(ptile) != presource);
3314 tile_changed =
TRUE;
3318 tile_changed =
TRUE;
3323 tile_changed =
TRUE;
3333 tile_changed =
TRUE;
3349 if (NULL == pwork) {
3353 fc_snprintf(named,
sizeof(named),
"%06u", worked);
3359 city_list_prepend(
invisible.cities, pwork);
3361 log_debug(
"(%d,%d) invisible city %d, %s",
3365 if (NULL != powner &&
city_owner(pwork) != powner) {
3367 pwork->
owner = powner;
3387 if (oldwork && NULL !=
city_tile(oldwork)) {
3410 tile_changed =
TRUE;
3413 if (old_known != packet->
known) {
3414 known_changed =
TRUE;
3423 switch (packet->
known) {
3436 log_error(
"handle_tile_info() invalid known (%d).", packet->
known);
3449 tile_changed =
TRUE;
3455 tile_changed =
TRUE;
3469 unit_list_clear(ptile->
units);
3475 if (packet->
label[0] ==
'\0') {
3476 if (ptile->
label != NULL) {
3478 ptile->
label = NULL;
3479 tile_changed =
TRUE;
3481 }
else if (ptile->
label == NULL || strcmp(packet->
label, ptile->
label)) {
3483 tile_changed =
TRUE;
3486 if (known_changed || tile_changed) {
3504 if (tile_changed || old_known != new_known) {
3572#define VALIDATE(_count, _maximum, _string) \
3573 if (game.control._count > _maximum) { \
3574 log_error("handle_ruleset_control(): Too many " _string \
3575 "; using %d of %d", _maximum, game.control._count); \
3576 game.control._count = _maximum; \
3689 pextra->hiders = extra_type_list_new();
3692 extra_type_list_append(pextra->hiders, phider);
3695 pextra->bridged = extra_type_list_new();
3698 extra_type_list_append(pextra->bridged, pbridged);
3846 bonus = malloc(
sizeof(*bonus));
3853 combat_bonus_list_append(u->
bonuses, bonus);
3861 const char *flagname;
3862 const char *helptxt;
3866 if (p->
name[0] ==
'\0') {
3887 const char *flagname;
3888 const char *helptxt;
3891 "Bad user flag %d.", p->
id);
3893 if (p->
name[0] ==
'\0') {
3917 const int reqs_size,
4026 const char *flagname;
4027 const char *helptxt;
4031 if (p->
name[0] ==
'\0') {
4061 requirement_vector_append(&b->
reqs, p->
reqs[i]);
4080 log_debug(
" build_cost %3d", bdbg->build_cost);
4082 log_debug(
" sabotage %3d", bdbg->sabotage);
4083 if (NULL != bdbg->helptext) {
4116 requirement_vector_append(&pmul->
reqs, p->
reqs[j]);
4136 requirement_vector_append(&gov->
reqs, p->
reqs[j]);
4195 "Mismatched resource %d for terrain \"%s\".",
4242 const char *flagname;
4243 const char *helptxt;
4247 if (p->
name[0] ==
'\0') {
4299 for (i = 0; i < EC_COUNT; i++) {
4301 pextra->
causes |= (1 << i);
4306 for (i = 0; i < ERM_COUNT; i++) {
4312 if (pextra->
causes == 0) {
4315 for (i = 0; i < EC_COUNT; i++) {
4333 if (!cbase && !croad && !cres) {
4338 for (i = 0; i < ERM_COUNT; i++) {
4353 requirement_vector_append(&pextra->
reqs, p->
reqs[i]);
4358 requirement_vector_append(&pextra->
rmreqs, p->
rmreqs[i]);
4393 if (pextra->
eus == EUS_HIDDEN) {
4418 const char *flagname;
4419 const char *helptxt;
4422 "Bad user flag %d.", p->
id);
4424 if (p->
name[0] ==
'\0') {
4504 requirement_vector_append(&pgood->
reqs, p->
reqs[i]);
4525 log_error(
"handle_ruleset_action() the action id %d is out of range.",
4560 log_error(
"handle_ruleset_action_enabler() the action %d "
4597 requirement_vector_append(&auto_perf->
reqs, p->
reqs[i]);
4619 requirement_vector_append(&pdis->
reqs, p->
reqs[i]);
4679 for (i = 0; i < packet->
nsets; i++) {
4700 for (i = 0; i < packet->
ngroups; i++) {
4705 if (pgroup != NULL) {
4747 if (
'\0' != packet->
legend[0]) {
4753 for (i = 0; i < packet->
nsets; i++) {
4757 nation_set_list_append(pnation->
sets, pset);
4759 log_error(
"handle_ruleset_nation() \"%s\" have unknown set %d.",
4764 for (i = 0; i < packet->
ngroups; i++) {
4767 if (NULL != pgroup) {
4768 nation_group_list_append(pnation->
groups, pgroup);
4770 log_error(
"handle_ruleset_nation() \"%s\" have unknown group %d.",
4778 if (i < packet->init_techs_count) {
4785 if (i < packet->init_units_count) {
4793 if (i < packet->init_buildings_count) {
4808 bool nationset_change)
4815 for (i = 0; i < ncount; i++) {
4867 "Bad citystyle %d.",
id);
4871 requirement_vector_append(&cs->
reqs, packet->
reqs[j]);
4893 "Bad music_style %d.",
id);
4898 requirement_vector_append(&pmus->
reqs, packet->
reqs[j]);
4922 if (i < packet->global_init_techs_count) {
4929 if (i < packet->global_init_buildings_count) {
4968 requirement_vector_append(&s->
reqs, p->
reqs[j]);
4986 unit_id32 = unit_id16;
4997 bool other_asking =
FALSE;
5000 if (other->client.asking_city_name) {
5001 other_asking =
TRUE;
5006 if (!other_asking) {
5027 struct unit *pactor;
5042 log_error(
"handle_unit_action_answer() the action %d doesn't exist.",
5066 case ACTION_SPY_BRIBE_UNIT:
5076 log_error(
"Unimplemented: received background unit bribe cost.");
5087 case ACTION_SPY_INCITE_CITY:
5088 case ACTION_SPY_INCITE_CITY_ESC:
5098 log_error(
"Unimplemented: received background city incite cost.");
5109 case ACTION_UPGRADE_UNIT:
5119 log_error(
"Received upgrade unit price but can't forward it.");
5123 log_debug(
"Server didn't respond to query.");
5131 log_error(
"handle_unit_action_answer() invalid action_type (%d).",
5155 attack_action = act_id;
5169 return attack_action;
5282 switch (request_kind) {
5318 log_warn(
"Unknown request_kind %d in reply", request_kind);
5329 struct unit *pactor;
5345 if (pactor == NULL) {
5346 log_debug(
"Bad diplomat %d.", actor_id);
5382 log_error(
"Unimplemented: received background city building list.");
5448 client.last_processed_request_id_seen);
5450 request_id_of_currently_handled_packet);
5461 log_debug(
"finish processing packet %d",
5469 last_processed_request_id_seen);
5494 log_debug(
"outgoing packet={type=%d, size=%d, request_id=%d}",
5562 bool changed =
FALSE;
5565 if (NULL == ptile) {
5566 log_error(
"%s(): invalid tile index %d.", __FUNCTION__, packet->
id);
5604 if (NULL == ptile) {
5605 log_error(
"%s(): invalid tile index %d.", __FUNCTION__, packet->
id);
5611 log_error(
"%s(): no start position at (%d, %d)",
5612 __FUNCTION__,
TILE_XY(ptile));
5645 "Got packet_vote_update for non-existent vote %d!",
5662 "Got a packet_vote_new for already existing "
5683 "Got packet_vote_resolve for non-existent vote %d!",
struct achievement * achievement_by_number(int id)
struct action_auto_perf * action_auto_perf_slot_number(const int num)
bool action_prob_possible(const struct act_prob probability)
void actions_rs_pre_san_gen(void)
void action_enabler_add(struct action_enabler *enabler)
struct action_enabler * action_enabler_new(void)
bool action_id_exists(const action_id act_id)
static struct action * action_by_number(action_id act_id)
#define action_id_requires_details(act_id)
#define action_array_iterate(_act_list_, _act_id_)
#define action_array_iterate_end
#define action_iterate_end
#define action_iterate(_act_)
#define action_id_get_target_kind(act_id)
void agents_unit_changed(struct unit *punit)
void agents_city_remove(struct city *pcity)
void agents_thaw_hint(void)
void agents_tile_remove(struct tile *ptile)
void agents_city_new(struct city *pcity)
void agents_start_turn(void)
void agents_tile_changed(struct tile *ptile)
void agents_unit_new(struct unit *punit)
void agents_unit_remove(struct unit *punit)
void agents_processing_started(void)
void agents_tile_new(struct tile *ptile)
void agents_processing_finished(void)
void agents_new_turn(void)
void agents_city_changed(struct city *pcity)
void agents_game_joined(void)
void agents_freeze_hint(void)
void agents_before_new_turn(void)
void attribute_restore(void)
void audio_restart(const char *soundset_name, const char *musicset_name)
void audio_play_sound(const char *const tag, const char *const alt_tag)
void base_type_init(struct extra_type *pextra, int idx)
struct extra_type * base_extra_get(const struct base_type *pbase)
struct base_type * base_by_number(const Base_type_id id)
bool territory_claiming_base(const struct base_type *pbase)
void dbv_set(struct dbv *pdbv, int bit)
void dbv_clr(struct dbv *pdbv, int bit)
#define BV_SET_VAL(bv, bit, val)
#define BV_ARE_EQUAL(vec1, vec2)
#define BV_ISSET(bv, bit)
bool has_capability(const char *cap, const char *capstr)
const char *const our_capability
void output_window_append(const struct ft_color color, const char *featured_text)
void output_window_printf(const struct ft_color color, const char *format,...)
void citizens_nation_set(struct city *pcity, const struct player_slot *pslot, citizens count)
citizens citizens_count(const struct city *pcity)
void citizens_init(struct city *pcity)
void city_map_radius_sq_set(struct city *pcity, int radius_sq)
void city_name_set(struct city *pcity, const char *new_name)
struct citystyle * city_styles
void city_styles_alloc(int num)
const char * city_name_get(const struct city *pcity)
void city_production_caravan_shields_init(void)
void city_remove_improvement(struct city *pcity, const struct impr_type *pimprove)
void city_size_add(struct city *pcity, int add)
void free_city_map_index(void)
bool city_unhappy(const struct city *pcity)
struct city * create_city_virtual(struct player *pplayer, struct tile *ptile, const char *name)
bool city_happy(const struct city *pcity)
void city_size_set(struct city *pcity, citizens size)
void city_add_improvement(struct city *pcity, const struct impr_type *pimprove)
int city_map_radius_sq_get(const struct city *pcity)
void destroy_city_virtual(struct city *pcity)
void city_rally_point_receive(const struct packet_city_rally_point *packet, struct city *pcity)
#define city_list_iterate(citylist, pcity)
#define city_tile(_pcity_)
static citizens city_size_get(const struct city *pcity)
#define city_tile_iterate_skip_free_worked(_nmap, _radius_sq, _city_tile, _tile, _index, _x, _y)
#define output_type_iterate(output)
#define city_owner(_pcity_)
#define city_tile_iterate_skip_free_worked_end
#define city_list_iterate_end
#define output_type_iterate_end
void generate_citydlg_dimensions(void)
void popup_city_dialog(struct city *pcity)
void refresh_city_dialog(struct city *pcity)
void city_report_dialog_update_city(struct city *pcity)
void city_report_dialog_update(void)
void start_turn_change_wait(void)
bool client_is_global_observer(void)
void client_remove_cli_conn(struct connection *pconn)
bool client_is_observer(void)
void stop_turn_change_wait(void)
void set_server_busy(bool busy)
void user_ended_turn(void)
enum client_states client_state(void)
void set_seconds_to_turndone(double seconds)
bool can_client_issue_orders(void)
bool client_has_player(void)
void set_client_state(enum client_states newstate)
bool can_client_change_view(void)
enum known_type client_tile_get_known(const struct tile *ptile)
void create_event(struct tile *ptile, enum event_type event, const struct ft_color color, const char *format,...)
void client_player_init(struct player *pplayer)
void client_remove_city(struct city *pcity)
void client_player_maps_reset(void)
void client_remove_unit(struct unit *punit)
void unit_focus_set_status(struct player *pplayer)
void handle_event(const char *featured_text, struct tile *ptile, enum event_type event, int turn, int phase, int conn_id)
static void city_changed(int city_id)
void send_client_wants_hack(const char *filename)
bool is_server_running(void)
int get_next_request_id(int old_request_id)
void conn_set_capability(struct connection *pconn, const char *capability)
struct connection * conn_by_number(int id)
#define conn_list_iterate(connlist, pconn)
#define conn_list_iterate_end
void do_move_unit(struct unit *punit, struct unit *target_unit)
bool unit_is_in_focus(const struct unit *punit)
void action_selection_no_longer_in_progress(const int old_actor_id)
struct unit * get_focus_unit_on_tile(const struct tile *ptile)
void action_decision_request(struct unit *actor_unit)
void set_units_in_combat(struct unit *pattacker, struct unit *pdefender)
void clear_hover_state(void)
void unit_focus_set(struct unit *punit)
bool should_ask_server_for_actions(const struct unit *punit)
struct unit_list * get_units_in_focus(void)
void request_do_action(action_id action, int actor_id, int target_id, int sub_tgt, const char *name)
void unit_focus_urgent(struct unit *punit)
void unit_change_battlegroup(struct unit *punit, int battlegroup)
void action_decision_clear_want(const int old_actor_id)
int get_num_units_in_focus(void)
void unit_register_battlegroup(struct unit *punit)
void unit_focus_update(void)
void auto_center_on_focus_unit(void)
void request_new_unit_activity(struct unit *punit, enum unit_activity act)
void action_selection_next_in_focus(const int old_actor_id)
struct unit struct city struct unit * target_unit
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id popup_bribe_dialog
const char const char * headline
struct unit struct city struct unit struct tile * target_tile
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
struct unit struct city * target_city
struct unit struct city struct unit struct tile struct extra_type * target_extra
struct clause_info * clause_info_get(enum clause_type type)
struct disaster_type * disaster_by_number(Disaster_type_id id)
editgui_notify_object_changed
bool editor_is_active(void)
void editor_ruleset_changed(void)
void recv_ruleset_effect(const struct packet_ruleset_effect *packet)
const char * get_event_tag(enum event_type event)
#define MAX_DISASTER_TYPES
#define MAX_NUM_BUILDING_LIST
#define EC_NATURAL_DEFENSIVE
#define EC_NOT_AGGRESSIVE
#define MAX_NUM_UNIT_LIST
#define MAX_ACHIEVEMENT_TYPES
#define MAX_NUM_TECH_LIST
#define IDENTITY_NUMBER_ZERO
const struct ft_color ftc_client
void game_ruleset_init(void)
bool is_player_phase(const struct player *pplayer, int phase)
int current_turn_timeout(void)
void game_ruleset_free(void)
struct unit * game_unit_by_number(int id)
struct city * game_city_by_number(int id)
void init_client_goto(void)
struct ruler_title * government_ruler_title_new(struct government *pgovern, const struct nation_type *pnation, const char *ruler_male_title, const char *ruler_female_title)
struct government * government_by_number(const Government_type_id gov)
struct government * government_of_player(const struct player *pplayer)
void governments_alloc(int num)
Government_type_id government_number(const struct government *pgovern)
int action_selection_target_extra(void)
int action_selection_target_tile(void)
int action_selection_actor_unit(void)
void action_selection_close(void)
int action_selection_target_city(void)
void action_selection_refresh(struct unit *actor_unit, struct city *target_city, struct unit *target_unit, struct tile *target_tile, struct extra_type *target_extra, const struct act_prob *act_probs)
void popup_sabotage_dialog(struct unit *actor, struct city *pcity, const struct action *paction)
int action_selection_target_unit(void)
void popup_incite_dialog(struct unit *actor, struct city *pcity, int cost, const struct action *paction)
bool city_dialog_is_open(struct city *pcity)
void popdown_all_city_dialogs(void)
void refresh_unit_city_dialogs(struct unit *punit)
void server_connect(void)
void close_connection_dialog(void)
void races_update_pickable(bool nationset_change)
void show_tech_gained_dialog(Tech_type_id tech)
void popdown_races_dialog(void)
void popup_connect_msg(const char *headline, const char *message)
bool handmade_scenario_warning(void)
void races_toggles_set_sensitive(void)
void popup_combat_info(int attacker_unit_id, int defender_unit_id, int attacker_hp, int defender_hp, bool make_att_veteran, bool make_def_veteran)
void editgui_notify_object_created(int tag, int id)
void editgui_refresh(void)
static GtkWidget * source
enum gui_type get_gui_type(void)
void update_infra_dialog(void)
void close_intel_dialog(struct player *p)
void update_intel_dialog(struct player *p)
void popup_newcity_dialog(struct unit *punit, const char *suggestname)
void update_info_label(void)
void update_unit_info_label(struct unit_list *punits)
void update_city_descriptions(void)
void update_start_page(void)
void science_report_dialog_popup(bool raise)
void endgame_report_dialog_start(const struct packet_endgame_report *packet)
void science_report_dialog_redraw(void)
void popup_musicset_suggestion_dialog(void)
void popup_soundset_suggestion_dialog(void)
void refresh_spaceship_dialog(struct player *pplayer)
void popup_tileset_suggestion_dialog(void)
void voteinfo_gui_update(void)
void conn_list_dialog_update(void)
void boot_help_texts(void)
void idex_register_unit(struct world *iworld, struct unit *punit)
void idex_unregister_city(struct world *iworld, struct city *pcity)
void idex_register_city(struct world *iworld, struct city *pcity)
struct impr_type * improvement_by_number(const Impr_type_id id)
const char * improvement_rule_name(const struct impr_type *pimprove)
bool is_improvement_visible(const struct impr_type *pimprove)
Impr_type_id improvement_index(const struct impr_type *pimprove)
void improvement_feature_cache_init(void)
Impr_type_id improvement_count(void)
#define improvement_iterate_end
#define improvement_iterate(_p)
#define fc_assert_msg(condition, message,...)
#define fc_assert_ret(condition)
#define log_warn(message,...)
#define log_verbose(message,...)
#define fc_assert(condition)
#define fc_assert_ret_msg(condition, message,...)
#define fc_assert_ret_val(condition, val)
#define fc_assert_action(condition, action)
#define log_debug(message,...)
#define log_normal(message,...)
#define log_error(message,...)
struct startpos * map_startpos_get(const struct tile *ptile)
int startpos_number(const struct startpos *psp)
void map_free(struct civ_map *fmap)
int sq_map_distance(const struct tile *tile0, const struct tile *tile1)
struct startpos * map_startpos_new(struct tile *ptile)
void map_init_topology(struct civ_map *nmap)
void main_map_allocate(void)
struct tile * index_to_tile(const struct civ_map *imap, int mindex)
bool map_startpos_remove(struct tile *ptile)
bool same_pos(const struct tile *tile1, const struct tile *tile2)
bool startpos_unpack(struct startpos *psp, const struct packet_edit_startpos_full *packet)
struct terrain_misc terrain_control
#define whole_map_iterate(_map, _tile)
#define whole_map_iterate_end
void upgrade_canvas_clipboard(void)
void update_turn_done_button_state(void)
struct city * city_workers_display
void put_nuke_mushroom_pixmaps(struct tile *ptile)
void update_map_canvas_visible(void)
bool tile_visible_mapcanvas(struct tile *ptile)
enum topo_comp_lvl tileset_map_topo_compatible(int topology_id, struct tileset *tset, int *tset_topo)
void refresh_city_mapcanvas(struct city *pcity, struct tile *ptile, bool full_refresh, bool write_to_screen)
void center_tile_mapcanvas(const struct tile *ptile)
void link_marks_decrease_turn_counters(void)
void update_city_description(struct city *pcity)
const char * describe_topology(int topo)
void refresh_tile_mapcanvas(struct tile *ptile, bool full_refresh, bool write_to_screen)
void refresh_unit_mapcanvas(struct unit *punit, struct tile *ptile, bool full_refresh, bool write_to_screen)
void decrease_unit_hp_smooth(struct unit *punit0, int hp0, struct unit *punit1, int hp1)
#define fc_calloc(n, esz)
void meswin_clear_older(int turn, int phase)
int utype_unknown_move_cost(const struct unit_type *utype)
void init_move_fragments(void)
Multiplier_type_id multiplier_count(void)
struct multiplier * multiplier_by_number(Multiplier_type_id id)
Multiplier_type_id multiplier_index(const struct multiplier *pmul)
#define multipliers_iterate(_mul_)
#define multipliers_iterate_end
void play_single_track(const char *const tag)
void start_menu_music(const char *const tag, char *const alt_tag)
void start_style_music(void)
static void name_set(struct name_translation *ptrans, const char *domain, const char *vernacular_name)
static void names_set(struct name_translation *ptrans, const char *domain, const char *vernacular_name, const char *rule_name)
const char * nation_rule_name(const struct nation_type *pnation)
int nation_group_index(const struct nation_group *pgroup)
Nation_type_id nation_count(void)
struct nation_group * nation_group_new(const char *name)
struct nation_type * nation_of_unit(const struct unit *punit)
struct nation_set * nation_set_new(const char *set_name, const char *set_rule_name, const char *set_description)
struct nation_type * nation_by_number(const Nation_type_id nation)
int nation_set_index(const struct nation_set *pset)
struct nation_type * nation_of_city(const struct city *pcity)
struct nation_set * nation_set_by_number(int id)
struct nation_group * nation_group_by_number(int id)
struct nation_leader * nation_leader_new(struct nation_type *pnation, const char *name, bool is_male)
void nations_alloc(int num)
const char * nation_legend_translation(const struct nation_type *pnation, const char *legend)
void resend_desired_settable_options(void)
const char * tileset_name_for_topology(int topology_id)
struct client_options gui_options
void calculate_overview_dimensions(void)
void generic_handle_player_attribute_chunk(struct player *pplayer, const struct packet_player_attribute_chunk *chunk)
#define PACKET_STRVEC_EXTRACT(strvec, str)
#define REQEST_PLAYER_INITIATED
@ UNIT_INFO_CITY_SUPPORTED
int dsend_packet_spaceship_place(struct connection *pc, enum spaceship_place_type type, int num)
int send_packet_conn_pong(struct connection *pc)
int dsend_packet_player_change_government(struct connection *pc, Government_type_id government)
int dsend_packet_unit_get_actions(struct connection *pc, int actor_unit_id16, int actor_unit_id32, int target_unit_id16, int target_unit_id32, int target_tile_id, int target_extra_id, int request_kind)
int send_packet_client_info(struct connection *pc, const struct packet_client_info *packet)
void handle_ruleset_game(const struct packet_ruleset_game *packet)
void handle_player_diplstate(const struct packet_player_diplstate *packet)
static action_id auto_attack_act(const struct act_prob *act_probs)
void handle_ruleset_nation_sets(const struct packet_ruleset_nation_sets *packet)
void handle_ruleset_nation(const struct packet_ruleset_nation *packet)
static struct unit * unpackage_short_unit(const struct packet_unit_short_info *packet)
void handle_nuke_tile_info(int tile)
void handle_unknown_research(int id)
void handle_city_sabotage_list(const struct packet_city_sabotage_list *packet)
const action_id auto_attack_blockers[]
void handle_ruleset_government_ruler_title(const struct packet_ruleset_government_ruler_title *packet)
void handle_city_info(const struct packet_city_info *packet)
void handle_end_turn(void)
static struct unit * unpackage_unit(const struct packet_unit_info *packet)
void handle_conn_info(const struct packet_conn_info *pinfo)
void handle_vote_remove(int vote_no)
void handle_page_msg_part(const char *lines)
void handle_unit_combat_info(const struct packet_unit_combat_info *packet)
void handle_ruleset_style(const struct packet_ruleset_style *p)
void handle_vote_update(int vote_no, int yes, int no, int abstain, int num_voters)
void handle_unit_remove(int unit_id16, int unit_id32)
void handle_ruleset_multiplier(const struct packet_ruleset_multiplier *p)
void handle_player_info(const struct packet_player_info *pinfo)
void handle_ruleset_extra(const struct packet_ruleset_extra *p)
void handle_ruleset_action_auto(const struct packet_ruleset_action_auto *p)
static struct @243 invisible
void handle_web_player_info_addition(int playerno, int expected_income)
void handle_ruleset_unit_bonus(const struct packet_ruleset_unit_bonus *p)
void handle_start_phase(int phase)
void start_revolution(void)
void handle_timeout_info(float seconds_to_phasedone, float last_turn_change_time)
void handle_ruleset_terrain_control(const struct packet_ruleset_terrain_control *p)
const action_id auto_attack_actions[]
void handle_play_music(const char *tag)
void handle_edit_object_created(int tag, int id)
void handle_conn_ping(void)
void handle_ruleset_tech_class(const struct packet_ruleset_tech_class *p)
void handle_ruleset_control(const struct packet_ruleset_control *packet)
void handle_end_phase(void)
void handle_server_info(const char *version_label, int major_version, int minor_version, int patch_version, int emerg_version)
void handle_ruleset_nation_groups(const struct packet_ruleset_nation_groups *packet)
void handle_ruleset_effect(const struct packet_ruleset_effect *packet)
void handle_new_year(int year, int fragments, int turn)
void handle_research_info(const struct packet_research_info *packet)
void handle_ruleset_goods(const struct packet_ruleset_goods *p)
void handle_unit_info(const struct packet_unit_info *packet)
void handle_ruleset_city(const struct packet_ruleset_city *packet)
void handle_ruleset_unit_class(const struct packet_ruleset_unit_class *p)
void handle_ruleset_government(const struct packet_ruleset_government *p)
void handle_ruleset_terrain_flag(const struct packet_ruleset_terrain_flag *p)
void handle_connect_msg(const char *message)
#define REQEST_BACKGROUND_REFRESH
void handle_rulesets_ready(void)
void handle_tile_info(const struct packet_tile_info *packet)
void handle_ruleset_action(const struct packet_ruleset_action *p)
static void action_decision_handle(struct unit *punit)
void handle_achievement_info(int id, bool gained, bool first)
void handle_scenario_description(const char *description)
void play_sound_for_event(enum event_type type)
void handle_edit_startpos(const struct packet_edit_startpos *packet)
void handle_processing_finished(void)
void handle_city_remove(int city_id16, int city_id32)
static int unpack_tech_req(const enum tech_req r_num, const int reqs_size, const struct requirement *reqs, struct advance *a, int i)
void handle_city_name_suggestion_info(int unit_id16, int unit_id32, const char *name)
void handle_city_short_info(const struct packet_city_short_info *packet)
void handle_endgame_player(const struct packet_endgame_player *packet)
void handle_ruleset_resource(const struct packet_ruleset_resource *p)
void handle_web_ruleset_unit_addition(int id, bv_actions utype_actions)
void handle_ruleset_tech(const struct packet_ruleset_tech *p)
void handle_team_name_info(int team_id, const char *team_name)
void handle_thaw_client(void)
void handle_calendar_info(const struct packet_calendar_info *pcalendar)
void set_government_choice(struct government *government)
void handle_unit_action_answer(const struct packet_unit_action_answer *packet)
void handle_city_rally_point(const struct packet_city_rally_point *packet)
void handle_ruleset_disaster(const struct packet_ruleset_disaster *p)
static bool handle_unit_packet_common(struct unit *packet_unit)
void handle_ruleset_unit_class_flag(const struct packet_ruleset_unit_class_flag *p)
void handle_server_join_reply(bool you_can_join, const char *message, const char *capability, const char *challenge_file, int conn_id)
void handle_ruleset_summary(const struct packet_ruleset_summary *packet)
void handle_page_msg(const char *caption, const char *headline, enum event_type event, int len, int parts)
void handle_edit_startpos_full(const struct packet_edit_startpos_full *packet)
void handle_conn_ping_info(int connections, const int *conn_id, const float *ping_time)
static bool spaceship_autoplace(struct player *pplayer, struct player_spaceship *ship)
void handle_player_remove(int playerno)
void handle_processing_started(void)
void handle_begin_turn(void)
void handle_endgame_report(const struct packet_endgame_report *packet)
void handle_early_chat_msg(const struct packet_early_chat_msg *packet)
void handle_ruleset_clause(const struct packet_ruleset_clause *p)
void handle_ruleset_road(const struct packet_ruleset_road *p)
void handle_web_city_info_addition(int id16, int id32, int granary_size, int granary_turns)
void handle_unit_actions(const struct packet_unit_actions *packet)
void handle_ruleset_music(const struct packet_ruleset_music *packet)
void handle_ruleset_base(const struct packet_ruleset_base *p)
void notify_about_incoming_packet(struct connection *pc, int packet_type, int size)
void handle_freeze_client(void)
void handle_chat_msg(const struct packet_chat_msg *packet)
static void city_packet_common(struct city *pcity, struct tile *pcenter, struct player *powner, struct tile_list *worked_tiles, bool is_new, bool popup, bool investigate)
void handle_trade_route_info(const struct packet_trade_route_info *packet)
void handle_player_attribute_chunk(const struct packet_player_attribute_chunk *packet)
void handle_vote_new(const struct packet_vote_new *packet)
void handle_set_topology(int topology_id)
static void packhand_init(void)
void handle_scenario_info(const struct packet_scenario_info *packet)
void handle_ruleset_extra_flag(const struct packet_ruleset_extra_flag *p)
void notify_about_outgoing_packet(struct connection *pc, int packet_type, int size, int request_id)
#define VALIDATE(_count, _maximum, _string)
const char forced_tileset_name[]
struct city_list * cities
void handle_ruleset_tech_flag(const struct packet_ruleset_tech_flag *p)
void handle_nation_availability(int ncount, const bool *is_pickable, bool nationset_change)
void handle_spaceship_info(const struct packet_spaceship_info *p)
void handle_investigate_finished(int unit_id16, int unit_id32, int city_id16, int city_id32)
void handle_ruleset_specialist(const struct packet_ruleset_specialist *p)
void handle_unit_short_info(const struct packet_unit_short_info *packet)
void handle_ruleset_unit_flag(const struct packet_ruleset_unit_flag *p)
void handle_city_nationalities(const struct packet_city_nationalities *packet)
void handle_server_shutdown(void)
void handle_ruleset_building(const struct packet_ruleset_building *p)
void handle_map_info(int xsize, int ysize, int topology_id)
static bool update_improvement_from_packet(struct city *pcity, struct impr_type *pimprove, bool have_impr)
void handle_ruleset_unit(const struct packet_ruleset_unit *p)
void handle_ruleset_terrain(const struct packet_ruleset_terrain *p)
static void action_decision_maybe_auto(struct unit *actor_unit, const struct act_prob *act_probs, struct unit *target_unit, struct city *target_city, struct tile *target_tile)
#define REQEST_BACKGROUND_FAST_AUTO_ATTACK
void handle_ruleset_action_enabler(const struct packet_ruleset_action_enabler *p)
void handle_ruleset_achievement(const struct packet_ruleset_achievement *p)
void handle_game_info(const struct packet_game_info *pinfo)
struct player * placeholder
void handle_vote_resolve(int vote_no, bool passed)
static struct @244 page_msg_report
void handle_worker_task(const struct packet_worker_task *packet)
void handle_ruleset_description_part(const struct packet_ruleset_description_part *packet)
void handle_ruleset_trade(const struct packet_ruleset_trade *p)
void handle_investigate_started(int unit_id16, int unit_id32, int city_id16, int city_id32)
void set_client_page(enum client_pages page)
enum client_pages get_client_page(void)
bool player_slot_is_used(const struct player_slot *pslot)
struct unit * player_unit_by_number(const struct player *pplayer, int unit_id)
struct player * player_new(struct player_slot *pslot)
struct player * player_by_number(const int player_id)
struct player_slot * player_slot_by_number(int player_id)
int player_number(const struct player *pplayer)
const char * player_name(const struct player *pplayer)
void player_set_color(struct player *pplayer, const struct rgbcolor *prgbcolor)
int player_index(const struct player *pplayer)
bool player_set_nation(struct player *pplayer, struct nation_type *pnation)
struct player_diplstate * player_diplstate_get(const struct player *plr1, const struct player *plr2)
bool can_player_see_units_in_city(const struct player *pplayer, const struct city *pcity)
struct player * player_slot_get_player(const struct player_slot *pslot)
bool can_player_see_city_internals(const struct player *pplayer, const struct city *pcity)
void player_destroy(struct player *pplayer)
#define players_iterate_end
#define players_iterate(_pplayer)
void players_dialog_update(void)
void multipliers_dialog_update(void)
const struct packet_endgame_player *packet void science_report_dialog_update(void)
void economy_report_dialog_update(void)
void units_report_dialog_update(void)
endgame_report_dialog_player
struct universal universal_by_number(const enum universals_n kind, const int value)
bool are_universals_equal(const struct universal *psource1, const struct universal *psource2)
enum tech_state research_invention_set(struct research *presearch, Tech_type_id tech, enum tech_state value)
struct research * research_by_number(int number)
struct research * research_get(const struct player *pplayer)
void research_update(struct research *presearch)
#define research_players_iterate(_presearch, _pplayer)
#define research_players_iterate_end
void rgbcolor_destroy(struct rgbcolor *prgbcolor)
struct rgbcolor * rgbcolor_new(int r, int g, int b)
void road_integrators_cache_init(void)
struct road_type * road_by_number(Road_type_id id)
void road_type_init(struct extra_type *pextra, int idx)
void script_client_signal_emit(const char *signal_name,...)
static struct connection connections[MAX_NUM_CONNECTIONS]
bool next_spaceship_component(struct player *pplayer, struct player_spaceship *ship, struct spaceship_component *fill)
struct specialist * specialist_by_number(const Specialist_type_id id)
#define specialist_type_iterate_end
#define specialist_type_iterate(sp)
#define DEFAULT_SPECIALIST
#define strvec_iterate(psv, str)
#define strvec_iterate_end
enum achievement_type type
struct name_translation name
struct requirement_vector reqs
enum action_auto_perf_cause cause
action_id alternatives[MAX_NUM_ACTIONS]
struct requirement_vector actor_reqs
struct requirement_vector target_reqs
bool actor_consuming_always
enum action_sub_target_kind sub_target_kind
enum action_result result
char ui_name[MAX_LEN_NAME]
bv_action_sub_results sub_results
enum action_actor_kind actor_kind
enum action_target_kind target_kind
struct requirement_vector research_reqs
struct tech_class * tclass
struct advance * require[AR_SIZE]
struct name_translation name
char graphic_str[MAX_LEN_NAME]
char graphic_alt[MAX_LEN_NAME]
enum base_gui_type gui_type
struct worker_task_list * task_reqs
struct built_status built[B_LAST]
int last_turns_shield_surplus
enum capital_type capital
struct unit_list * info_units_present
bv_city_options city_options
struct unit_list * info_units_supported
struct trade_route_list * routes
struct universal production
struct unit_list * collecting_info_units_supported
int unhappy_penalty[O_LAST]
unsigned char first_citizen_index
int before_change_shields
struct unit_list * collecting_info_units_present
citizens feel[CITIZEN_LAST][FEELING_LAST]
citizens specialists[SP_MAX]
struct universal changed_from
struct unit_list * units_supported
struct city::@17::@20 client
struct requirement_vector reqs
char citizens_graphic[MAX_LEN_NAME]
char graphic_alt[MAX_LEN_NAME]
struct name_translation name
char graphic[MAX_LEN_NAME]
struct civ_game::@29 rgame
struct rgbcolor * plr_bg_color
struct packet_scenario_description scenario_desc
struct packet_ruleset_control control
struct conn_list * est_connections
int global_init_techs[MAX_NUM_TECH_LIST]
struct packet_game_info info
struct civ_game::@30::@33 client
int global_init_buildings[MAX_NUM_BUILDING_LIST]
struct packet_scenario_info scenario
char * ruleset_description
struct conn_list * all_connections
struct packet_timeout_info tinfo
struct veteran_system * veteran
struct packet_calendar_info calendar
struct government * default_government
struct government * government_during_revolution
struct requirement_vector receiver_reqs
struct requirement_vector giver_reqs
bool sound_bell_at_new_turn
bool autoaccept_tileset_suggestion
bool autoaccept_musicset_suggestion
bool draw_city_productions
bool draw_city_trade_routes
bool autoaccept_soundset_suggestion
int smooth_combat_step_msec
bool auto_center_on_combat
bool popup_attack_actions
enum unit_type_flag_id flag
enum combat_bonus_type type
struct connection::@57::@62 client
int request_id_of_currently_handled_packet
enum cmdlevel access_level
char username[MAX_LEN_NAME]
struct socket_packet_buffer * send_buffer
char capability[MAX_LEN_CAPSTR]
int last_processed_request_id_seen
struct socket_packet_buffer * buffer
struct name_translation name
struct requirement_vector reqs
bv_disaster_effects effects
struct requirement_vector reqs
struct name_translation name
struct requirement_vector reqs
char graphic_alt[MAX_LEN_NAME]
Government_type_id item_number
struct name_translation name
char graphic_str[MAX_LEN_NAME]
char graphic_str[MAX_LEN_NAME]
char graphic_alt[MAX_LEN_NAME]
struct requirement_vector obsolete_by
char soundtag_alt[MAX_LEN_NAME]
struct requirement_vector reqs
struct name_translation name
char soundtag[MAX_LEN_NAME]
struct requirement_vector reqs
struct name_translation name
struct requirement_vector reqs
char music_peaceful[MAX_LEN_NAME]
char music_combat[MAX_LEN_NAME]
struct name_translation name
int init_buildings[MAX_NUM_BUILDING_LIST]
struct nation_group_list * groups
struct name_translation noun_plural
struct nation_set_list * sets
char flag_graphic_str[MAX_LEN_NAME]
struct name_translation adjective
struct nation_type::@50::@53 client
char flag_graphic_alt[MAX_LEN_NAME]
struct government * init_government
struct unit_type * init_units[MAX_NUM_UNIT_LIST]
enum barbarian_type barb_type
char * translation_domain
struct nation_style * style
int init_techs[MAX_NUM_TECH_LIST]
char message[MAX_LEN_MSG]
int last_turns_shield_surplus
int before_change_shields
int ppl_content[FEELING_LAST]
bv_city_options city_options
enum capital_type capital
int ppl_unhappy[FEELING_LAST]
int ppl_angry[FEELING_LAST]
char name[MAX_LEN_CITYNAME]
int ppl_happy[FEELING_LAST]
bool diplomat_investigate
int unhappy_penalty[O_LAST]
int nation_id[MAX_CITY_NATIONALITIES]
int nation_citizens[MAX_CITY_NATIONALITIES]
enum capital_type capital
char name[MAX_LEN_CITYNAME]
char distribution[MAX_LEN_NAME]
char capability[MAX_LEN_CAPSTR]
char username[MAX_LEN_NAME]
enum cmdlevel access_level
char message[MAX_LEN_MSG]
Government_type_id government_during_revolution_id
enum ai_level skill_level
enum phase_mode_type phase_mode
enum victory_condition_type victory_conditions
Government_type_id default_government_id
enum ai_level ai_skill_level
int multiplier[MAX_NUM_MULTIPLIERS]
char username[MAX_LEN_NAME]
bv_player gives_shared_vision
int love[MAX_NUM_PLAYER_SLOTS]
Government_type_id target_government
int multiplier_target[MAX_NUM_MULTIPLIERS]
bool real_embassy[MAX_NUM_PLAYER_SLOTS]
int multiplier_changed[MAX_NUM_MULTIPLIERS]
enum barbarian_type barbarian_type
Government_type_id government
char inventions[A_LAST+1]
char rule_name[MAX_LEN_NAME]
enum achievement_type type
action_id alternatives[MAX_NUM_ACTIONS]
struct requirement reqs[MAX_NUM_REQS]
enum action_auto_perf_cause cause
struct requirement actor_reqs[MAX_NUM_REQS]
struct requirement target_reqs[MAX_NUM_REQS]
enum action_sub_target_kind sub_tgt_kind
enum action_actor_kind act_kind
bool actor_consuming_always
bv_action_sub_results sub_results
char ui_name[MAX_LEN_NAME]
enum action_target_kind tgt_kind
enum action_result result
enum base_gui_type gui_type
char helptext[MAX_LEN_PACKET]
struct requirement obs_reqs[MAX_NUM_REQS]
char soundtag_alt[MAX_LEN_NAME]
struct requirement reqs[MAX_NUM_REQS]
char soundtag[MAX_LEN_NAME]
char rule_name[MAX_LEN_NAME]
char graphic_str[MAX_LEN_NAME]
char graphic_alt[MAX_LEN_NAME]
char citizens_graphic[MAX_LEN_NAME]
char rule_name[MAX_LEN_NAME]
char graphic_alt[MAX_LEN_NAME]
char graphic[MAX_LEN_NAME]
struct requirement reqs[MAX_NUM_REQS]
struct requirement receiver_reqs[MAX_NUM_REQS]
struct requirement giver_reqs[MAX_NUM_REQS]
char preferred_soundset[MAX_LEN_NAME]
char preferred_tileset[MAX_LEN_NAME]
int num_achievement_types
char preferred_musicset[MAX_LEN_NAME]
char text[MAX_LEN_CONTENT]
char rule_name[MAX_LEN_NAME]
struct requirement reqs[MAX_NUM_REQS]
bv_disaster_effects effects
int work_raise_chance[MAX_VET_LEVELS]
int base_raise_chance[MAX_VET_LEVELS]
int global_init_techs[MAX_NUM_TECH_LIST]
int move_bonus[MAX_VET_LEVELS]
char veteran_name[MAX_VET_LEVELS][MAX_LEN_NAME]
Impr_type_id global_init_buildings[MAX_NUM_BUILDING_LIST]
int power_fact[MAX_VET_LEVELS]
char helptext[MAX_LEN_PACKET]
char rule_name[MAX_LEN_NAME]
struct requirement reqs[MAX_NUM_REQS]
char female_title[MAX_LEN_NAME]
char male_title[MAX_LEN_NAME]
char graphic_alt[MAX_LEN_NAME]
char rule_name[MAX_LEN_NAME]
char graphic_str[MAX_LEN_NAME]
struct requirement reqs[MAX_NUM_REQS]
char helptext[MAX_LEN_PACKET]
struct requirement reqs[MAX_NUM_REQS]
char rule_name[MAX_LEN_NAME]
char helptext[MAX_LEN_PACKET]
char music_combat[MAX_LEN_NAME]
struct requirement reqs[MAX_NUM_REQS]
char music_peaceful[MAX_LEN_NAME]
char groups[MAX_NUM_NATION_GROUPS][MAX_LEN_NAME]
bool hidden[MAX_NUM_NATION_GROUPS]
char rule_names[MAX_NUM_NATION_SETS][MAX_LEN_NAME]
char names[MAX_NUM_NATION_SETS][MAX_LEN_NAME]
char descriptions[MAX_NUM_NATION_SETS][MAX_LEN_MSG]
int init_techs[MAX_NUM_TECH_LIST]
char leader_name[MAX_NUM_LEADERS][MAX_LEN_NAME]
char noun_plural[MAX_LEN_NAME]
char adjective[MAX_LEN_NAME]
Impr_type_id init_buildings[MAX_NUM_BUILDING_LIST]
Unit_type_id init_units[MAX_NUM_UNIT_LIST]
bool leader_is_male[MAX_NUM_LEADERS]
char translation_domain[MAX_LEN_NAME]
char graphic_str[MAX_LEN_NAME]
Government_type_id init_government_id
int groups[MAX_NUM_NATION_GROUPS]
enum barbarian_type barbarian_type
int sets[MAX_NUM_NATION_SETS]
char graphic_alt[MAX_LEN_NAME]
char rule_name[MAX_LEN_NAME]
int tile_incr_const[O_LAST]
enum road_gui_type gui_type
enum road_move_mode move_mode
struct requirement first_reqs[MAX_NUM_REQS]
char rule_name[MAX_LEN_NAME]
char graphic_alt[MAX_LEN_NAME]
struct requirement reqs[MAX_NUM_REQS]
char helptext[MAX_LEN_PACKET]
char short_name[MAX_LEN_NAME]
char graphic_str[MAX_LEN_NAME]
char plural_name[MAX_LEN_NAME]
char rule_name[MAX_LEN_NAME]
char text[MAX_LEN_CONTENT]
char rule_name[MAX_LEN_NAME]
char helptxt[MAX_LEN_PACKET]
struct requirement research_reqs[MAX_NUM_REQS]
char graphic_str[MAX_LEN_NAME]
char rule_name[MAX_LEN_NAME]
char graphic_alt[MAX_LEN_NAME]
char helptext[MAX_LEN_PACKET]
char helptxt[MAX_LEN_PACKET]
Terrain_type_id transform_result
char helptext[MAX_LEN_PACKET]
Resource_type_id resources[MAX_RESOURCE_TYPES]
char graphic_str[MAX_LEN_NAME]
bv_unit_classes native_to
Terrain_type_id cultivate_result
Terrain_type_id plant_result
int road_output_incr_pct[O_LAST]
char graphic_alt[MAX_LEN_NAME]
char rule_name[MAX_LEN_NAME]
enum trade_route_illegal_cancelling cancelling
enum trade_route_bonus_type bonus_type
enum combat_bonus_type type
enum unit_type_flag_id flag
char helptxt[MAX_LEN_PACKET]
char rule_name[MAX_LEN_NAME]
bv_unit_class_flags flags
char helptext[MAX_LEN_PACKET]
char helptxt[MAX_LEN_PACKET]
char graphic_alt[MAX_LEN_NAME]
enum transp_def_type tp_defense
char rule_name[MAX_LEN_NAME]
int power_fact[MAX_VET_LEVELS]
char graphic_str[MAX_LEN_NAME]
char sound_fight_alt[MAX_LEN_NAME]
bv_unit_classes disembarks
char sound_move_alt[MAX_LEN_NAME]
struct requirement build_reqs[MAX_NUM_REQS]
int base_raise_chance[MAX_VET_LEVELS]
int work_raise_chance[MAX_VET_LEVELS]
char sound_fight[MAX_LEN_NAME]
char veteran_name[MAX_VET_LEVELS][MAX_LEN_NAME]
char sound_move[MAX_LEN_NAME]
char helptext[MAX_LEN_PACKET]
int move_bonus[MAX_VET_LEVELS]
char description[MAX_LEN_CONTENT]
bool allow_ai_type_fallback
char authors[MAX_LEN_PACKET/3]
bv_spaceship_structure structure
Resource_type_id resource
char label[MAX_LEN_MAP_LABEL]
char spec_sprite[MAX_LEN_NAME]
float last_turn_change_time
enum route_direction direction
struct act_prob action_probabilities[MAX_NUM_ACTIONS]
enum action_decision action_decision_want
struct unit_order orders[MAX_LEN_ROUTE]
enum unit_activity activity
enum unit_activity changed_from
enum server_side_agent ssa_controller
enum unit_activity activity
enum ai_level skill_level
enum barbarian_type barbarian_type
int love[MAX_NUM_PLAYER_SLOTS]
char has_reason_to_cancel
bv_spaceship_structure structure
enum spaceship_state state
struct city_list * cities
struct player_ai ai_common
struct dbv tile_vision[V_COUNT]
struct government * target_government
char username[MAX_LEN_NAME]
struct player::@69::@72 client
struct government * government
struct conn_list * connections
struct player_economic economic
struct player_spaceship spaceship
bv_player gives_shared_vision
struct player_score score
struct multiplier_value multipliers[MAX_NUM_MULTIPLIERS]
struct nation_style * style
struct research::@75::@77 client
enum road_gui_type gui_type
struct requirement_vector first_reqs
enum road_move_mode move_mode
int tile_incr_const[O_LAST]
enum spaceship_place_type type
struct requirement_vector reqs
char graphic_alt[MAX_LEN_NAME]
char graphic_str[MAX_LEN_NAME]
struct name_translation name
struct name_translation abbreviation
struct name_translation name
struct terrain * cultivate_result
struct extra_type ** resources
bv_unit_classes native_to
struct name_translation name
struct terrain * plant_result
const struct unit_type * animal
char graphic_alt[MAX_LEN_NAME]
char graphic_str[MAX_LEN_NAME]
enum terrain_class tclass
int road_output_incr_pct[O_LAST]
struct terrain * transform_result
struct player * extras_owner
struct extra_type * placing
enum trade_route_bonus_type bonus_type
enum trade_route_illegal_cancelling cancelling
struct goods_type * goods
struct name_translation name
bv_unit_class_flags flags
struct unit_type::@87 adv
struct unit_class * uclass
struct requirement_vector build_reqs
char graphic_alt[MAX_LEN_NAME]
char sound_move_alt[MAX_LEN_NAME]
struct veteran_system * veteran
const struct unit_type * obsoleted_by
struct advance * require_advance
char graphic_str[MAX_LEN_NAME]
char sound_move[MAX_LEN_NAME]
char sound_fight_alt[MAX_LEN_NAME]
struct name_translation name
enum transp_def_type tp_defense
bv_unit_classes disembarks
const struct unit_type * converted_to
char sound_fight[MAX_LEN_NAME]
struct combat_bonus_list * bonuses
enum action_decision action_decision_want
enum unit_activity activity
struct unit::@80::@82 client
struct extra_type * changed_from_target
struct extra_type * activity_target
enum unit_activity changed_from
struct player * nationality
struct goods_type * carrying
struct tile * action_decision_tile
const struct unit_type * utype
enum unit_focus_status focus_status
enum server_side_agent ssa_controller
struct nation_style * style_by_number(int id)
void styles_alloc(int count)
struct music_style * music_style_by_number(int id)
void music_styles_alloc(int count)
int fc_snprintf(char *str, size_t n, const char *format,...)
size_t fc_strlcpy(char *dest, const char *src, size_t n)
size_t fc_strlcat(char *dest, const char *src, size_t n)
#define sz_strlcpy(dest, src)
struct team_slot * team_slot_by_number(int team_id)
bool team_add_player(struct player *pplayer, struct team *pteam)
struct team * team_new(struct team_slot *tslot)
void team_slot_set_defined_name(struct team_slot *tslot, const char *team_name)
struct advance * advance_by_number(const Tech_type_id atype)
void set_user_tech_flag_name(enum tech_flag_id id, const char *name, const char *helptxt)
struct tech_class * tech_class_by_number(const int idx)
Tech_type_id advance_number(const struct advance *padvance)
#define advance_index_iterate_end
static Tech_type_id advance_count(void)
#define advance_index_iterate(_start, _index)
Terrain_type_id terrain_count(void)
struct terrain * terrain_by_number(const Terrain_type_id type)
const char * terrain_rule_name(const struct terrain *pterrain)
struct resource_type * resource_type_init(struct extra_type *pextra)
void set_user_terrain_flag_name(enum terrain_flag_id id, const char *name, const char *helptxt)
#define MAX_RESOURCE_TYPES
void tile_set_terrain(struct tile *ptile, struct terrain *pterrain)
void tile_set_owner(struct tile *ptile, struct player *pplayer, struct tile *claimer)
bool tile_set_label(struct tile *ptile, const char *label)
void tile_set_resource(struct tile *ptile, struct extra_type *presource)
struct city * tile_city(const struct tile *ptile)
void tile_set_worked(struct tile *ptile, struct city *pcity)
#define tile_worked(_tile)
#define tile_resource(_tile)
#define tile_list_iterate(tile_list, ptile)
#define tile_terrain(_tile)
#define tile_list_iterate_end
#define tile_owner(_tile)
void tileset_setup_unit_type(struct tileset *t, struct unit_type *ut)
void tileset_setup_government(struct tileset *t, struct government *gov)
void tileset_setup_specialist_type(struct tileset *t, Specialist_type_id id)
void tileset_setup_tile_type(struct tileset *t, const struct terrain *pterrain)
void tileset_player_init(struct tileset *t, struct player *pplayer)
bool unit_drawn_with_city_outline(const struct unit *punit, bool check_focus)
void tileset_setup_impr_type(struct tileset *t, struct impr_type *pimprove)
void tileset_background_init(struct tileset *t)
void tileset_setup_tech_type(struct tileset *t, struct advance *padvance)
void tileset_setup_city_tiles(struct tileset *t, int style)
void tilespec_reread_frozen_refresh(const char *tname)
void tileset_setup_extra(struct tileset *t, struct extra_type *pextra)
const char * tileset_basename(const struct tileset *t)
void finish_loading_sprites(struct tileset *t)
const char * tileset_name_get(struct tileset *t)
void tileset_error(enum log_level level, const char *tset_name, const char *format,...)
bool tilespec_reread(const char *new_tileset_name, bool game_fully_initialized, float scale)
void tileset_setup_nation_flag(struct tileset *t, struct nation_type *nation)
void tileset_ruleset_reset(struct tileset *t)
#define MAX_NUM_CITIZEN_SPRITES
int city_num_trade_routes(const struct city *pcity)
struct trade_route_settings * trade_route_settings_by_type(enum trade_route_type type)
struct goods_type * goods_by_number(Goods_type_id id)
bool unit_transport_load(struct unit *pcargo, struct unit *ptrans, bool force)
struct unit * unit_transport_get(const struct unit *pcargo)
bool unit_transport_unload(struct unit *pcargo)
struct unit * unit_virtual_create(struct player *pplayer, struct city *pcity, const struct unit_type *punittype, int veteran_level)
void unit_virtual_destroy(struct unit *punit)
void unit_tile_set(struct unit *punit, struct tile *ptile)
bool unit_transported(const struct unit *pcargo)
struct unit_list * unit_transport_cargo(const struct unit *ptrans)
#define unit_list_iterate(unitlist, punit)
#define unit_list_iterate_end
void set_unit_class_caches(struct unit_class *pclass)
const struct unit_type * unit_type_get(const struct unit *punit)
const char * unit_name_translation(const struct unit *punit)
const char * unit_rule_name(const struct unit *punit)
void set_unit_move_type(struct unit_class *puclass)
void set_unit_type_caches(struct unit_type *ptype)
struct unit_class * uclass_by_number(const Unit_Class_id id)
void veteran_system_definition(struct veteran_system *vsystem, int level, const char *vlist_name, int vlist_power, int vlist_move, int vlist_raise, int vlist_wraise)
struct unit_type * utype_by_number(const Unit_type_id id)
void unit_type_action_cache_set(struct unit_type *ptype)
void set_user_unit_class_flag_name(enum unit_class_flag_id id, const char *name, const char *helptxt)
struct veteran_system * veteran_system_new(int count)
bool utype_can_do_action(const struct unit_type *putype, const action_id act_id)
void set_user_unit_type_flag_name(enum unit_type_flag_id id, const char *name, const char *helptxt)
#define UCF_LAST_USER_FLAG
#define unit_class_iterate(_p)
#define UTYF_LAST_USER_FLAG
#define unit_type_iterate(_p)
#define unit_class_iterate_end
#define unit_type_iterate_end
void update_queue_processing_finished(int request_id)
void update_queue_processing_started(int request_id)
void unit_select_dialog_update(void)
#define vision_layer_iterate(v)
#define vision_layer_iterate_end
void voteinfo_queue_delayed_remove(int vote_no)
struct voteinfo * voteinfo_queue_find(int vote_no)
void voteinfo_queue_add(int vote_no, const char *user, const char *desc, int percent_required, int flags)
bool worker_task_is_sane(struct worker_task *ptask)
#define worker_task_list_iterate(tasklist, ptask)
#define worker_task_list_iterate_end
void worklist_copy(struct worklist *dst, const struct worklist *src)
void worklist_init(struct worklist *pwl)