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;
758 ptile, pworked, _index, _x, _y) {
760 if (NULL == worked_tiles) {
761 worked_tiles = tile_list_new();
763 tile_list_append(worked_tiles, pworked);
768 city_has_changed_owner =
TRUE;
777 update_descriptions =
TRUE;
778 }
else if (pcity->
id != city_id) {
779 log_error(
"handle_city_info() city id %d != id %d.",
782 }
else if (ptile != pcenter) {
783 log_error(
"handle_city_info() city tile (%d, %d) != (%d, %d).",
787 name_changed = (0 != strncmp(packet->
name, pcity->
name,
793 trade_route_list_remove(pcity->
routes, proute);
795 trade_routes_changed =
TRUE;
834 "%d citizens not equal %d city size in \"%s\".",
855 need_science_dialog_update =
TRUE;
860 shield_stock_changed =
TRUE;
867 production_changed =
TRUE;
871 if ((city_is_new && VUT_UTYPE == product.
kind)
873 || VUT_UTYPE == product.
kind))
875 || shield_stock_changed) {
876 need_units_dialog_update =
TRUE;
889#ifdef DONE_BY_create_city_virtual
910 log_error(
"handle_city_info() bad changed_from_kind %d.",
912 product.
kind = VUT_NONE;
916 if (!universals_n_is_valid(product.
kind)) {
917 log_error(
"handle_city_info() bad changed_from_value %d.",
919 product.
kind = VUT_NONE;
932 if (have && !city_is_new
936 need_economy_dialog_update |=
946 = (unit_list_size(pcity->
tile->
units) > 0);
955 if (packet->
capital == CAPITAL_PRIMARY) {
974 if (city_is_new && !city_has_changed_owner) {
981 if (update_descriptions) {
988 if (pfocus_unit->homecity == pcity->
id) {
996 if (need_science_dialog_update) {
1001 if (need_units_dialog_update) {
1006 if (need_economy_dialog_update) {
1014 if ((production_changed || shield_stock_changed)
1028 && (trade_routes_changed
1083 if (pcity != NULL) {
1095 struct tile_list *worked_tiles,
1096 bool is_new,
bool popup,
bool investigate)
1098 if (NULL != worked_tiles) {
1104 tile_list_destroy(worked_tiles);
1109 city_list_prepend(powner->
cities, pcity);
1210 if (pcity == NULL) {
1214 proute = trade_route_list_get(pcity->
routes, packet->
index);
1215 if (proute == NULL) {
1219 trade_route_list_append(pcity->
routes, proute);
1241 bool city_has_changed_owner =
FALSE;
1242 bool city_is_new =
FALSE;
1243 bool name_changed =
FALSE;
1244 bool update_descriptions =
FALSE;
1247 struct tile *ptile = NULL;
1248 struct tile_list *worked_tiles = NULL;
1254 city_id = packet->
id16;
1256 city_id = packet->
id32;
1264 if (NULL != pcity) {
1267 if (NULL == ptile) {
1269 city_list_remove(
invisible.cities, pcity);
1272 pcity->
tile = pcenter;
1273 pcity->
owner = powner;
1277 if (wtile->worked == pcity) {
1289 pworked, _index, _x, _y) {
1291 if (NULL == worked_tiles) {
1292 worked_tiles = tile_list_new();
1294 tile_list_append(worked_tiles, pworked);
1300 city_has_changed_owner =
TRUE;
1304 if (NULL == pcity) {
1307 pcity->
id = city_id;
1310 }
else if (pcity->
id != city_id) {
1311 log_error(
"handle_city_short_info() city id %d != id %d.",
1312 pcity->
id, city_id);
1314 }
else if (
city_tile(pcity) != pcenter) {
1315 log_error(
"handle_city_short_info() city tile (%d, %d) != (%d, %d).",
1319 name_changed = (0 != strncmp(packet->
name, pcity->
name,
1324 update_descriptions =
TRUE;
1329 memset(pcity->
feel, 0,
sizeof(pcity->
feel));
1341 update_descriptions =
TRUE;
1350 if (packet->
capital == CAPITAL_PRIMARY) {
1374 if (city_is_new && !city_has_changed_owner) {
1381 if (update_descriptions) {
1412 if (ptask == NULL) {
1413 if (packet->
activity == ACTIVITY_LAST) {
1417 worker_task_list_append(pcity->
task_reqs, ptask);
1420 if (packet->
activity == ACTIVITY_LAST) {
1421 worker_task_list_remove(pcity->
task_reqs, ptask);
1427 if (ptask != NULL) {
1430 if (packet->
tgt >= 0) {
1440 worker_task_list_remove(pcity->
task_reqs, ptask);
1474 turn_gold_difference =
1524 log_error(
"handle_start_phase() illegal phase %d.", phase);
1554 pcity->client.colored =
FALSE;
1669 int minor_version,
int patch_version,
int emerg_version)
1671 if (emerg_version > 0) {
1673 major_version, minor_version, patch_version, emerg_version,
1677 major_version, minor_version, patch_version, version_label);
1689 ||
event != E_BROADCAST_REPORT) {
1799 bool need_menus_update =
FALSE;
1800 bool need_economy_report_update =
FALSE;
1801 bool need_units_report_update =
FALSE;
1802 bool repaint_unit =
FALSE;
1803 bool repaint_city =
FALSE;
1804 struct tile *old_tile = NULL;
1805 bool check_focus =
FALSE;
1836 repaint_unit =
TRUE;
1847 repaint_unit =
TRUE;
1865 && (packet_unit->
activity != ACTIVITY_IDLE
1870 repaint_unit =
TRUE;
1878 && packet_unit->
activity == ACTIVITY_IDLE
1883 check_focus =
FALSE;
1905 need_menus_update =
TRUE;
1932 need_menus_update =
TRUE;
1947 repaint_city =
TRUE;
1951 need_units_report_update =
TRUE;
1957 repaint_unit =
TRUE;
1965 repaint_unit =
TRUE;
1966 repaint_city =
TRUE;
1972 need_menus_update =
TRUE;
1974 need_units_report_update =
TRUE;
1993 if (ccity != NULL) {
1997 (unit_list_size(ccity->
tile->
units) > 0);
2009 repaint_city =
TRUE;
2028 repaint_city =
TRUE;
2036 if (repaint_city || repaint_unit) {
2101 punit = packet_unit;
2113 log_debug(
"New %s %s id %d (%d %d) hc %d %s",
2127 if (aunit->client.transported_by ==
punit->
id) {
2145 need_units_report_update =
TRUE;
2162#ifdef DEBUG_TRANSPORT
2163 log_debug(
"load %s (ID: %d) onto %s (ID: %d)",
2167 log_debug(
"%s (ID: %d) is loaded onto %s (ID: %d)",
2196 if (need_menus_update) {
2201 if (need_economy_report_update) {
2204 if (need_units_report_update) {
2219 int city_id16,
int city_id32)
2224 city_id32 = city_id16;
2230 if (pcity == NULL) {
2231 log_error(
"Investigate city: unknown city id %d!",
2251 int city_id16,
int city_id32)
2276 static int last_serial_num = 0;
2280 log_error(
"Investigate city: unknown city id %d!",
2311 "Supported units list NULL");
2322 "Present units list NULL");
2331 log_error(
"handle_unit_short_info() for own unit.");
2352 const char *ts_to_load;
2356 if (ts_to_load != NULL && ts_to_load[0] !=
'\0') {
2380 _(
"Map topology (%s) and tileset (%s) incompatible."),
2405 bool update_aifill_button =
FALSE, update_ai_skill_level =
FALSE;
2406 bool toggle_edit_ui =
FALSE;
2409 update_aifill_button =
TRUE;
2412 update_ai_skill_level =
TRUE;
2416 toggle_edit_ui =
TRUE;
2426 _(
"This scenario may have manually set properties the editor "
2429 _(
"They won't be saved when scenario is saved from the editor."));
2437#define VALIDATE(_count, _maximum, _string) \
2438 if (game.info._count > _maximum) { \
2439 log_error("handle_game_info(): Too many " _string "; using %d of %d", \
2440 _maximum, game.info._count); \
2441 game.info._count = _maximum; \
2460 if (update_aifill_button || update_ai_skill_level) {
2468 if (toggle_edit_ui) {
2551 pconn->playing = NULL;
2574 bool is_new_nation =
FALSE;
2575 bool turn_done_changed =
FALSE;
2576 bool new_player =
FALSE;
2578 struct player *pplayer, *my_player;
2664 bool music_change =
FALSE;
2668 music_change =
TRUE;
2672 music_change =
TRUE;
2699 for (i = 0; i <
B_LAST; i++) {
2706 if (pplayer == my_player) {
2707 if (
is_ai(my_player)) {
2751 if (pplayer == pconn->playing) {
2753 if (pconn->observer) {
2766 if (turn_done_changed) {
2783 if (is_new_nation) {
2817 bool tech_changed =
FALSE;
2818 bool poptechup =
FALSE;
2820 int gained_techs_num = 0, i;
2821 enum tech_state newstate, oldstate;
2835 gained_techs[gained_techs_num++] =
A_FUTURE;
2848 if (newstate != oldstate) {
2849 if (TECH_KNOWN == newstate) {
2850 tech_changed =
TRUE;
2852 gained_techs[gained_techs_num++] = advi;
2854 }
else if (TECH_KNOWN == oldstate) {
2855 tech_changed =
TRUE;
2881 for (i = 0; i < gained_techs_num; i++) {
2902 if (presearch == NULL) {
2903 log_error(
"Received unknown research for clearing: %d.",
id);
2934 bool need_players_dialog_update =
FALSE;
2940 need_players_dialog_update =
TRUE;
2947 && DS_ARMISTICE == packet->
type) {
2968 if (need_players_dialog_update) {
2972 if (need_players_dialog_update
2977 struct tile *tgt_tile = NULL;
2981 struct unit *tgt_unit;
2985 if (tgt_unit != NULL && tgt_unit->
owner == plr1) {
2994 struct city *tgt_city;
2998 if (tgt_city != NULL && tgt_city->
owner == plr1) {
3035 bool preparing_client_state =
FALSE;
3037 log_debug(
"conn_info id%d used%d est%d plr%d obs%d acc%d",
3040 log_debug(
"conn_info \"%s\" \"%s\" \"%s\"",
3046 log_verbose(
"Server removed unknown connection %d", pinfo->
id);
3053 struct player *pplayer = NULL;
3055 if (NULL != pslot) {
3060 log_verbose(
"Server reports new connection %d %s",
3073 log_packet(
"Server reports updated connection %d %s",
3075 if (pplayer != pconn->
playing) {
3085 pconn->
id = pinfo->
id;
3107 preparing_client_state =
TRUE;
3129 if (preparing_client_state) {
3139 const float *ping_time)
3166 log_error(
"Received illegal achievement info %d",
id);
3266 bool known_changed =
FALSE;
3267 bool tile_changed =
FALSE;
3283 tile_changed =
TRUE;
3284 switch (old_known) {
3293 tile_changed =
FALSE;
3294 log_error(
"handle_tile_info() unknown terrain (%d, %d).",
3303 tile_changed =
TRUE;
3306 tile_changed = tile_changed || (
tile_resource(ptile) != presource);
3313 tile_changed =
TRUE;
3317 tile_changed =
TRUE;
3322 tile_changed =
TRUE;
3332 tile_changed =
TRUE;
3348 if (NULL == pwork) {
3352 fc_snprintf(named,
sizeof(named),
"%06u", worked);
3358 city_list_prepend(
invisible.cities, pwork);
3360 log_debug(
"(%d,%d) invisible city %d, %s",
3364 if (NULL != powner &&
city_owner(pwork) != powner) {
3366 pwork->
owner = powner;
3386 if (oldwork && NULL !=
city_tile(oldwork)) {
3409 tile_changed =
TRUE;
3412 if (old_known != packet->
known) {
3413 known_changed =
TRUE;
3422 switch (packet->
known) {
3435 log_error(
"handle_tile_info() invalid known (%d).", packet->
known);
3448 tile_changed =
TRUE;
3454 tile_changed =
TRUE;
3468 unit_list_clear(ptile->
units);
3474 if (packet->
label[0] ==
'\0') {
3475 if (ptile->
label != NULL) {
3477 ptile->
label = NULL;
3478 tile_changed =
TRUE;
3480 }
else if (ptile->
label == NULL || strcmp(packet->
label, ptile->
label)) {
3482 tile_changed =
TRUE;
3485 if (known_changed || tile_changed) {
3503 if (tile_changed || old_known != new_known) {
3571#define VALIDATE(_count, _maximum, _string) \
3572 if (game.control._count > _maximum) { \
3573 log_error("handle_ruleset_control(): Too many " _string \
3574 "; using %d of %d", _maximum, game.control._count); \
3575 game.control._count = _maximum; \
3688 pextra->hiders = extra_type_list_new();
3691 extra_type_list_append(pextra->hiders, phider);
3694 pextra->bridged = extra_type_list_new();
3697 extra_type_list_append(pextra->bridged, pbridged);
3845 bonus = malloc(
sizeof(*bonus));
3852 combat_bonus_list_append(u->
bonuses, bonus);
3860 const char *flagname;
3861 const char *helptxt;
3865 if (p->
name[0] ==
'\0') {
3886 const char *flagname;
3887 const char *helptxt;
3890 "Bad user flag %d.", p->
id);
3892 if (p->
name[0] ==
'\0') {
3916 const int reqs_size,
4025 const char *flagname;
4026 const char *helptxt;
4030 if (p->
name[0] ==
'\0') {
4060 requirement_vector_append(&b->
reqs, p->
reqs[i]);
4079 log_debug(
" build_cost %3d", bdbg->build_cost);
4081 log_debug(
" sabotage %3d", bdbg->sabotage);
4082 if (NULL != bdbg->helptext) {
4115 requirement_vector_append(&pmul->
reqs, p->
reqs[j]);
4135 requirement_vector_append(&gov->
reqs, p->
reqs[j]);
4194 "Mismatched resource %d for terrain \"%s\".",
4241 const char *flagname;
4242 const char *helptxt;
4246 if (p->
name[0] ==
'\0') {
4298 for (i = 0; i < EC_COUNT; i++) {
4300 pextra->
causes |= (1 << i);
4305 for (i = 0; i < ERM_COUNT; i++) {
4311 if (pextra->
causes == 0) {
4314 for (i = 0; i < EC_COUNT; i++) {
4332 if (!cbase && !croad && !cres) {
4337 for (i = 0; i < ERM_COUNT; i++) {
4352 requirement_vector_append(&pextra->
reqs, p->
reqs[i]);
4357 requirement_vector_append(&pextra->
rmreqs, p->
rmreqs[i]);
4392 if (pextra->
eus == EUS_HIDDEN) {
4417 const char *flagname;
4418 const char *helptxt;
4421 "Bad user flag %d.", p->
id);
4423 if (p->
name[0] ==
'\0') {
4503 requirement_vector_append(&pgood->
reqs, p->
reqs[i]);
4524 log_error(
"handle_ruleset_action() the action id %d is out of range.",
4559 log_error(
"handle_ruleset_action_enabler() the action %d "
4596 requirement_vector_append(&auto_perf->
reqs, p->
reqs[i]);
4618 requirement_vector_append(&pdis->
reqs, p->
reqs[i]);
4678 for (i = 0; i < packet->
nsets; i++) {
4699 for (i = 0; i < packet->
ngroups; i++) {
4704 if (pgroup != NULL) {
4746 if (
'\0' != packet->
legend[0]) {
4752 for (i = 0; i < packet->
nsets; i++) {
4756 nation_set_list_append(pnation->
sets, pset);
4758 log_error(
"handle_ruleset_nation() \"%s\" have unknown set %d.",
4763 for (i = 0; i < packet->
ngroups; i++) {
4766 if (NULL != pgroup) {
4767 nation_group_list_append(pnation->
groups, pgroup);
4769 log_error(
"handle_ruleset_nation() \"%s\" have unknown group %d.",
4777 if (i < packet->init_techs_count) {
4784 if (i < packet->init_units_count) {
4792 if (i < packet->init_buildings_count) {
4807 bool nationset_change)
4814 for (i = 0; i < ncount; i++) {
4866 "Bad citystyle %d.",
id);
4870 requirement_vector_append(&cs->
reqs, packet->
reqs[j]);
4892 "Bad music_style %d.",
id);
4897 requirement_vector_append(&pmus->
reqs, packet->
reqs[j]);
4921 if (i < packet->global_init_techs_count) {
4928 if (i < packet->global_init_buildings_count) {
4967 requirement_vector_append(&s->
reqs, p->
reqs[j]);
4985 unit_id32 = unit_id16;
4996 bool other_asking =
FALSE;
4999 if (other->client.asking_city_name) {
5000 other_asking =
TRUE;
5005 if (!other_asking) {
5026 struct unit *pactor;
5041 log_error(
"handle_unit_action_answer() the action %d doesn't exist.",
5065 case ACTION_SPY_BRIBE_UNIT:
5075 log_error(
"Unimplemented: received background unit bribe cost.");
5086 case ACTION_SPY_INCITE_CITY:
5087 case ACTION_SPY_INCITE_CITY_ESC:
5097 log_error(
"Unimplemented: received background city incite cost.");
5108 case ACTION_UPGRADE_UNIT:
5118 log_error(
"Received upgrade unit price but can't forward it.");
5122 log_debug(
"Server didn't respond to query.");
5130 log_error(
"handle_unit_action_answer() invalid action_type (%d).",
5154 attack_action = act_id;
5168 return attack_action;
5281 switch (request_kind) {
5317 log_warn(
"Unknown request_kind %d in reply", request_kind);
5328 struct unit *pactor;
5344 if (pactor == NULL) {
5345 log_debug(
"Bad diplomat %d.", actor_id);
5381 log_error(
"Unimplemented: received background city building list.");
5447 client.last_processed_request_id_seen);
5449 request_id_of_currently_handled_packet);
5460 log_debug(
"finish processing packet %d",
5468 last_processed_request_id_seen);
5493 log_debug(
"outgoing packet={type=%d, size=%d, request_id=%d}",
5561 bool changed =
FALSE;
5564 if (NULL == ptile) {
5565 log_error(
"%s(): invalid tile index %d.", __FUNCTION__, packet->
id);
5603 if (NULL == ptile) {
5604 log_error(
"%s(): invalid tile index %d.", __FUNCTION__, packet->
id);
5610 log_error(
"%s(): no start position at (%d, %d)",
5611 __FUNCTION__,
TILE_XY(ptile));
5643 "Got packet_vote_update for non-existant vote %d!",
5660 "Got a packet_vote_new for already existing "
5680 "Got packet_vote_resolve for non-existant 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 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
void map_init_topology(void)
#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)