Freeciv21
Develop your civilization from humble roots to a global empire
game.cpp File Reference
#include "log.h"
#include "shared.h"
#include "support.h"
#include "cm.h"
#include "achievements.h"
#include "actions.h"
#include "ai.h"
#include "city.h"
#include "disaster.h"
#include "effects.h"
#include "extras.h"
#include "government.h"
#include "idex.h"
#include "map.h"
#include "multipliers.h"
#include "nation.h"
#include "packets.h"
#include "player.h"
#include "research.h"
#include "specialist.h"
#include "style.h"
#include "tech.h"
#include "terrain.h"
#include "traderoutes.h"
#include "unit.h"
#include "game.h"
+ Include dependency graph for game.cpp:

Go to the source code of this file.

Functions

static void game_defaults (bool keep_ruleset_value)
 Set default game values. More...
 
bool is_server ()
 Is program type server? More...
 
void i_am_server ()
 Set program type to server. More...
 
void i_am_client ()
 Set program type to client. More...
 
int civ_population (const struct player *pplayer)
 Count the # of thousand citizen in a civilisation. More...
 
struct citygame_city_by_name (const char *name)
 Find city with given name from any player. More...
 
struct citygame_city_by_number (int id)
 Often used function to get a city pointer from a city ID. More...
 
struct unitgame_unit_by_number (int id)
 Find unit out of all units in game: now uses fast idex method, instead of looking through all units of all players. More...
 
void game_remove_unit (struct world *gworld, struct unit *punit)
 In the server call wipe_unit(), and never this function directly. More...
 
void game_remove_city (struct world *gworld, struct city *pcity)
 Remove city from game. More...
 
void game_init (bool keep_ruleset_value)
 Initialise all game settings. More...
 
void game_map_init ()
 Initialize map-specific parts of the game structure. More...
 
void game_free ()
 Frees all memory of the game. More...
 
void game_reset ()
 Do all changes to change view, and not full game_free()/game_init(). More...
 
void game_ruleset_init ()
 Initialize the objects which will read from a ruleset. More...
 
void game_ruleset_free ()
 Frees all memory which in objects which are read from a ruleset. More...
 
void initialize_globals ()
 Initialize wonder information. More...
 
bool is_player_phase (const struct player *pplayer, int phase)
 Return TRUE if it is this player's phase. More...
 
const char * population_to_text (int thousand_citizen)
 Return a prettily formatted string containing the population text. More...
 
static char * year_suffix ()
 Return a string containing the save year. More...
 
int generate_save_name (const char *format, char *buf, int buflen, const char *reason)
 Generate a default save file name and place it in the provided buffer. More...
 
void user_flag_init (struct user_flag *flag)
 Initialize user flag. More...
 
void user_flag_free (struct user_flag *flag)
 Free user flag. More...
 
int current_turn_timeout ()
 Return timeout value for the current turn. More...
 

Variables

struct civ_game game
 
struct world wld
 
bool am_i_server = false
 

Function Documentation

◆ civ_population()

int civ_population ( const struct player pplayer)

Count the # of thousand citizen in a civilisation.

Definition at line 72 of file game.cpp.

Referenced by get_info_label_text(), get_info_label_text_popup(), get_literacy(), get_mil_service(), and show_new_turn_info().

◆ current_turn_timeout()

◆ game_city_by_name()

struct city* game_city_by_name ( const char *  name)

Find city with given name from any player.

Definition at line 83 of file game.cpp.

Referenced by city_name_suggestion(), is_allowed_city_name(), and search_for_city_name().

◆ game_city_by_number()

struct city* game_city_by_number ( int  id)

Often used function to get a city pointer from a city ID.

City may be any city in the game. This now always uses fast idex method, instead of looking through all cities of all players.

Definition at line 103 of file game.cpp.

Referenced by action_maybe_possible_actor_unit(), action_not_enabled_reason(), aiguard_charge_city(), aiguard_check_guard(), aiguard_clear_charge(), aiguard_update_charge(), airlift(), goto_dialog::airlift_to(), chat_widget::anchor_clicked(), bodyguard_log_prefix(), building_advisor(), city_dialog::buy(), caravan_establish_trade(), caravan_find_best_destination(), caravan_find_best_destination_notransit(), caravan_help_build(), caravan_marketplace(), cma_yoloswag::check_city(), city_exist(), city_is_virtual(), city_dialog::city_rename(), city_unit_unhappiness(), client_diplomacy_clause_string(), client_remove_unit(), conquer_city(), conquer_city2(), freeciv::upkeep_widget::contextMenuEvent(), create_city(), create_unit_full(), unit_list_widget::create_unit_image(), dai_caravan_can_trade_cities_diff_cont(), dai_choose_help_wonder(), dai_evaluate_tile_for_air_attack(), dai_is_unit_tired_waiting_boat(), dai_manage_caravan(), dai_military_defend(), dai_wonder_city_distance(), destroy_city(), diplomat_embassy(), diplomat_incite(), diplomat_incite_escape(), diplomat_investigate(), diplomat_sabotage(), diplomat_sabotage_esc(), diplomat_steal(), diplomat_steal_esc(), city_widget::display_list_menu(), city_dialog::display_worklist_menu(), do_unit_establish_trade(), find_something_to_kill(), game_remove_unit(), get_city_dialog_output_text(), goto_dialog::go_to_city(), handle_city_info(), handle_city_remove(), handle_city_sabotage_list(), handle_city_short_info(), handle_diplomacy_accept_treaty_req(), handle_diplomacy_create_clause_req(), handle_edit_city(), handle_edit_city_remove(), handle_player_diplstate(), handle_tile_info(), handle_traderoute_info(), handle_unit_action_answer(), handle_unit_action_query(), handle_unit_actions(), handle_unit_packet_common(), handle_unit_short_info(), handle_worker_task(), goto_dialog::item_selected(), join_city(), link_mark_tile(), map_unit_homecity_enqueue(), plr_widget::nation_selected(), nuke_city(), one_city_trade_benefit(), freeciv::improvement_seller::operator()(), package_player_info(), freeciv::city_icon_widget::paintEvent(), popup_action_selection(), popup_info_text(), reestablish_city_trade_routes(), freeciv::upkeep_widget::refresh(), refresh_unit_city_dialogs(), remove_trade_route(), city_dialog::save_worklist(), server_remove_unit_full(), set_city_production(), sg_load_player_units(), freeciv::city_icon_widget::sizeHint(), mr_menu::slot_autocaravan(), spy_embassy(), spy_investigate(), spy_nuke_city(), spy_nuke_city_esc(), spy_poison(), spy_poison_esc(), spy_request_sabotage_esc_list(), spy_request_sabotage_list(), spy_request_strike_bld_list(), spy_sabotage(), spy_steal_gold(), spy_steal_gold_esc(), spy_steal_maps(), spy_steal_maps_esc(), spy_steal_shared(), spy_steal_something(), tai_req_worker_task_rcv(), texai_refresh(), texai_req_worker_task_rcv(), text_tag_replace_text(), text_tag_start_sequence(), transform_unit(), unit_bribe_cost(), unit_can_est_trade_route_here(), unit_change_homecity_handling(), unit_change_owner(), unit_get_goods(), unit_home_city(), unit_move_consequences(), unit_perform_action(), unit_recycle(), unit_upgrade(), update_city_activities(), and user_action_unit_vs_city().

◆ game_defaults()

static void game_defaults ( bool  keep_ruleset_value)
static

Set default game values.

Definition at line 201 of file game.cpp.

Referenced by game_init().

◆ game_free()

void game_free ( )

Frees all memory of the game.

Definition at line 450 of file game.cpp.

Referenced by client_game_free(), game_reset(), and server_game_free().

◆ game_init()

void game_init ( bool  keep_ruleset_value)

Initialise all game settings.

The variables are listed in alphabetical order.

Definition at line 420 of file game.cpp.

Referenced by client_game_init(), game_reset(), main(), and server_game_init().

◆ game_map_init()

void game_map_init ( )

Initialize map-specific parts of the game structure.

Maybe these should be moved into the map structure?

Definition at line 437 of file game.cpp.

Referenced by srv_ready().

◆ game_remove_city()

void game_remove_city ( struct world gworld,
struct city pcity 
)

Remove city from game.

Definition at line 166 of file game.cpp.

Referenced by client_remove_city(), player_clear(), and remove_city().

◆ game_remove_unit()

void game_remove_unit ( struct world gworld,
struct unit punit 
)

In the server call wipe_unit(), and never this function directly.

Definition at line 120 of file game.cpp.

Referenced by client_remove_unit(), player_clear(), and server_remove_unit_full().

◆ game_reset()

void game_reset ( )

Do all changes to change view, and not full game_free()/game_init().

Definition at line 466 of file game.cpp.

Referenced by client_game_reset().

◆ game_ruleset_free()

void game_ruleset_free ( )

Frees all memory which in objects which are read from a ruleset.

Definition at line 534 of file game.cpp.

Referenced by game_free(), handle_ruleset_control(), and load_rulesetdir().

◆ game_ruleset_init()

void game_ruleset_init ( )

Initialize the objects which will read from a ruleset.

Definition at line 489 of file game.cpp.

Referenced by game_init(), handle_ruleset_control(), and load_rulesetdir().

◆ game_unit_by_number()

struct unit* game_unit_by_number ( int  id)

Find unit out of all units in game: now uses fast idex method, instead of looking through all units of all players.

Definition at line 112 of file game.cpp.

Referenced by act_sel_keep_moving(), action_decision_clear_want(), action_selection_next_in_focus(), adv_unit_execute_path(), aiguard_charge_unit(), aiguard_check_charge_unit(), aiguard_check_guard(), aiguard_clear_charge(), aiguard_clear_guard(), aiguard_guard_of(), aiguard_update_charge(), airlift(), chat_widget::anchor_clicked(), attack(), base(), begin_phase(), bodyguard_log_prefix(), caravan_establish_trade(), caravan_help_build(), caravan_marketplace(), clean_fallout(), clean_pollution(), compare_units(), conquer_city(), conquer_city2(), freeciv::upkeep_widget::contextMenuEvent(), dai_auto_settler_run(), dai_diplomat_bribe_nearby(), dai_hunter_manage(), dai_hunter_try_launch(), dai_manage_airunit(), dai_manage_military(), dai_manage_paratrooper(), dai_military_attack(), dai_unit_attack(), dai_unit_move(), dai_unit_new_task(), debug_command(), destroy_city(), diplomat_bribe(), diplomat_embassy(), diplomat_incite(), diplomat_incite_escape(), diplomat_investigate(), diplomat_queue_handle_primary(), diplomat_sabotage(), diplomat_sabotage_esc(), diplomat_steal(), diplomat_steal_esc(), do_attack(), do_that_action(), find_best_city_placement(), finish_unit_waits(), fortify(), goto_tile_state(), handle_edit_unit(), handle_edit_unit_remove_by_id(), handle_player_diplstate(), handle_unit_action_answer(), handle_unit_action_query(), handle_unit_actions(), handle_unit_bombard_info(), handle_unit_combat_info(), handle_unit_get_actions(), handle_unit_packet_common(), handle_unit_remove(), handle_unit_rename(), hud_unit_combat::hud_unit_combat(), irrigate(), is_valid_goto_draw_line(), freeciv::upkeep_widget::item_double_clicked(), join_city(), link_mark_tile(), mine(), nuke(), nuke_city(), pillage(), pillage_something(), popup_action_selection(), popup_upgrade_dialog(), request_do_action(), road(), unit_list_widget::selected_playable_units(), send_goto_route(), choice_dialog::set_layout(), sg_load_player_units_transport(), mr_menu::slot_rename(), spy_embassy(), spy_investigate(), spy_nuke_city(), spy_nuke_city_esc(), spy_poison(), spy_poison_esc(), spy_request_sabotage_esc_list(), spy_request_sabotage_list(), spy_request_strike_bld_list(), spy_sabotage(), spy_steal_gold(), spy_steal_gold_esc(), spy_steal_maps(), spy_steal_maps_esc(), spy_steal_shared(), spy_steal_something(), suicide_attack(), text_tag_replace_text(), text_tag_start_sequence(), unit_home_city(), unit_is_alive(), unit_is_virtual(), unit_perform_action(), unit_recycle(), unit_survive_autoattack(), unit_upgrade(), unit_wait_destroy(), choice_dialog::update_dialog(), user_action_unit_vs_city(), user_action_unit_vs_self(), user_action_unit_vs_tile(), and user_action_unit_vs_unit().

◆ generate_save_name()

int generate_save_name ( const char *  format,
char *  buf,
int  buflen,
const char *  reason 
)

Generate a default save file name and place it in the provided buffer.

Within the name the following custom formats are allowed:

R = [reason] S = [suffix] T = [game.info.turn] Y = [game.info.year]

Examples: 'freeciv-T%04T-Y%+04Y-R' => 'freeciv-T0099-Y-0050-manual' => 'freeciv-T0100-Y00001-auto'

Returns the number of characters written, or the number of characters that would have been written if truncation occurs.

NB: If you change the format definition, be sure to update the above function comment and the help text for the 'savename' setting.

Definition at line 756 of file game.cpp.

Referenced by mapimg_colortest(), mapimg_create(), save_game(), save_game_auto(), and savename_validate().

◆ i_am_client()

void i_am_client ( )

Set program type to client.

Definition at line 67 of file game.cpp.

Referenced by client_main().

◆ i_am_server()

void i_am_server ( )

Set program type to server.

Definition at line 62 of file game.cpp.

Referenced by i_am_tool(), and srv_init().

◆ initialize_globals()

void initialize_globals ( )

Initialize wonder information.

Definition at line 640 of file game.cpp.

Referenced by sg_load_players().

◆ is_player_phase()

bool is_player_phase ( const struct player pplayer,
int  phase 
)

Return TRUE if it is this player's phase.

NB: The meaning of the 'phase' argument must match its use in the function begin_turn() in server/srv_main.c. NB: The phase mode PMT_TEAMS_ALTERNATE assumes that every player is on a team, i.e. that pplayer->team is never nullptr.

Definition at line 672 of file game.cpp.

Referenced by begin_phase(), blink_turn_done_button(), can_end_turn(), handle_start_phase(), handle_unit_orders(), handle_unit_packet_common(), player_set_to_ai_mode(), plrdlg_col_state(), and unit_focus_advance().

◆ is_server()

◆ population_to_text()

const char* population_to_text ( int  thousand_citizen)

Return a prettily formatted string containing the population text.

The population is passed in as the number of citizens, in unit (tens/hundreds/thousands...) defined in cities.ruleset.

Definition at line 699 of file game.cpp.

Referenced by get_info_label_text(), get_info_label_text_popup(), show_new_turn_info(), and city_dialog::update_title().

◆ user_flag_free()

void user_flag_free ( struct user_flag flag)

◆ user_flag_init()

void user_flag_init ( struct user_flag flag)

◆ year_suffix()

static char* year_suffix ( )
static

Return a string containing the save year.

Definition at line 710 of file game.cpp.

Referenced by generate_save_name().

Variable Documentation

◆ am_i_server

bool am_i_server = false

Definition at line 50 of file game.cpp.

Referenced by i_am_client(), i_am_server(), and is_server().

◆ game

struct civ_game game

Definition at line 1 of file game.cpp.

Referenced by a_connection_exists(), freeciv::server::accept_tcp_connections(), access_level_for_next_connection(), achievement_by_number(), action_not_enabled_reason(), action_target_neg_util(), tab_extras::add_now(), tab_good::add_now(), tab_gov::add_now(), tab_multiplier::add_now(), tab_tech::add_now(), tab_terrains::add_now(), tab_unit::add_now(), tab_building::add_now2(), add_tax_income(), adjust_improvement_wants_by_effects(), adv_best_government(), advance_array_last(), advance_by_number(), advance_count(), ai_traits_init(), aifill(), diplo_wdg::all_advances(), announce_player(), api_edit_give_technology(), api_luadata_get_str(), api_methods_city_inspire_partisans(), api_methods_game_ruleset_name(), api_methods_game_rulesetdir(), api_methods_game_turn(), api_methods_game_turn_deprecated(), api_methods_game_year(), api_methods_game_year_fragment(), assign_player_colors(), freeciv::path_finder::path_finder_private::attempt_paradrop(), auto_settlers_player(), autosaves_callback(), autotoggle_action(), away_command(), base_city_celebrating(), base_count(), base_want(), basic_city_style_for_style(), freeciv::server::begin_phase(), begin_phase(), begin_turn(), blink_turn_done_button(), boot_help_texts(), broadcast_city_info(), build_free_small_wonders(), build_landarea_map(), calendar_text(), can_cities_trade(), can_conn_edit(), can_conn_edit_players_nation(), can_end_turn(), can_exist_at_tile(), can_player_build_unit_direct(), can_unit_move_now(), chat_msg_to_all(), chat_msg_to_global_observers(), check_city_migrations(), check_city_migrations_player(), check_disasters(), check_for_full_turn_done(), check_for_game_over(), check_leaving_edit_mode(), check_terrain_change(), choice_is_promising(), choose_tech(), choose_tech_to_steal(), citizen_convert_check(), citizen_happiness_nationality(), citizen_luxury_happy(), citizens_convert(), citizens_convert_conquest(), citizens_count(), citizens_init(), citizens_nation_add(), citizens_nation_get(), citizens_nation_set(), citizens_print(), citizens_update(), city_add_improvement(), city_build_building(), city_build_free_buildings(), city_build_unit(), city_built_last_turn(), city_can_buy(), city_create_unit(), city_desirability(), city_did_prod_change(), city_distribute_surplus_shields(), city_from_great_wonder(), city_gold_worth(), city_granary_size(), city_had_recent_plague(), city_handle_plague_risk(), city_happy(), city_history_gain(), city_illness_calc(), city_illness_strike(), city_incite_cost(), city_increase_size(), city_map_update_radius_sq(), city_migration_score(), city_name_suggestion(), city_pollution_types(), city_populate(), city_rapture_grow(), city_style(), city_style_by_rule_name(), city_styles_alloc(), city_styles_free(), city_support(), city_tile_output(), city_waste(), citymindist_prevents_city_on_tile(), cityresult_fill(), civil_war(), civil_war_possible(), civil_war_triggered(), clause_enabled(), clear_worker_task(), client_can_pick_nation(), client_exit(), client_game_free(), client_main(), client_remove_all_cli_conn(), client_remove_cli_conn(), close_connection(), close_connections_and_socket(), cmd_of_level(), cmd_reply_line(), cmdlevel_arg2_generator(), cmdlevel_command(), combat_veterans(), conn_by_number(), conn_by_user(), conn_by_user_prefix(), conn_is_kicked(), connection_accessor(), connection_attach_real(), connection_detach(), connection_generator(), connection_name_accessor(), contemplate_new_city(), count_voters(), cr_entry_plague_risk(), gov_menu::create(), create_animals(), create_barbarian_player(), create_city(), create_city_virtual(), create_event(), current_nationset(), current_turn_timeout(), dai_build_adv_adjust(), dai_calc_data(), dai_choose_diplomat_offensive(), dai_diplomacy_actions(), dai_effect_value(), dai_go_to_war(), dai_goldequiv_clause(), dai_goldequiv_tech(), dai_is_unit_tired_waiting_boat(), dai_manage_cities(), dai_manage_government(), dai_manage_taxes(), dai_military_rampage(), dai_share(), dai_tech_base_want(), dai_treaty_evaluate(), debug_command(), destroy_extra(), diplo_wdg::diplo_wdg(), diplomacy_possible(), diplomat_bribe(), diplomat_escape_full(), diplomat_get_tech(), diplomat_may_lose_gold(), disaster_by_number(), do_airline(), do_attack(), do_border_vision_effect(), do_capture_units(), do_city_migration(), do_nuke_tile(), do_paradrop(), do_tech_parasite_effect(), do_unit_establish_trade(), domestic_advisor_choose_build(), edithand_send_initial_packets(), editor_tool_is_usable(), end_command(), freeciv::server::end_phase(), freeciv::server::end_turn(), end_turn(), endturn_callback(), freeciv::server::error_on_socket(), establish_new_connection(), evaluate_city_name_priority(), event_cache_add_for_all(), event_cache_add_for_global_observers(), event_cache_add_for_player(), event_cache_add_for_players(), event_cache_data_new(), event_cache_match(), event_cache_remove_old(), extra_count(), extras_free(), freeciv::layer_grid::fill_sprite_array(), freeciv::layer_overlays::fill_sprite_array(), final_ruleset_adjustments(), find_city_or_settler_near_tile(), find_dispersed_position(), first_timeout_action(), fit_nationset_to_players(), food_starvation(), found_new_tech(), game_advance_year(), game_defaults(), game_map_init(), game_next_year(), game_remove_unit(), game_ruleset_free(), game_ruleset_init(), game_was_started(), generate_save_name(), generator_validate(), get_airlift_text(), get_caravan_enter_city_trade_bonus(), get_city_dialog_airlift_text(), get_city_dialog_airlift_value(), get_city_dialog_illness_text(), get_economy_report_data(), get_entertainers(), get_info_label_text(), get_info_label_text_popup(), get_meta_type_string(), get_settlers(), get_tax_rates(), get_trade_illness(), get_user_meta_message_string(), give_immediate_free_tech(), give_initial_techs(), give_midgame_initial_units(), global_warming_scaled(), goods_by_number(), government_by_number(), government_change(), government_count(), governments_alloc(), governments_free(), great_wonder_is_available(), great_wonder_is_built(), great_wonder_is_destroyed(), great_wonder_owner(), handle_achievement_info(), handle_calendar_info(), handle_city_info(), handle_city_short_info(), handle_conn_info(), handle_diplomacy_accept_treaty_req(), handle_edit_city(), handle_edit_city_create(), handle_edit_game(), handle_edit_mode(), handle_edit_player(), handle_edit_player_create(), handle_edit_player_vision(), handle_edit_scenario_desc(), handle_edit_startpos(), handle_edit_startpos_full(), handle_edit_tile_extra(), handle_edit_tile_terrain(), handle_edit_toggle_fogofwar(), handle_edit_unit_create(), handle_end_phase(), handle_end_turn(), handle_event(), handle_game_info(), handle_game_load(), handle_login_request(), handle_nation_availability(), handle_nation_select_req(), handle_new_year(), handle_player_change_government(), handle_player_info(), handle_player_phase_done(), handle_ruleset_city(), handle_ruleset_control(), handle_ruleset_description_part(), handle_ruleset_game(), handle_ruleset_music(), handle_ruleset_summary(), handle_ruleset_tech(), handle_rulesets_ready(), handle_save_scenario(), handle_scenario_description(), handle_scenario_info(), handle_set_topology(), handle_spaceship_launch(), handle_start_phase(), handle_stdin_input_real(), handle_tile_info(), handle_timeout_info(), handle_unit_change_activity(), handle_unit_orders(), handle_unit_packet_common(), helptext_advance(), helptext_building(), helptext_extra(), helptext_government(), helptext_nation(), helptext_unit(), historian_generic(), img_createmap(), img_new(), impr_base_build_shield_cost(), impr_build_shield_cost(), impr_estimate_build_shield_cost(), impr_sell_gold(), improvement_array_first(), improvement_array_last(), improvement_count(), increase_timeout_because_unit_moved(), init_connections(), init_game_seed(), init_government_of_nation(), init_new_game(), init_tech(), initialize_globals(), freeciv::server::input_on_socket(), insert_generated_text(), is_allowed_city_name(), is_allowed_to_take(), is_plain_public_message(), is_player_phase(), is_req_active(), is_req_unchanging(), is_stack_vulnerable(), is_tired_attack(), is_universal_needed(), is_valid_start_pos(), kick_command(), kill_player(), kill_unit(), kills_citizen_after_attack(), ruledit_gui::launch_now(), load_building_names(), load_city_name_list(), load_command(), load_game_names(), load_government_names(), load_nation_names(), load_ruleset_cities(), load_ruleset_game(), load_ruleset_governments(), load_ruleset_nations(), load_ruleset_styles(), load_ruleset_techs(), load_ruleset_terrain(), load_ruleset_units(), load_rulesetdir(), load_rulesets(), load_style_names(), load_tech_names(), load_terrain_names(), load_unit_names(), log_civ_score_now(), lookup_option_level(), lose_tech(), lost_connection_to_client(), lsend_vote_new(), lsend_vote_remove(), lsend_vote_resolve(), lsend_vote_update(), main(), make_contact(), make_history_report(), manual_command(), map_calculate_borders(), map_change_seen(), map_claim_base(), map_claim_border(), map_claim_border_ownership(), map_update_border(), mapimg_command(), mapimg_create(), min_food_surplus_for_fastest_growth(), multiplier_by_number(), multiplier_count(), music_style_by_number(), name_and_sort_items(), nation_by_number(), nation_has_initial_tech(), nation_history_gain(), nations_alloc(), nations_free(), nationset_action(), notify_conn(), notify_conn_early(), notify_conn_packet(), notify_team(), nuclear_winter_scaled(), package_and_send_worker_tasks(), package_city(), package_event_full(), package_player_info(), package_unit(), pf_attack_possible(), phasemode_help(), pick_a_nation(), pick_free_tech(), pick_random_tech_to_lose(), place_starting_unit(), player_angry_citizens(), player_can_place_extra(), player_color_changeable(), player_get_expected_income(), player_has_really_useful_tech_parasite(), player_info_thaw(), player_limit_to_max_rates(), player_mood(), player_preferred_color(), player_restore_units(), player_set_to_ai_mode(), player_set_under_human_control(), player_tech_upkeep(), player_tile_init(), player_update_last_war_action(), playercolor_add(), playercolor_count(), playercolor_free(), playercolor_get(), playercolor_init(), playernation_command(), plrdlg_col_state(), population_to_text(), popup_info_text(), popup_musicset_suggestion_dialog(), popup_soundset_suggestion_dialog(), popup_tileset_suggestion_dialog(), freeciv::server::prepare_game(), freeciv::server::pulse(), freeciv::server::quit_idle(), rank_users(), raze_city(), real_menus_init(), real_science_report_dialog_update(), real_timer_callback(), really_close_connections(), really_handle_city_buy(), tab_misc::refresh(), tab_misc::refresh_stats(), reload_rulesets_settings(), remove_city(), remove_player_command(), remove_player_from_maps(), report_demographics(), report_final_scores(), request_unit_pillage(), research_apply_penalty(), research_get(), research_goal_bulbs_required(), research_is_valid(), research_name_translation(), research_pretty_name(), research_rule_name(), research_tech_lost(), research_total_bulbs_required(), researches_init(), reset_all_start_commands(), reset_command(), restrict_infra(), gov_menu::revolution(), revolution_length(), road_count(), rs_max_city_radius_sq(), sanity_check_metadata(), sanity_check_req_individual(), sanity_check_ruleset_data(), save_cities_ruleset(), save_game(), save_game_auto(), save_game_ruleset(), save_governments_ruleset(), mr_menu::save_image(), save_luadata(), save_nation(), save_nations_ruleset(), tab_misc::save_now(), save_styles_ruleset(), save_techs_ruleset(), save_units_ruleset(), scan_score_log(), science_dialog_text(), see_combat_unit(), sell_random_unit(), send_all_known_tiles(), send_bombardment(), send_city_info(), send_city_info_at_tile(), send_city_turn_notifications(), send_combat(), send_conn_info_arg(), send_current_history_report(), send_delegation_info(), send_game_info(), send_nation_availability_real(), send_packet_data(), send_pending_events(), freeciv::server::send_pings(), send_player_diplstate_c_real(), send_player_info_c_real(), send_player_remove_info_c(), send_research_info(), send_ruleset_cities(), send_ruleset_control(), send_ruleset_game(), send_ruleset_governments(), send_scenario_description(), send_scenario_info(), send_server_setting(), send_spaceship_info(), send_tile_info(), send_to_metaserver(), send_turn_done(), send_unit_info(), send_updated_vote_totals(), send_year_to_clients(), server_game_init(), server_make_connection(), server_quit(), server_remove_unit_full(), set_ai_level(), set_command(), set_default_city_manager(), set_rulesetdir(), set_user_meta_message_string(), setting_is_free_to_change(), settings_game_load(), settings_game_reset(), settings_game_save(), settings_game_start(), settler_map_iterate(), sg_load_game(), sg_load_history(), sg_load_map(), sg_load_map_owner(), sg_load_map_startpos(), sg_load_map_tiles_extras(), sg_load_map_tiles_resources(), sg_load_player_cities(), sg_load_player_city(), sg_load_player_city_citizens(), sg_load_player_main(), sg_load_player_unit(), sg_load_player_vision(), sg_load_players(), sg_load_players_basic(), sg_load_random(), sg_load_researches(), sg_load_ruleset(), sg_load_sanitycheck(), sg_load_savefile(), sg_load_scenario(), sg_load_settings(), sg_save_game(), sg_save_history(), sg_save_map(), sg_save_map_known(), sg_save_map_startpos(), sg_save_map_tiles_extras(), sg_save_player_cities(), sg_save_player_units(), sg_save_player_vision(), sg_save_random(), sg_save_researches(), sg_save_savefile(), sg_save_scenario(), show_connections(), diplo_wdg::show_menu(), show_new_turn_info(), show_players(), show_ruleset_info(), show_settings(), freeciv::server::shut_game_down(), signal_handler(), page_pregame::slot_pregame_observe(), spaceship_calc_derived(), specialist_by_number(), specialist_count(), split_player(), spy_nuke_city(), spy_poison(), spy_steal_shared(), spy_steal_some_maps(), srv_init(), srv_ready(), srv_scores(), start_command(), start_game(), page_pregame::start_page_menu(), start_revolution(), start_turn_change_wait(), steal_a_tech(), style_by_number(), suggest_tech_exchange(), summon_barbarians(), surrender_command(), take_command(), tdc_plr_get(), tech_class_by_number(), tech_class_by_rule_name(), tech_transfer(), techs_have_fixed_costs(), techs_precalc_data(), terrain_array_first(), terrain_array_last(), terrain_by_number(), terrain_count(), text_happiness_cities(), text_happiness_luxuries(), text_happiness_nationality(), textcalfrag(), textyear(), tile_border_source_radius_sq(), tile_border_source_strength(), tile_data_cache_new(), tile_set_owner(), tileset_setup_nation_flag(), tilespec_reread(), timeout_action(), timeout_callback(), timeout_set_command(), timeout_show_command(), timing_log_real(), toggle_ai_command(), toggle_ai_player_direct(), topology_action(), trade_base_between_cities(), transfer_city(), transform_unit(), try_summon_barbarians(), turns_to_tech_loss(), uclass_by_number(), uclass_count(), unit_being_aggressive(), unit_bribe_cost(), unit_can_do_action_now(), unit_change_owner(), unit_class_array_first(), unit_class_array_last(), unit_description(), unit_did_action(), unit_focus_advance(), unit_get_goods(), unit_move(), unit_move_consequences(), unit_nuke(), unit_order_list_is_sane(), unit_restore_hitpoints(), unit_survive_autoattack(), unit_type_array_first(), unit_type_array_last(), unit_virtual_create(), units_contain_cityfounder(), unitwaittime_callback(), universal_value_initial(), unleash_barbarians(), untargeted_revolution_allowed(), gov_menu::update(), update_bulbs(), page_pregame::update_buttons(), update_city_activities(), update_city_activity(), chat_input::update_completion(), update_diplomatics(), freeciv::server::update_game_state(), city_info::update_labels(), update_player_tile_last_seen(), update_revolution(), page_pregame::update_start_page(), update_tile_knowledge(), update_timeout(), turn_done_button::update_timeout_label(), update_unit_activity(), pageGame::updateInfoLabelTimeout(), utype_build_shield_cost(), utype_build_shield_cost_base(), utype_by_number(), utype_count(), utype_is_cityfounder(), utype_veteran_system(), victory_enabled(), wakeup_neighbor_sentries(), wonder_built(), wonder_destroyed(), wonder_is_built(), wonder_set_build_turn(), write_init_script(), and year_suffix().

◆ wld

struct world wld

Definition at line 1 of file game.cpp.

Referenced by achievement_check(), act_sel_keep_moving(), action_not_enabled_reason(), add_resources(), adjust_terrain_param(), adv_could_be_my_zoc(), adv_could_unit_move_to_tile(), adv_danger_at(), adv_data_get(), adv_data_phase_init(), adv_settlers_road_bonus(), adv_unit_move(), chat_widget::anchor_clicked(), api_edit_create_unit_full(), api_edit_unit_teleport(), api_find_city(), api_find_tile(), api_find_tile_by_index(), api_find_unit(), api_methods_private_tile_for_outward_index(), api_methods_private_tile_next_outward_index(), api_methods_unit_type_can_exist_at_tile(), are_road_reqs_fulfilled(), area_is_too_flat(), assess_danger_unit(), assign_continent_flood(), assign_continent_numbers(), attack(), freeciv::path_finder::path_finder_private::attempt_action_move(), freeciv::path_finder::path_finder_private::attempt_load(), freeciv::path_finder::path_finder_private::attempt_move(), freeciv::path_finder::path_finder_private::attempt_paradrop(), freeciv::path_finder::path_finder_private::attempt_unload(), auto_settlers_player(), base(), base_map_distance_vector(), base_native_pos_to_tile(), begin_phase(), bounce_units_on_terrain_change(), build_landarea_map(), build_tile_data(), cai_split_by_civil_war(), calculate_overview_dimensions(), calculate_want_for_paratrooper(), can_city_build_unit_direct(), can_city_build_unit_later(), can_unit_do_activity_targeted_at(), can_unit_move_to_tile_with_notify(), canvas_pos_to_nearest_tile(), canvas_pos_to_tile(), center_on_something(), check_city_migrations_player(), check_native_area(), check_terrain_change(), check_units_single_tile(), city_can_be_built_here(), city_desirability(), city_landlocked_sell_coastal_improvements(), city_map_to_tile(), city_waste(), citymindist_prevents_city_on_tile(), clean_fallout(), clean_pollution(), client_city_tile(), client_remove_city(), client_remove_unit(), climate_change(), compat_load_020600(), count_card_adjc_elevated_tiles(), count_river_near_tile(), count_river_type_near_tile(), count_river_type_tile_card(), count_terrain_class_near_tile(), count_terrain_flag_near_tile(), count_terrain_property_near_tile(), create_animals(), create_barbarian_player(), create_city(), create_island(), create_start_positions(), create_tmap(), create_unit_full(), dai_action_value_unit_vs_city(), dai_consider_tile_dangerous(), dai_diplomat_bribe_nearby(), dai_do_first_activities(), dai_effect_value(), dai_gained_control(), dai_manage_barbarian_leader(), dai_manage_cities(), dai_military_attack_barbarian(), dai_plr_data_get(), dai_unit_attack(), dai_unit_move(), debug_command(), diplomat_bribe(), diplomat_charge_movement(), disable_fog_of_war_player(), do_attack(), do_disembark(), do_nuclear_explosion(), do_paradrop(), do_team_placement(), do_that_action(), do_unit_conquer_city(), do_unit_embark(), edit_buffer_copy_square(), edit_buffer_paste(), edithand_send_initial_packets(), editor_get_selection_center(), enable_fog_of_war_player(), end_turn(), enter_war(), establish_new_connection(), event_cache_load(), event_cache_save(), execute_orders(), explain_why_no_action_enabled(), explorer_desirable(), fair_map_copy(), fair_map_island_new(), fair_map_make_huts(), fair_map_make_resources(), fair_map_place_island_team(), fair_map_pos_tile(), fair_map_tile_border(), freeciv::layer_terrain::fill_blending_sprite_array(), freeciv::layer_darkness::fill_sprite_array(), find_a_good_partisan_spot(), find_beachhead(), find_best_focus_candidate(), find_best_tile_to_paradrop_to(), find_closest_city(), find_dispersed_position(), find_empty_tile_nearby(), fmfill(), found_new_tech(), game_city_by_number(), game_free(), game_init(), game_reset(), game_unit_by_number(), gen5rec(), generate_map_indices(), generate_players(), generator_init_topology(), get_defender(), get_mapview_scroll_window(), get_modified_firepower(), get_random_map_position_from_state(), get_virtual_defense_power(), give_distorted_map(), give_map_from_player_to_player(), give_seamap_from_player_to_player(), give_shared_vision(), handle_chat_msg(), handle_city_info(), handle_city_make_specialist(), handle_city_make_worker(), handle_city_short_info(), handle_early_chat_msg(), handle_edit_city_create(), handle_edit_player_vision(), handle_edit_startpos(), handle_edit_startpos_full(), handle_edit_tile(), handle_edit_tile_extra(), handle_edit_tile_terrain(), handle_edit_unit_create(), handle_edit_unit_remove(), handle_map_info(), handle_nuke_tile_info(), handle_player_diplstate(), handle_set_topology(), handle_tile_info(), handle_unit_actions(), handle_unit_bombard_info(), handle_unit_get_actions(), handle_unit_orders(), handle_unit_packet_common(), handle_unit_sscs_set(), handle_worker_task(), hmap_pole_factor(), huts_action(), huts_help(), illegal_action_msg(), img_createmap(), init_new_game(), initialize_isle_data(), initworld(), invasion_funct(), irrigate(), is_base_flag_card_near(), is_base_flag_near_tile(), is_border_tile(), is_city_channel_tile(), is_city_surrounded_by_our_spies(), is_claimable_ocean(), is_extra_card_near(), is_extra_flag_card_near(), is_extra_flag_near_tile(), is_extra_near_tile(), is_friendly_city_near(), is_my_turn(), is_native_move(), is_near_land(), is_normal_map_pos(), is_req_knowable(), is_resource_close(), is_road_flag_card_near(), is_road_flag_near_tile(), is_square_threatened(), is_temperature_type_near(), is_terrain_card_near(), is_terrain_class_card_near(), is_terrain_class_near_tile(), is_terrain_flag_card_near(), is_terrain_flag_near_tile(), is_terrain_near_tile(), is_tile_seen_adj(), is_tile_seen_cadj(), is_tiny_island(), is_unit_being_refueled(), is_valid_goto_draw_line(), is_valid_start_pos(), kill_player(), kill_unit(), likely_native(), link_mark_tile(), load_ruleset_terrain(), local_ave_elevation(), main_map_allocate(), main_map_free(), make_fracture_hmap(), make_fracture_relief(), make_island(), make_land(), make_path_orders(), make_plains(), make_polar(), make_polar_land(), make_pseudofractal_hmap(), make_random_hmap(), make_relief(), make_river(), make_rivers(), make_terrains(), map_calculate_borders(), map_claim_border(), map_clear_border(), map_colatitude(), map_generate(), map_generate_island(), map_generate_island_2or3(), map_generate_island_single(), map_generate_island_variable(), map_init_topology(), map_is_empty(), map_know_and_see_all(), map_num_tiles(), map_set_border_vision(), map_show_all(), map_show_circle(), map_startpos_count(), map_startpos_get(), map_startpos_new(), map_startpos_remove(), map_update_border(), map_vision_update(), mapdeco_add_gotoline(), mapdeco_clear_gotoroutes(), mapdeco_set_gotoroute(), mapimg_create(), mapsize_callback(), mapstep(), maybe_cancel_patrol_due_to_enemy(), maybe_make_contact(), mine(), most_adjacent_ocean_type(), minimap_view::mousePressEvent(), move_unit_map_canvas(), near_safe_tiles(), nearest_real_tile(), freeciv::gui_rect_iterator::next(), normalize_gui_pos(), normalize_hmap_poles(), notify_conn_packet(), nuke(), ocean_to_land_fix_rivers(), ok_for_separate_poles(), overview_to_map_pos(), packhand_free(), pft_fill_default_parameter(), pft_fill_reverse_parameter(), pillage(), pixel_border_hexa(), pixel_border_isohexa(), pixel_border_rect(), place_animal(), place_island(), place_starting_unit(), place_terrain(), player_city_by_number(), player_clear(), player_map_free(), player_map_init(), player_unit_by_number(), popup_action_selection(), popup_newcity_dialog(), print_mapgen_map(), process_attacker_want(), rand_map_pos(), rand_map_pos_characteristic(), rand_map_pos_filtered(), freeciv::refuel_destination::reached(), real_distance_to_land(), really_give_map_from_player_to_player(), recalculate_lake_surrounders(), refresh_overview_canvas(), regenerate_lakes(), reinforcements_cost_and_value(), remove_city(), remove_player_from_maps(), remove_shared_vision(), remove_tiny_islands(), renormalize_hmap_poles(), request_move_unit_direction(), request_unit_non_action_move(), request_unit_unload(), resolve_stack_conflicts(), river_blockmark(), river_test_adjacent_highlands(), river_test_adjacent_swamp(), river_test_blocked(), road(), mr_menu::save_image(), save_terrain_ruleset(), sdi_try_defend(), send_all_known_cities(), send_all_known_tiles(), send_map_info(), send_to_metaserver(), server_remove_unit_full(), set_all_ocean_tiles_placed(), set_placed_near_pos(), set_sizes(), sg_extras_set(), sg_load_map(), sg_load_map_known(), sg_load_map_owner(), sg_load_map_startpos(), sg_load_map_tiles(), sg_load_map_tiles_extras(), sg_load_map_tiles_resources(), sg_load_map_worked(), sg_load_player_cities(), sg_load_player_city(), sg_load_player_unit(), sg_load_player_units(), sg_load_player_vision(), sg_load_player_vision_city(), sg_load_sanitycheck(), sg_save_map(), sg_save_map_known(), sg_save_map_owner(), sg_save_map_startpos(), sg_save_map_tiles(), sg_save_map_worked(), sg_save_player_vision(), sg_save_settings(), sg_special_set(), mr_menu::slot_execute_orders(), smooth_int_map(), smooth_water_depth(), srv_ready(), suicide_attack(), terrain_is_too_high(), texai_whole_map_copy(), text_tag_init_from_sequence(), text_tag_start_sequence(), texwai_split_by_civil_war(), throw_units_from_illegal_cities(), tile_virtual_check(), tilespec_reread(), tilespec_reread_callback(), topology_callback(), trade_base_between_cities(), transfer_unit(), try_summon_barbarians(), twai_split_by_civil_war(), unit_activities_cancel_all_illegal_area(), unit_bombard(), unit_can_be_retired(), unit_can_convert(), unit_move(), unit_move_handling(), unit_order_list_is_sane(), unit_ordering_apply(), unit_ordering_calc(), unit_perform_action(), unit_survive_autoattack(), units_can_unload(), unleash_barbarians(), unpackage_short_unit(), unpackage_unit(), unit_actions::update_actions(), update_environmental_upset(), update_map_canvas(), update_nations_with_startpos(), upgrade_unit_order_targets(), user_action_unit_vs_tile(), utype_pays_mp_for_action_estimate(), wakeup_neighbor_sentries(), wipe_unit_full(), xsize_callback(), and ysize_callback().