Freeciv-3.2
|
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "distribute.h"
#include "fcintl.h"
#include "log.h"
#include "mem.h"
#include "support.h"
#include "ai.h"
#include "citizens.h"
#include "counters.h"
#include "effects.h"
#include "game.h"
#include "government.h"
#include "improvement.h"
#include "map.h"
#include "movement.h"
#include "packets.h"
#include "specialist.h"
#include "traderoutes.h"
#include "unit.h"
#include "cm.h"
#include "city.h"
Go to the source code of this file.
Data Structures | |
struct | tile_cache |
Macros | |
#define | CITYLOG_MAX_VAL 9999 /* maximal value displayed in the citylog */ |
#define | log_ca_s_init log_debug |
Calculate output (gold, science, and luxury) generated by the specialists of a city. The output[] array is not cleared but is just added to.
Definition at line 2364 of file city.c.
Referenced by city_refresh_from_main_map(), and dai_city_want().
Add the incomes of a city according to the taxrates (ignore # of specialists). trade should be in output[O_TRADE].
Definition at line 2245 of file city.c.
Referenced by dai_city_want(), get_city_dialog_output_text(), and set_city_production().
bool base_city_can_work_tile | ( | const struct player * | restriction, |
const struct city * | pcity, | ||
const struct tile * | ptile | ||
) |
Returns TRUE when a tile is available to be worked, or the city itself is currently working the tile (and can continue).
The parameter 'restriction', which is usually client_player(), allow a player to handle with its real knownledge to guess it the work of this tile is possible.
This function shouldn't be called directly, but with city_can_work_tile() (common/city.[ch]) or client_city_can_work_tile() (client/climap.[ch]).
Definition at line 1401 of file city.c.
Referenced by city_can_work_tile(), and client_city_can_work_tile().
Return TRUE if the city was celebrating at the start of the turn, and it still has sufficient size to be in rapture.
Definition at line 1637 of file city.c.
Referenced by city_celebrating(), city_tile_cache_update(), compute_max_stats_heuristic(), compute_tile_production(), dai_city_want(), fill_city_overlays_sprite_array(), get_worked_tile_output(), max_tile_trade(), and min_food_surplus_for_fastest_growth().
Specialist_type_id best_specialist | ( | Output_type_id | otype, |
const struct city * | pcity | ||
) |
Return the "best" specialist available in the game. This specialist will have the most of the given type of output. If pcity is given then only specialists usable by pcity will be considered.
Definition at line 3334 of file city.c.
Referenced by city_increase_size().
bool can_city_build_direct | ( | const struct civ_map * | nmap, |
const struct city * | pcity, | ||
const struct universal * | target | ||
) |
Returns whether city can immediately build given target, unit or improvement. This considers obsolete targets still buildable.
Definition at line 994 of file city.c.
Referenced by base_city_queue_insert().
bool can_city_build_improvement_direct | ( | const struct city * | pcity, |
const struct impr_type * | pimprove | ||
) |
Return whether given city can build given building, ignoring whether it is obsolete.
Definition at line 830 of file city.c.
Referenced by building_upgrades_to(), can_city_build_direct(), can_city_build_improvement_now(), and city_choose_build_default().
bool can_city_build_improvement_later | ( | const struct city * | pcity, |
const struct impr_type * | pimprove | ||
) |
Return whether player can eventually build given building in the city; returns FALSE if improvement can never possibly be built in this city.
Definition at line 871 of file city.c.
Referenced by ba_human_wants(), can_city_build_later(), collect_eventually_buildable_targets(), popup_worklist_editor(), and worklist_change_build_target().
bool can_city_build_improvement_now | ( | const struct city * | pcity, |
const struct impr_type * | pimprove | ||
) |
Return whether given city can build given building; returns FALSE if the building is obsolete.
Definition at line 854 of file city.c.
Referenced by advisor_choose_build(), base_want(), building_advisor(), building_advisor_choose(), can_city_build_now(), choose_build_target(), city_build_building(), city_global_turn_notify(), collect_eventually_buildable_targets(), dai_build_adv_override(), dai_find_source_building(), military_advisor_choose_build(), package_city(), popup_worklist_editor(), process_attacker_want(), research_tech_lost(), and upgrade_building_prod().
bool can_city_build_later | ( | const struct civ_map * | nmap, |
const struct city * | pcity, | ||
const struct universal * | target | ||
) |
Returns whether city can ever build given target, unit or improvement.
Definition at line 1031 of file city.c.
Referenced by add_global_worklist(), base_city_queue_insert(), and set_global_worklist().
bool can_city_build_now | ( | const struct civ_map * | nmap, |
const struct city * | pcity, | ||
const struct universal * | target | ||
) |
Returns whether city can immediately build given target, unit or improvement. This considers obsolete targets no longer buildable.
Definition at line 1013 of file city.c.
Referenced by can_city_build_now_client(), city_dialog::change_production(), city_dialog_update_building(), city_worklist_commit(), client_change_all(), clipboard_send_production_packet(), city_widget::display_list_menu(), handle_city_change(), city_production_model::populate(), transfer_city(), and worklist_change_build_target().
bool can_city_build_unit_direct | ( | const struct civ_map * | nmap, |
const struct city * | pcity, | ||
const struct unit_type * | punittype | ||
) |
Return whether given city can build given unit, ignoring whether unit is obsolete.
Definition at line 903 of file city.c.
Referenced by can_city_build_direct(), can_city_build_unit_now(), city_build_unit(), city_choose_build_default(), city_gold_worth(), process_attacker_want(), unit_upgrades_to(), and upgrade_unit_prod().
bool can_city_build_unit_later | ( | const struct civ_map * | nmap, |
const struct city * | pcity, | ||
const struct unit_type * | punittype | ||
) |
Returns whether player can eventually build given unit in the city; returns FALSE if unit can never possibly be built in this city.
Definition at line 970 of file city.c.
Referenced by can_city_build_later(), collect_eventually_buildable_targets(), dai_process_defender_want(), dai_wants_defender_against(), dai_wants_role_unit(), popup_worklist_editor(), and worklist_change_build_target().
bool can_city_build_unit_now | ( | const struct civ_map * | nmap, |
const struct city * | pcity, | ||
const struct unit_type * | punittype | ||
) |
Return whether given city can build given unit; returns FALSE if unit is obsolete.
Definition at line 947 of file city.c.
Referenced by best_role_unit(), can_city_build_now(), choose_build_target(), collect_eventually_buildable_targets(), dai_barbarian_choose_build(), dai_choose_attacker(), dai_choose_attacker_air(), dai_choose_bodyguard(), dai_choose_defender_versus(), dai_choose_paratrooper(), dai_hunter_guess_best(), dai_hunter_missile_want(), dai_process_defender_want(), dai_wants_defender_against(), dai_wants_role_unit(), impr_allows_actions(), impr_provides_buildable_units(), package_city(), popup_worklist_editor(), process_attacker_want(), research_tech_lost(), role_unit_cb(), and texai_city_worker_task_select().
Create content, unhappy and angry citizens.
Definition at line 2505 of file city.c.
Referenced by city_refresh_from_main_map().
Make citizens content due to city improvements.
Definition at line 2591 of file city.c.
Referenced by city_refresh_from_main_map().
Apply effects of citizen nationality to happiness
Definition at line 2615 of file city.c.
Referenced by city_refresh_from_main_map().
Make citizens happy due to luxury.
Definition at line 2581 of file city.c.
Referenced by city_refresh_from_main_map().
Make citizens happy/unhappy due to units.
This function requires that pcity->martial_law and pcity->unit_happy_cost have already been set in city_support().
Definition at line 2664 of file city.c.
Referenced by city_refresh_from_main_map().
Make citizens happy due to wonders.
Definition at line 2712 of file city.c.
Referenced by city_refresh_from_main_map().
Make people happy: angry citizen are eliminated first then content are made happy, then unhappy content, etc. each conversions costs 2 or 4 luxuries.
Definition at line 2544 of file city.c.
Referenced by citizen_happy_luxury().
Adds an improvement (and its effects) to a city.
Definition at line 3357 of file city.c.
Referenced by base_want(), build_free_small_wonders(), city_add_improvement_with_gov_notice(), edit_buffer_copy(), sg_load_player_city(), sg_load_player_city(), and update_improvement_from_packet().
Return pointer to ai data of given city and ai type.
Definition at line 3609 of file city.c.
Referenced by def_ai_city_data(), and texai_city_data().
A city's maximum airlift capacity. (Note, this still returns a finite number even if airliftingstyle allows unlimited airlifts)
Definition at line 2942 of file city.c.
Referenced by get_airlift_text(), and update_city_activity().
bool city_base_to_city_map | ( | int * | city_map_x, |
int * | city_map_y, | ||
const struct city *const | pcity, | ||
const struct tile * | map_tile | ||
) |
Finds the city map coordinate for a given map position and a city. Returns whether the map position is inside of the city map.
Definition at line 281 of file city.c.
Referenced by adjust_workers_button_pressed(), base_city_can_work_tile(), city_map_includes_tile(), fill_city_overlays_sprite_array(), fill_grid_sprite_array(), fill_sprite_array(), and resolve_city_emergency().
The maximum number of units a city can build per turn.
Definition at line 2932 of file city.c.
Referenced by city_dialog_update_building(), city_production_build_units(), city_production_cost_str(), and cr_entry_build_slots().
Return TRUE if the city built something last turn (meaning production was completed between last turn and this).
Definition at line 2279 of file city.c.
Referenced by city_change_production_penalty(), dai_city_choose_build(), and should_force_recalc().
bool city_can_be_built_here | ( | const struct civ_map * | nmap, |
const struct tile * | ptile, | ||
const struct unit * | punit, | ||
bool | hut_test | ||
) |
Returns TRUE if the given unit can build a city at the given map coordinates.
punit is the founding unit. It may be NULL if a city is built out of the blue (e.g., through editing).
Definition at line 1487 of file city.c.
Referenced by api_methods_unit_city_can_be_built_here(), city_desirability(), create_city_for_player(), dai_auto_settler_run(), find_city_or_settler_near_tile(), property_page_create_objects(), and unit_drawn_with_city_outline().
Returns TRUE if the given unit can build a city at the given map coordinates.
It may still be illegal for any unit to build a city at the specified tile.
Definition at line 1560 of file city.c.
Referenced by city_can_be_built_here().
Returns TRUE iff the given city can change what it is building
Definition at line 1079 of file city.c.
Referenced by city_build_unit(), city_set_queue(), and handle_city_change().
Return TRUE iff the city can grow to the given size.
Definition at line 2012 of file city.c.
Referenced by actres_possible(), city_increase_size(), city_turn_notify(), dai_effect_value(), dai_manage_taxes(), do_city_migration(), and expl_act_not_enabl().
bool city_can_use_specialist | ( | const struct city * | pcity, |
Specialist_type_id | type | ||
) |
Returns TRUE iff the given city can use this kind of specialist.
Definition at line 1065 of file city.c.
Referenced by best_specialist(), city_rotate_specialist(), handle_city_change_specialist(), and init_specialist_lattice_nodes().
Returns TRUE when a tile is available to be worked, or the city itself is currently working the tile (and can continue).
See also client_city_can_work_tile() (client/climap.[ch]).
Definition at line 1456 of file city.c.
Referenced by adjust_workers_button_pressed(), apply_result_on_server(), city_increase_size(), city_map_update_radius_sq(), city_map_update_tile_direct(), city_toggle_worker(), do_city_migration(), fill_city_overlays_sprite_array(), handle_city_make_worker(), init_tile_lattice(), max_tile_trade(), settler_evaluate_improvements(), and texai_tile_worker_task_select().
cities celebrate only after consecutive happy turns
Definition at line 1645 of file city.c.
Referenced by api_methods_is_city_celebrating(), city_dialog_update_title(), city_incite_cost(), city_tile_output_now(), city_turn_notify(), civil_war_triggered(), cr_entry_hstate_concise(), cr_entry_hstate_verbose(), real_city_dialog_popup(), real_city_report_dialog_update_city(), real_info_city_report_dialog_update(), rebuild_citydlg_title_str(), redraw_city_dialog(), update_city_activity(), and city_dialog::update_title().
Compute and optionally apply the change-production penalty for the given production change (to target) in the given city (pcity). Always returns the number of shields which would be in the stock if the penalty had been applied.
If we switch the "class" of the target sometime after a city has produced (i.e., not on the turn immediately after), then there's a shield loss. But only on the first switch that turn. Also, if ever change back to original improvement class of this turn, restore lost production.
Definition at line 1886 of file city.c.
Referenced by change_build_target(), change_production(), and city_turns_to_build().
Always tile_set_owner(ptile, pplayer) sometime before this!
Definition at line 1087 of file city.c.
Referenced by cityresult_fill(), and create_city().
Check if city with given id still exist. Use this before using old city pointers when city might have disappeared.
Definition at line 3572 of file city.c.
Referenced by building_removed(), check_disasters(), city_build_building(), city_build_unit(), city_change_size(), city_populate(), city_reduce_size(), disband_city(), do_city_migration(), do_unit_conquer_city(), remove_city(), transfer_city(), transfer_city_units(), unit_conquer_city(), unit_do_destroy_city(), worklist_change_build_target(), and worklist_item_postpone_req_vec().
bool city_exists_within_max_city_map | ( | const struct civ_map * | nmap, |
const struct tile * | ptile, | ||
bool | may_be_on_center | ||
) |
Return TRUE iff a city exists within a city radius of the given location. may_be_on_center determines if a city at x,y counts.
Definition at line 2112 of file city.c.
Referenced by api_methods_tile_city_exists_within_max_city_map(), and hut_get_limited().
This can be City Walls, Coastal defense... depending on attacker type. If attacker type is not given, just any defense effect will do.
Definition at line 1596 of file city.c.
Referenced by base_assess_defense_unit(), and dai_process_defender_want().
Generalized formula used to calculate granary size.
The AI may not deal well with non-default settings. See food_weighting().
Definition at line 2132 of file city.c.
Referenced by city_dialog_update_information(), city_dialog_update_information(), city_gold_worth(), city_increase_size(), city_populate(), city_reduce_size(), city_reset_foodbox(), city_turn_notify(), city_turns_to_grow(), cr_entry_growturns(), dai_effect_value(), dai_manage_cities(), get_city_growth_string(), handle_edit_city(), min_food_surplus_for_fastest_growth(), objbind_get_allowed_value_span(), package_city(), redraw_city_dialog(), set_default_city_manager(), unit_foodbox_cost(), and city_dialog::update_info_label().
Returns whether city had a plague outbreak this turn.
Definition at line 2923 of file city.c.
Referenced by city_populate().
Return TRUE iff the city is happy. A happy city will start celebrating soon. A city can only be happy if half or more of the population is happy, none of the population is unhappy or angry, and it has sufficient size.
Definition at line 1614 of file city.c.
Referenced by api_methods_is_city_happy(), city_celebrating(), city_dialog_update_title(), dai_manage_taxes(), get_city_surplus(), handle_city_info(), real_city_dialog_popup(), real_city_report_dialog_update_city(), real_info_city_report_dialog_update(), rebuild_citydlg_title_str(), redraw_city_dialog(), update_city_activity(), update_dumb_city(), and city_dialog::update_title().
Return TRUE iff the city has this building in it.
Definition at line 1240 of file city.c.
Referenced by adjust_ai_unit_choice(), api_edit_create_building(), api_edit_remove_building(), api_methods_city_has_building(), ba_human_wants(), build_or_move_building(), can_city_build_improvement_direct(), can_city_sell_building(), city_build_building(), city_building_present(), city_from_wonder(), dai_build_adv_adjust(), diplomat_sabotage(), city_widget::display_list_menu(), do_unit_strike_city_building(), edit_buffer_copy(), get_economy_report_data(), handle_edit_city(), num_city_buildings(), ok_sell_impr_callback(), package_city(), popup_info_text(), popup_sell_impr_callback(), sell_all_improvements(), sell_impr_iterate(), spy_send_sabotage_list(), tactical_req_cb(), and update_dumb_city().
int city_illness_calc | ( | const struct city * | pcity, |
int * | ill_base, | ||
int * | ill_size, | ||
int * | ill_trade, | ||
int * | ill_pollution | ||
) |
Calculate city's illness in tenth of percent:
base illness (the maximum value for illness in percent is given by 'game.info.illness_base_factor')
The illness is reduced by the percentage given by the health effect. Illness cannot exceed 999 (= 99.9%), or be less then 0
Definition at line 2870 of file city.c.
Referenced by city_dialog_update_information(), city_dialog_update_information(), city_illness_strike(), city_migration_score(), cr_entry_plague_risk(), get_city_dialog_illness_text(), redraw_info_city_dialog(), sg_load_players(), sg_load_players(), update_city_activity(), and city_dialog::update_info_label().
const char * city_improvement_name_translation | ( | const struct city * | pcity, |
const struct impr_type * | pimprove | ||
) |
Return the extended name of the building.
Definition at line 663 of file city.c.
Referenced by add_global_worklist(), add_target_to_worklist(), city_build_building(), city_production_name_translation(), create_improvements_list(), get_city_dialog_production_full(), get_production_name(), impr_item::mouseDoubleClickEvent(), name_and_sort_items(), popup_impr_info(), popup_sabotage_dialog(), popup_sabotage_dialog(), popup_worklist_editor(), rebuild_imprm_list(), report_wonders_of_the_world(), report_wonders_of_the_world_long(), sell_callback(), sell_imprvm_dlg_callback(), set_global_worklist(), city_dialog::update_improvements(), worklist_change_build_target(), and worklist_item_postpone_req_vec().
Return the upkeep (gold) needed each turn to upkeep the given improvement in the given city.
Definition at line 1255 of file city.c.
Referenced by city_dialog_update_improvement_list(), city_total_impr_gold_upkeep(), dai_city_want(), get_city_dialog_production_row(), get_economy_report_data(), get_tooltip_improvement(), sell_random_building(), and city_dialog::update_improvements().
Returns TRUE iff the city is occupied.
Definition at line 1665 of file city.c.
Referenced by popup_info_text().
Return TRUE if the city is a virtual city. That is, it is a valid city pointer but does not correspond to a city that exists in the game.
NB: A return value of FALSE implies that either the pointer is NULL or that the city exists in the game.
Definition at line 3589 of file city.c.
Referenced by tile_virtual_destroy().
Find city with given name from list.
Definition at line 1695 of file city.c.
Referenced by game_city_by_name(), is_allowed_city_name(), and transfer_city().
Find city with given id from list.
Definition at line 1679 of file city.c.
Referenced by city_freeze_workers_queue(), city_refresh_queue_add(), and dai_goldequiv_clause().
Returns TRUE iff pcity's city map includes the specified tile.
Definition at line 293 of file city.c.
Referenced by handle_city_make_specialist(), and handle_city_make_worker().
Returns the current squared radius of the city.
Definition at line 137 of file city.c.
Referenced by adv_city_update(), adv_city_worker_act_get(), adv_city_worker_act_set(), adv_city_worker_extra_get(), adv_city_worker_extra_set(), adv_city_worker_rmextra_get(), adv_city_worker_rmextra_set(), api_methods_city_map_sq_radius(), apply_cmresult_to_city(), apply_result_on_server(), apply_solution(), build_landarea_map(), button_down_citymap(), check_city_migrations_player(), city_base_to_city_map(), city_increase_size(), city_map_update_all(), city_map_update_radius_sq(), city_reduce_workers(), city_tc_effect_refresh(), city_tile_cache_get_output(), city_tile_cache_update(), city_toggle_worker(), citylog_map_workers(), citymap_turn_init(), cityresult_fill(), cm_print_city(), cm_result_new(), compute_max_stats_heuristic(), city_map::context_menu(), dai_city_want(), dai_effect_value(), do_city_migration(), game_remove_city(), get_worked_tile_output(), give_citymap_from_player_to_player(), handle_city_info(), handle_city_short_info(), handle_tile_info(), impr_provides_buildable_extras(), init_tile_lattice(), initialize_infrastructure_cache(), is_extra_req_active(), is_extraflag_req_active(), is_roadflag_req_active(), is_terrain_req_active(), is_terrainclass_req_active(), is_terrainflag_req_active(), is_tile_seen_city(), left_button_down_citymap(), map_claim_border(), max_tile_trade(), min_food_surplus_for_fastest_growth(), city_map::mousePressEvent(), package_city(), place_pollution(), player_in_city_map(), resolve_city_emergency(), resource_map_city_dlg_callback(), right_button_down_citymap(), city_map::set_pixmap(), settler_evaluate_improvements(), and texai_city_worker_task_select().
Sets the squared radius for the city.
Definition at line 148 of file city.c.
Referenced by city_map_update_radius_sq(), handle_city_short_info(), handle_tile_info(), sg_load_player_city(), and sg_load_player_city().
Return the number of tiles for the given city radius. Special case is the value -1 for no city tiles.
Definition at line 171 of file city.c.
Referenced by adv_city_update(), city_map_update_radius_sq(), city_tile_cache_update(), city_tile_index_to_xy(), citylog_map_workers(), cm_print_result(), cm_result_copy(), cm_result_new(), generate_city_map_indices(), max_tile_trade(), place_pollution(), and print_cityresult().
struct tile * city_map_to_tile | ( | const struct civ_map * | nmap, |
const struct tile * | city_center, | ||
int | city_radius_sq, | ||
int | city_map_x, | ||
int | city_map_y | ||
) |
Finds the map position for a given city map coordinate of a certain city. Returns true if the map position found is real.
Definition at line 305 of file city.c.
Referenced by button_down_citymap(), city_map_update_radius_sq(), city_toggle_worker(), citylog_map_workers(), city_map::context_menu(), max_tile_trade(), min_food_surplus_for_fastest_growth(), place_pollution(), and right_button_down_citymap().
Comparison function for qsort for city pointers, sorting by city name. Args are really (struct city**), to sort an array of pointers. (Compare with old_city_name_compare() in game.c, which use city_id's)
Definition at line 1711 of file city.c.
Referenced by create_clause_menu(), popup_add_menu(), and popup_diplomatic_objects().
Return the name of the city.
Definition at line 1137 of file city.c.
Referenced by adv_city_worker_act_set(), adv_city_worker_extra_set(), adv_city_worker_rmextra_set(), agents_city_changed(), agents_city_new(), agents_city_remove(), apply_disaster(), apply_result_on_server(), auto_arrange_workers(), caravan_optimize_callback(), change_build_target(), check_city_migrations_player(), choose_build_target(), cities_update_callback(), citizens_convert(), citizens_convert_conquest(), citizens_print(), city_build_unit(), city_choose_build_default(), city_dialog_update_title(), city_from_wonder(), city_link(), city_map_update_radius_sq(), city_migration_score(), city_packet_common(), city_rally_point_receive(), city_reduce_size(), city_dialog::city_rename(), city_repair_size(), city_tile_link(), citylog_map_workers(), civil_war(), client_diplomacy_clause_string(), client_remove_city(), client_remove_unit(), cm_find_best_solution(), cm_print_city(), cm_state_init(), cma_put_city_under_agent(), cr_entry_cityname(), create_city_dialog(), create_clause_menu(), dai_action_value_unit_vs_city(), dai_airlift(), dai_auto_settler_run(), dai_caravan_goto(), dai_choose_attacker_air(), dai_choose_diplomat_defensive(), dai_choose_diplomat_offensive(), dai_choose_help_wonder(), dai_choose_paratrooper(), dai_city_choose_build(), dai_diplomat_city(), dai_find_strategic_airbase(), dai_goldequiv_clause(), dai_manage_airunit(), dai_manage_diplomat(), dai_manage_hitpoint_recovery(), dai_manage_paratrooper(), dai_manage_taxes(), dai_military_attack_barbarian(), dai_military_defend(), dai_process_defender_want(), dai_should_we_air_attack_tile(), debug_command(), define_orig_production_values(), diplomat_sabotage(), do_capture_units(), edit_buffer_copy(), explain_why_no_action_enabled(), goto_dialog::fill_tab(), find_best_tile_to_paradrop_to(), find_something_to_kill(), game_remove_city(), game_remove_unit(), get_city_citizen_types(), get_city_dialog_output_text(), get_city_mapview_name_and_growth(), get_nearest_city_text(), get_unit_info_label_text2(), handle_city(), handle_city_info(), handle_city_make_specialist(), handle_city_make_worker(), handle_tile_info(), handle_unit_packet_common(), idex_register_city(), idex_unregister_city(), illegal_action_msg(), kill_something_with(), list_store_append_player_cities(), look_for_charge(), plr_widget::nation_selected(), new_name_city_dlg_callback(), package_city(), place_pollution(), popup_action_selection(), popup_add_menu(), popup_advanced_terrain_dialog(), popup_city_cma_dialog(), popup_diplomatic_objects(), popup_find_dialog(), popup_incite_dialog(), popup_incite_dialog(), popup_info_text(), popup_worklist_editor(), process_attacker_want(), rally_set_tile(), real_bodyguard_log(), real_city_dialog_popup(), real_city_log(), real_info_city_report_dialog_update(), real_menus_update(), really_handle_city_buy(), rebuild_citydlg_title_str(), redraw_info_city_dialog(), redraw_unit_info_label(), refresh_city_names(), rename_callback(), report_top_cities(), report_wonders_of_the_world(), report_wonders_of_the_world_long(), resolve_city_emergency(), send_player_cities(), sg_load_player_city(), sg_load_player_city(), sg_load_player_city_citizens(), sg_load_player_city_citizens(), sg_save_player_cities(), show_city_descriptions(), teleport_unit_to_city(), text_tag_initv(), text_tag_replace_text(), text_tag_start_sequence(), throw_units_from_illegal_cities(), tile_set_terrain(), transfer_city(), transfer_city_units(), transfer_unit(), try_summon_barbarians(), unit_description(), hud_units::update_actions(), update_dumb_city(), update_find_dialog(), update_goto_dialog(), update_intel_dialog(), update_intel_wonder_dialog(), update_source_label(), city_dialog::update_title(), usdlg_get_unit_descr(), vision_site_new_from_city(), vision_site_update_from_city(), and want_tech_for_improvement_effect().
Set a new name for the city.
Definition at line 1145 of file city.c.
Referenced by create_city_virtual(), handle_city_info(), handle_city_rename(), handle_city_short_info(), handle_edit_city(), sg_load_player_city(), sg_load_player_city(), and transfer_city().
Calculate pollution for the city. The shield_total must be passed in (most callers will want to pass pcity->shield_prod).
Definition at line 2821 of file city.c.
Referenced by city_refresh_from_main_map(), and dai_city_want().
int city_pollution_types | ( | const struct city * | pcity, |
int | shield_total, | ||
int * | pollu_prod, | ||
int * | pollu_pop, | ||
int * | pollu_mod | ||
) |
Calculate the pollution from production and population in the city.
Definition at line 2787 of file city.c.
Referenced by city_pollution(), and get_city_dialog_pollution_text().
Returns how many thousand citizen live in this city.
Definition at line 1191 of file city.c.
Referenced by calc_civ_score(), city_dialog_update_title(), civ_population(), popup_city_cma_dialog(), rebuild_citydlg_title_str(), and city_dialog::update_title().
Return the number of shields it takes to build current city production.
Definition at line 737 of file city.c.
Referenced by actres_possible(), build_points_left(), city_dialog_update_building(), city_production_cost_str(), get_act_sel_action_custom_text(), get_prod_complete_string(), popup_worklist_editor(), really_handle_city_buy(), and city_dialog::update_building().
bool city_production_build_units | ( | const struct city * | pcity, |
bool | add_production, | ||
int * | num_units | ||
) |
Return TRUE if the city could use the additional build slots provided by the effect City_Build_Slots. Within 'num_units' the total number of units the city can build considering the current shield stock is returned.
Definition at line 747 of file city.c.
Referenced by city_build_unit(), city_production_cost_str(), get_units_report_data(), units_report_update(), and units_reports::update_units().
Initialize the cache of what city production can use shields from caravans.
Definition at line 1778 of file city.c.
Referenced by handle_rulesets_ready(), and load_rulesetdir().
Returns TRUE iff the specified production should get shields from units that has done ACTION_HELP_WONDER.
Definition at line 1860 of file city.c.
Referenced by city_change_production_penalty(), dai_choose_help_wonder(), dai_manage_caravan(), unit_do_help_build(), and wonder_benefit().
Return TRUE when the current production has this flag.
Definition at line 727 of file city.c.
Referenced by city_build_building(), cr_entry_building(), get_city_dialog_production(), get_economy_report_data(), player_get_expected_income(), and popup_worklist_editor().
Return TRUE when the current production is of this genus.
Definition at line 717 of file city.c.
Referenced by cityrep_buy(), cr_entry_build_cost(), cr_entry_building(), get_city_dialog_production(), get_city_mapview_production(), get_prod_complete_string(), popup_worklist_editor(), and really_handle_city_buy().
Return the extended name of the current production.
Definition at line 700 of file city.c.
Referenced by city_dialog::buy(), buy_callback(), change_build_target(), city_dialog_update_building(), cityrep_buy(), cr_entry_building(), goto_dialog::fill_tab(), popup_hurry_production_dialog(), popup_worklist_editor(), unit_do_help_build(), and city_dialog::update_building().
Calculates the turns which are needed to build the requested production in the city. GUI Independent.
Definition at line 820 of file city.c.
Referenced by city_global_turn_notify(), cr_entry_build_cost(), get_city_dialog_production(), get_city_mapview_production(), get_units_report_data(), popup_worklist_editor(), real_city_report_dialog_update_city(), real_info_city_report_dialog_update(), and redraw_city_dialog().
How many veteran levels will created unit of this type get?
Definition at line 804 of file city.c.
Referenced by adjust_ai_unit_choice(), city_create_unit(), dai_choose_attacker_air(), dai_choose_diplomat_offensive(), dai_choose_paratrooper(), dai_gothere_bodyguard(), dai_hunter_choice(), dai_unit_consider_bodyguard(), find_something_to_kill(), kill_something_with(), military_advisor_choose_build(), and send_rally_tile().
Clear rally point set for the city.
Definition at line 3626 of file city.c.
Referenced by city_build_unit(), destroy_city_virtual(), and transfer_city().
void city_rally_point_receive | ( | const struct packet_city_rally_point * | packet, |
struct city * | pcity | ||
) |
Fill city rally point from a packet.
Definition at line 3641 of file city.c.
Referenced by handle_city_rally_point(), and handle_city_rally_point().
Returns whether city is growing by rapture.
Definition at line 1653 of file city.c.
Referenced by city_increase_size(), and city_populate().
void city_refresh_from_main_map | ( | const struct civ_map * | nmap, |
struct city * | pcity, | ||
bool * | workers_map | ||
) |
Refreshes the internal cached data in the city structure.
!full_refresh will not update tile_cache[] or bonus[]. These two values do not need to be recalculated for AI CMA testing.
'workers_map' is an boolean array which defines the placement of the workers within the city map. It uses the tile index and its size is defined by city_map_tiles_from_city(_pcity). See also cm_state_init().
If 'workers_map' is set, only basic updates are needed.
Definition at line 3176 of file city.c.
Referenced by apply_solution(), city_refresh(), cm_query_result(), and dai_manage_taxes().
Removes an improvement (and its effects) from a city.
Definition at line 3371 of file city.c.
Referenced by api_edit_remove_building(), base_want(), build_or_move_building(), building_removed(), city_build_building(), client_remove_city(), handle_edit_city(), transfer_city(), and update_improvement_from_packet().
Attach ai data to city
Definition at line 3617 of file city.c.
Referenced by dai_city_alloc(), dai_city_free(), texai_city_alloc(), and texai_city_free().
Add a (positive or negative) value to the city size. As citizens is an unsigned value use int for the parameter 'add'.
Definition at line 1164 of file city.c.
Referenced by city_add_unit(), city_increase_size(), city_reduce_size(), cityresult_fill(), and handle_city_info().
Set the city size.
Definition at line 1180 of file city.c.
Referenced by city_size_add(), create_city_virtual(), edit_buffer_copy(), handle_city_info(), handle_city_short_info(), sg_load_player_city(), and sg_load_player_city().
Give the number of specialists in a city.
Definition at line 3317 of file city.c.
Referenced by citizen_base_mood(), city_dialog_update_information(), city_dialog_update_information(), city_map_update_radius_sq(), evaluate_solution(), handle_city_make_worker(), redraw_city_dialog(), redraw_happiness_city_dialog(), show_info_popup(), show_info_popup(), and city_dialog::update_info_label().
Returns the city style that has the given (untranslated) rule name. Returns -1 if none match.
Definition at line 1738 of file city.c.
Referenced by sg_load_player_city(), sg_load_player_city(), sg_load_player_vision_city(), and sg_load_player_vision_city().
Return the (translated) name of the given city style. You don't have to free the return pointer.
Definition at line 1756 of file city.c.
Referenced by city_style_by_translated_name(), and create_races_dialog().
Return the (untranslated) rule name of the city style. You don't have to free the return pointer.
Definition at line 1765 of file city.c.
Referenced by city_style_by_rule_name(), is_universal_needed(), load_ruleset_styles(), sanity_check_ruleset_data(), sg_save_player_cities(), sg_save_player_vision(), and tileset_setup_city_tiles().
Allocate memory for this amount of city styles.
Definition at line 3396 of file city.c.
Referenced by handle_ruleset_control(), and load_style_names().
De-allocate the memory used by the city styles.
Definition at line 3411 of file city.c.
Referenced by game_ruleset_free().
Calculate upkeep costs. This builds the pcity->usage[] array as well as setting some happiness values.
Definition at line 3100 of file city.c.
Referenced by city_refresh_from_main_map().
|
inlinestatic |
This function returns the output of 'o' for the city tile 'city_tile_index' of 'pcity'.
Definition at line 2438 of file city.c.
Referenced by get_worked_tile_output().
|
inlinestatic |
This function sets the cache for the tile outputs, the pcity->tile_cache[] array. It is called near the beginning of city_refresh_from_main_map().
It doesn't depend on anything else in the refresh and doesn't change as workers are moved around, but does change when buildings are built, etc.
TODO: use the cached values elsewhere in the code!
Definition at line 2409 of file city.c.
Referenced by city_refresh_from_main_map().
bool city_tile_index_to_xy | ( | int * | city_map_x, |
int * | city_map_y, | ||
int | city_tile_index, | ||
int | city_radius_sq | ||
) |
Returns the coordinates for the given city tile index taking into account the squared city radius.
Definition at line 101 of file city.c.
Referenced by cm_print_city(), and place_pollution().
int city_tile_output | ( | const struct city * | pcity, |
const struct tile * | ptile, | ||
bool | is_celebrating, | ||
Output_type_id | otype | ||
) |
Calculate the output for the tile. pcity may be NULL. is_celebrating may be speculative. otype is the output type (generally O_FOOD, O_TRADE, or O_SHIELD).
This can be used to calculate the benefits celebration would give.
Definition at line 1283 of file city.c.
Referenced by city_tile_cache_update(), city_tile_output_now(), cityresult_fill(), compute_max_stats_heuristic(), compute_tile_production(), dai_city_want(), do_city_migration(), fill_city_overlays_sprite_array(), get_tile_output_text(), get_tile_value(), get_worked_tile_output(), max_tile_trade(), and min_food_surplus_for_fastest_growth().
int city_tile_output_now | ( | const struct city * | pcity, |
const struct tile * | ptile, | ||
Output_type_id | otype | ||
) |
Calculate the production output the given tile is capable of producing for the city. The output type is given by 'otype' (generally O_FOOD, O_SHIELD, or O_TRADE).
NOTE: As of now, return value does not represent output on end of turn if city stops celebrating, because the server side tile output cache uses base_city_celebrating() instead of city_celebrating() on city_tile_cache_update().
Definition at line 1384 of file city.c.
Referenced by city_tile_value(), and package_city().
bool city_tile_to_city_map | ( | int * | city_map_x, |
int * | city_map_y, | ||
const int | city_radius_sq, | ||
const struct tile * | city_center, | ||
const struct tile * | map_tile | ||
) |
Finds the city map coordinate for a given map position and a city center. Returns whether the map position is inside of the city map.
Definition at line 264 of file city.c.
Referenced by city_base_to_city_map(), and fill_grid_sprite_array().
Returns the index for the given city tile coordinates taking into account the squared city radius.
Definition at line 123 of file city.c.
Referenced by citylog_map_line().
Returns the total amount of gold needed to pay for all buildings in the city.
Definition at line 1201 of file city.c.
Referenced by city_support(), player_get_expected_income(), and update_city_activity().
Get the total amount of gold needed to pay upkeep costs for all supported units of the city. Takes into account EFT_UNIT_UPKEEP_FREE_PER_CITY.
Definition at line 1222 of file city.c.
Referenced by city_support(), military_advisor_choose_build(), player_get_expected_income(), and update_city_activity().
int city_turns_to_build | ( | const struct city * | pcity, |
const struct universal * | target, | ||
bool | include_shield_stock | ||
) |
Calculates the turns which are needed to build the requested improvement in the city. GUI Independent.
Definition at line 1965 of file city.c.
Referenced by city_production_turns_to_build(), get_city_dialog_production_full(), get_city_dialog_production_row(), popup_worklist_editor(), and refresh_production_label().
Calculates the turns which are needed for the city to grow. A value of FC_INFINITY means the city will never grow. A value of 0 means city growth is blocked. A negative value of -x means the city will shrink in x turns. A positive value of x means the city will grow in x turns.
Definition at line 1996 of file city.c.
Referenced by city_dialog_update_information(), city_dialog_update_information(), cr_entry_growturns(), get_city_mapview_name_and_growth(), package_city(), real_city_report_dialog_update_city(), real_info_city_report_dialog_update(), redraw_city_dialog(), and city_dialog::update_info_label().
Return TRUE iff the city is unhappy. An unhappy city will fall into disorder soon.
Definition at line 1626 of file city.c.
Referenced by api_methods_is_city_unhappy(), city_dialog_update_title(), city_gold_worth(), city_incite_cost(), civil_war_triggered(), cr_entry_hstate_concise(), cr_entry_hstate_verbose(), get_city_surplus(), handle_city_info(), real_city_dialog_popup(), real_city_report_dialog_update_city(), real_info_city_report_dialog_update(), rebuild_citydlg_title_str(), redraw_city_dialog(), resolve_city_emergency(), unhappy_city_check(), update_city_activity(), update_dumb_city(), and city_dialog::update_title().
Return number of free unit slots in a city.
Definition at line 1049 of file city.c.
Referenced by actres_possible(), and can_city_build_unit_direct().
Query unhappiness caused by a given unit.
Definition at line 3049 of file city.c.
Referenced by city_dialog_update_supported_units(), city_support(), create_unit_surface(), dai_assess_military_unhappiness(), and city_dialog::update_units().
Give corruption/waste generated by city. otype gives the output type (O_SHIELD/O_TRADE). 'total' gives the total output of this type in the city. If non-NULL, 'breakdown' should be an OLOSS_LAST-sized array which will be filled in with a breakdown of the kinds of waste (not cumulative).
Definition at line 3228 of file city.c.
Referenced by cityresult_fill(), dai_city_want(), get_city_dialog_output_text(), and set_city_production().
Display 'map_data' on a city map with the given radius 'radius_sq' for the requested log level. The size of 'map_data' is defined by city_map_tiles(radius_sq).
Definition at line 411 of file city.c.
Referenced by citylog_map_workers(), cm_print_result(), and print_cityresult().
Definition at line 369 of file city.c.
Referenced by citylog_map_data().
Display the location of the workers within the city map of pcity.
Definition at line 446 of file city.c.
Referenced by city_map_update_radius_sq().
Returns TRUE iff it is illegal to found a city on the specified tile because of citymindist.
Definition at line 1465 of file city.c.
Referenced by actres_possible(), city_can_be_built_tile_only(), and expl_act_not_enabl().
Compare two integer values, as required by qsort.
Definition at line 325 of file city.c.
Referenced by auto_arrange_workers(), compare_iter_index(), dai_manage_taxes(), data_compare(), set_default_city_manager(), and tile_type_lattice_add().
Compare two iter_index values from the city_map_index.
This function will be passed to qsort(). It should never return zero, or the sort order will be left up to qsort and will be undefined. This would mean that server execution would not be reproducible.
Definition at line 343 of file city.c.
Referenced by generate_city_map_indices(), and generate_map_indices().
struct city * create_city_virtual | ( | struct player * | pplayer, |
struct tile * | ptile, | ||
const char * | name | ||
) |
Create virtual skeleton for a city. Values are mostly sane defaults.
Always tile_set_owner(ptile, pplayer) sometime after this!
Definition at line 3430 of file city.c.
Referenced by trade_generator::add_tile(), cityresult_fill(), create_city(), edit_buffer_copy(), handle_city_info(), handle_city_short_info(), handle_tile_info(), result_defense_bonus(), sg_load_player_cities(), sg_load_player_cities(), and texai_city_info_recv().
Removes the virtual skeleton of a city. You should already have removed all buildings and units you have added to the city before this.
Definition at line 3516 of file city.c.
Referenced by cityresult_fill(), trade_generator::clear_trade_planing(), game_remove_city(), packhand_free(), sg_load_player_cities(), sg_load_player_cities(), texai_city_destruction_recv(), and tile_virtual_destroy().
Free memory allocated by generate_citymap_index
Definition at line 609 of file city.c.
Referenced by game_free(), game_reset(), handle_map_info(), and srv_ready().
Fill the arrays city_map_index, city_map_xy and city_map_numtiles. This may depend on topology and ruleset settings.
Definition at line 527 of file city.c.
Referenced by main_map_allocate().
Get any effects regarding health from the buildings of the city. The effect defines the reduction of the possibility of an illness in percent.
Definition at line 2853 of file city.c.
Referenced by city_illness_calc().
Return the amount of gold generated by buildings under "tithe" attribute governments.
Definition at line 2227 of file city.c.
Referenced by dai_city_want(), get_city_dialog_output_text(), and set_city_production().
int get_final_city_output_bonus | ( | const struct city * | pcity, |
Output_type_id | otype | ||
) |
Return the factor (in %) by which the city's output should be multiplied.
Definition at line 2212 of file city.c.
Referenced by calc_civ_score(), dai_city_want(), and set_city_bonuses().
const char * get_output_identifier | ( | Output_type_id | output | ) |
Return an id string for the output type. This string can be used internally by rulesets and tilesets and should not be changed or translated.
Definition at line 619 of file city.c.
Referenced by load_ruleset_game(), load_ruleset_terrain(), load_ruleset_units(), save_game_ruleset(), save_terrain_ruleset(), save_units_ruleset(), tileset_lookup_sprite_tags(), and universal_rule_name().
const char * get_output_name | ( | Output_type_id | output | ) |
Return a translated name for the output type. This name should only be used for user display.
Definition at line 629 of file city.c.
Referenced by choice_is_promising(), cm_print_result(), create_cma_dialog(), helptext_government(), helptext_unit_upkeep_str(), popup_city_cma_dialog(), req_text_insert(), universal_kind_values(), and universal_name_translation().
struct output_type * get_output_type | ( | Output_type_id | output | ) |
Return the output type for this index.
Definition at line 638 of file city.c.
Referenced by api_effects_tile_bonus(), city_units_upkeep(), city_waste(), get_specialist_output(), get_tile_output_text(), helptext_government(), set_surpluses(), upkeep_kill_unit(), and utype_upkeep_cost().
Gets whether cities that pcity trades with had the plague. If so, it returns the health penalty in tenth of percent which depends on the size of both cities. The health penalty is given as the product of the ruleset option 'game.info.illness_trade_infection' (in percent) and the square root of the product of the size of both cities.
Definition at line 2833 of file city.c.
Referenced by city_illness_calc().
|
inlinestatic |
Calculate output (food, trade and shields) generated by the worked tiles of a city. This will completely overwrite the output[] array.
'workers_map' is an boolean array which defines the placement of the workers within the city map. It uses the tile index and its size is defined by city_map_tiles_from_city(_pcity). See also cm_state_init().
Definition at line 2324 of file city.c.
Referenced by city_refresh_from_main_map().
Copy the happiness array in the city to index i from index i-1.
Definition at line 2493 of file city.c.
Referenced by city_refresh_from_main_map().
Return TRUE iff this city is its nation's capital. The capital city is special-cased in a number of ways.
Definition at line 1579 of file city.c.
Referenced by adjust_improvement_wants_by_effects(), api_methods_is_capital(), building_lost(), check_city_migrations_player(), city_incite_cost(), city_migration_score(), civil_war(), create_clause_menu(), dai_goldequiv_clause(), dai_gov_value(), dai_tech_effect_values(), do_expel_unit(), handle_diplomacy_accept_treaty_req(), popup_add_menu(), popup_diplomatic_objects(), diplo_wdg::show_menu(), unit_bribe_cost(), and unit_conquer_city().
Returns TRUE iff the city has set the given option.
Definition at line 3388 of file city.c.
Referenced by city_build_unit(), city_increase_size(), city_dialog::display_worklist_menu(), and set_cityopt_values().
Return TRUE if the city is worked without using up a citizen.
Definition at line 3601 of file city.c.
Referenced by base_city_can_work_tile(), city_map_update_radius_sq(), city_map_update_tile_direct(), compute_max_stats_heuristic(), handle_city_make_specialist(), handle_city_make_worker(), init_tile_lattice(), resolve_city_emergency(), and tile_change_side_effects().
bool is_friendly_city_near | ( | const struct civ_map * | nmap, |
const struct player * | owner, | ||
const struct tile * | ptile, | ||
int | distance | ||
) |
Return TRUE if there is a friendly city near to this tile.
Definition at line 2092 of file city.c.
Referenced by is_unit_near_a_friendly_city(), and unit_move_consequences().
Return TRUE iff this city is governmental center.
Definition at line 1587 of file city.c.
Referenced by api_methods_is_gov_center(), and nearest_gov_center().
bool is_unit_near_a_friendly_city | ( | const struct civ_map * | nmap, |
const struct unit * | punit, | ||
int | distance | ||
) |
Return TRUE if there is a friendly city near to this unit
Definition at line 2081 of file city.c.
Referenced by unit_being_aggressive().
Return TRUE if the given city coordinate pair is "valid"; that is, if it is a part of the citymap and thus is workable by the city.
Definition at line 188 of file city.c.
Referenced by canvas_to_city_pos(), city_map_to_tile(), city_tile_to_city_map(), city_tile_xy_to_index(), city_to_canvas_pos(), city_toggle_worker(), and citylog_map_line().
Find government center nearest to given city.
Definition at line 2287 of file city.c.
Referenced by city_waste(), and set_surpluses().
Output_type_id output_type_by_identifier | ( | const char * | id | ) |
Find the output type for this output identifier.
Definition at line 647 of file city.c.
Referenced by api_effects_tile_bonus(), and universal_value_from_str().
Give base number of angry citizens in any city owned by pplayer.
Definition at line 2196 of file city.c.
Referenced by citizen_base_mood(), create_city(), remove_city(), and transfer_city().
Give base happiness in any city owned by pplayer. A positive number is a number of content citizens. A negative number is a number of angry citizens (a city never starts with both).
Definition at line 2160 of file city.c.
Referenced by player_angry_citizens(), and player_content_citizens().
Give base number of content citizens in any city owned by pplayer.
Definition at line 2186 of file city.c.
Referenced by choice_is_promising(), citizen_base_mood(), create_city(), evaluate_solution(), remove_city(), and transfer_city().
Maximum city radius in this ruleset.
Definition at line 159 of file city.c.
Referenced by find_city_or_settler_near_tile(), generate_citydlg_dimensions(), and city_map::set_pixmap().
This function sets all the values in the pcity->bonus[] and pcity->abs_bonus[] arrays. Called near the beginning of city_refresh_from_main_map().
It doesn't depend on anything else in the refresh and doesn't change as workers are moved around, but does change when buildings are built, etc.
Definition at line 2386 of file city.c.
Referenced by city_refresh_from_main_map().
Set food, trade and shields production in a city.
This initializes the prod[] and waste[] arrays. It assumes that the bonus[] and citizen_base[] arrays are alread built.
Definition at line 2953 of file city.c.
Referenced by city_refresh_from_main_map(), and compute_max_stats_heuristic().
Set the final surplus[] array from the prod[] and usage[] values.
Definition at line 2452 of file city.c.
Referenced by city_refresh_from_main_map().
Return friendly city on the tile, if one exist
Definition at line 2036 of file city.c.
Referenced by is_allied_city_tile().
Return enemy city on the tile, if one exist
Definition at line 2021 of file city.c.
Referenced by is_enemy_city_tile().
Return non-allied city on the tile, if one exist
Definition at line 2066 of file city.c.
Referenced by is_non_allied_city_tile(), is_plr_zoc_client(), and is_plr_zoc_srv().
Return non-attack city on the tile, if one exist
Definition at line 2051 of file city.c.
Referenced by is_non_attack_city_tile(), and need_war_player_hlp().
Set food, tax, science and shields production to zero if city is in disorder.
Definition at line 2760 of file city.c.
Referenced by city_refresh_from_main_map().
|
static |
Definition at line 1771 of file city.c.
Referenced by city_production_caravan_shields_init(), and city_production_gets_caravan_shields().
|
static |
Definition at line 1772 of file city.c.
Referenced by city_production_caravan_shields_init(), and city_production_gets_caravan_shields().
|
static |
Definition at line 60 of file city.c.
Referenced by city_tile_index_to_xy(), free_city_map_index(), and generate_city_map_indices().
|
static |
Definition at line 67 of file city.c.
Referenced by city_map_tiles(), and generate_city_map_indices().
|
static |
Definition at line 64 of file city.c.
Referenced by city_tile_xy_to_index(), and generate_city_map_indices().
Definition at line 84 of file city.c.
Referenced by basic_city_style_for_style(), city_style(), city_style_name_translation(), city_style_rule_name(), city_styles_alloc(), city_styles_free(), handle_ruleset_city(), is_universal_needed(), load_city_sprite(), load_ruleset_styles(), load_style_names(), sanity_check_ruleset_data(), save_styles_ruleset(), send_ruleset_cities(), and tileset_setup_city_tiles().
struct output_type output_types[O_LAST] |
Definition at line 88 of file city.c.
Referenced by city_tile_output(), get_city_dialog_output_text(), get_final_city_output_bonus(), get_output_identifier(), get_output_name(), get_output_type(), output_type_by_identifier(), set_city_bonuses(), and unhappy_city_check().