Freeciv21
Develop your civilization from humble roots to a global empire
client_main.cpp File Reference
#include <fc_config.h>
#include <cmath>
#include <csignal>
#include <QApplication>
#include <QBitArray>
#include <QCommandLineParser>
#include <QElapsedTimer>
#include <QGlobalStatic>
#include <QTimer>
#include <QUrl>
#include "capstr.h"
#include "dataio.h"
#include "deprecations.h"
#include "fcbacktrace.h"
#include "fciconv.h"
#include "fcintl.h"
#include "log.h"
#include "rand.h"
#include "ai.h"
#include "diptreaty.h"
#include "fc_interface.h"
#include "game.h"
#include "helpdata.h"
#include "net_types.h"
#include "packets.h"
#include "player.h"
#include "research.h"
#include "server_settings.h"
#include "version.h"
#include "dialogs_g.h"
#include "diplodlg_g.h"
#include "gui_main_g.h"
#include "mapctrl_g.h"
#include "mapview_g.h"
#include "menu_g.h"
#include "pages_g.h"
#include "voteinfo_bar_g.h"
#include "attribute.h"
#include "audio/audio.h"
#include "chatline_common.h"
#include "climisc.h"
#include "clinet.h"
#include "connectdlg_common.h"
#include "control.h"
#include "editor.h"
#include "fonts.h"
#include "global_worklist.h"
#include "governor.h"
#include "helpdlg.h"
#include "messagewin_common.h"
#include "minimap_panel.h"
#include "music.h"
#include "options.h"
#include "overview_common.h"
#include "packhand.h"
#include "qtg_cxxside.h"
#include "themes_common.h"
#include "tileset/tilespec.h"
#include "update_queue.h"
#include "views/view_cities_data.h"
#include "views/view_map_common.h"
#include "views/view_nations_data.h"
#include "voteinfo.h"
#include "script_client.h"
#include "client_main.h"
#include "packhand_gen.h"

Go to the source code of this file.

Functions

static enum known_type mapimg_client_tile_known (const struct tile *ptile, const struct player *pplayer, bool knowledge)
 Helper function for the mapimg module - tile knowledge. More...
 
static struct terrainmapimg_client_tile_terrain (const struct tile *ptile, const struct player *pplayer, bool knowledge)
 Helper function for the mapimg module - tile terrain. More...
 
static struct playermapimg_client_tile_owner (const struct tile *ptile, const struct player *pplayer, bool knowledge)
 Helper function for the mapimg module - tile owner. More...
 
static struct playermapimg_client_tile_city (const struct tile *ptile, const struct player *pplayer, bool knowledge)
 Helper function for the mapimg module - city owner. More...
 
static struct playermapimg_client_tile_unit (const struct tile *ptile, const struct player *pplayer, bool knowledge)
 Helper function for the mapimg module - unit owner. More...
 
static int mapimg_client_plrcolor_count ()
 Helper function for the mapimg module - number of player colors. More...
 
static struct rgbcolormapimg_client_plrcolor_get (int i)
 Helper function for the mapimg module - one player color. More...
 
static void fc_interface_init_client ()
 Initialize client specific functions. More...
 
static char * put_conv (const char *src, size_t *length)
 Convert a text string from the internal to the data encoding, when it is written to the network. More...
 
static bool get_conv (char *dst, size_t ndst, const char *src, size_t nsrc)
 Convert a text string from the data to the internal encoding when it is first read from the network. More...
 
static void charsets_init ()
 Set up charsets for the client. More...
 
static void emergency_exit ()
 This is called at program exit in any emergency. More...
 
static void at_exit ()
 This is called at program exit. More...
 
static void client_game_init ()
 Called only by set_client_state() below. More...
 
static void client_game_free ()
 Called by set_client_state() and client_exit() below. More...
 
static void client_game_reset ()
 Called only by set_client_state() below. More...
 
int client_main (int argc, char *argv[])
 Entry point for common client code. More...
 
static void log_option_save_msg (QtMsgType lvl, const QString &msg)
 Write messages from option saving to the log. More...
 
void client_exit ()
 Main client execution stop function. More...
 
void client_packet_input (void *packet, int type)
 Handle packet received from server. More...
 
void user_ended_turn ()
 Handle user ending his/her turn. More...
 
void send_turn_done ()
 Send information about player having finished his/her turn to server. More...
 
void send_report_request (enum report_type type)
 Send request for some report to server. More...
 
void set_client_state (enum client_states newstate)
 Change client state. More...
 
enum client_states client_state ()
 Return current client state. More...
 
void client_remove_cli_conn (struct connection *pconn)
 Remove pconn from all connection lists in client, then free it. More...
 
void client_remove_all_cli_conn ()
 Remove (and free) all connections from all connection lists in client. More...
 
QUrl & client_url ()
 Returns the URL that this client connects to. More...
 
void send_attribute_block_request ()
 Send attribute block. More...
 
bool client_is_observer ()
 Returns whether client is observer. More...
 
void set_miliseconds_to_turndone (int miliseconds)
 Reset the number of seconds to turndone from an "authentic" source. More...
 
bool is_waiting_turn_change ()
 Are we in turn-change wait state? More...
 
void start_turn_change_wait ()
 Start waiting of the server turn change activities. More...
 
void stop_turn_change_wait ()
 Server is responsive again. More...
 
int get_seconds_to_turndone ()
 Return the number of seconds until turn-done. More...
 
int get_seconds_to_new_turn ()
 Return the number of seconds until turn-done. More...
 
double real_timer_callback ()
 This function should be called at least once per second. More...
 
bool can_client_control ()
 Returns TRUE iff the client can control player. More...
 
bool can_client_issue_orders ()
 Returns TRUE iff the client can issue orders (such as giving unit commands). More...
 
bool can_meet_with_player (const struct player *pplayer)
 Returns TRUE iff the client can do diplomatic meetings with another given player. More...
 
bool can_client_change_view ()
 Return TRUE if the client can change the view; i.e. More...
 
void set_server_busy (bool busy)
 Sets if server is considered busy. More...
 
bool is_server_busy ()
 Returns if server is considered busy at the moment. More...
 
bool client_is_global_observer ()
 Returns whether client is global observer. More...
 
int client_player_number ()
 Returns number of player attached to client. More...
 
bool client_has_player ()
 Either controlling or observing. More...
 
struct playerclient_player ()
 Either controlling or observing. More...
 
bool client_map_is_known_and_seen (const struct tile *ptile, const struct player *pplayer, enum vision_layer vlayer)
 Return the vision of the player on a tile. More...
 
static int client_plr_tile_city_id_get (const struct tile *ptile, const struct player *pplayer)
 Returns the id of the city the player believes exists at 'ptile'. More...
 
static server_setting_id client_ss_by_name (const char *name)
 Returns the id of the server setting with the specified name. More...
 
static const char * client_ss_name_get (server_setting_id id)
 Returns the name of the server setting with the specified id. More...
 
static enum sset_type client_ss_type_get (server_setting_id id)
 Returns the type of the server setting with the specified id. More...
 
static bool client_ss_val_bool_get (server_setting_id id)
 Returns the value of the boolean server setting with the specified id. More...
 
static int client_ss_val_int_get (server_setting_id id)
 Returns the value of the integer server setting with the specified id. More...
 
static unsigned int client_ss_val_bitwise_get (server_setting_id id)
 Returns the value of the bitwise server setting with the specified id. More...
 
bool is_client_quitting ()
 Is the client marked as one going down? More...
 
void start_quitting ()
 Mark client as one going to quit as soon as possible,. More...
 

Variables

QString logfile
 
QString scriptfile
 
QString savefile
 
QString forced_tileset_name
 
QString sound_plugin_name
 
QString sound_set_name
 
QString music_set_name
 
QString cmd_metaserver
 
bool auto_connect
 
bool auto_spawn = false
 
enum announce_type announce
 
struct civclient client
 
static enum client_states civclient_state = C_S_INITIAL
 
bool waiting_for_end_turn = false
 
static bool server_busy = false
 
static bool client_quitting = false
 
static bool waiting_turn_change = false
 
static int seconds_shown_to_turndone
 
static int seconds_shown_to_new_turn
 

Function Documentation

◆ at_exit()

static void at_exit ( )
static

This is called at program exit.

Definition at line 221 of file client_main.cpp.

Referenced by client_main().

◆ can_client_change_view()

◆ can_client_control()

bool can_client_control ( )

Returns TRUE iff the client can control player.

Definition at line 1146 of file client_main.cpp.

Referenced by can_client_issue_orders(), draw_calculated_trade_routes(), page_pregame::slot_pregame_start(), page_pregame::update_buttons(), and voteinfo_do_vote().

◆ can_client_issue_orders()

bool can_client_issue_orders ( )

Returns TRUE iff the client can issue orders (such as giving unit commands).

This function should be called each time before allowing the user to give an order.

Definition at line 1156 of file client_main.cpp.

Referenced by action_decision_request(), freeciv::improvement_seller::add_to_menu(), adjust_workers_button_pressed(), city_dialog::buy(), can_end_turn(), can_meet_with_player(), city_can_buy(), city_packet_common(), city_dialog::city_rename(), city_dialog::clear_worklist(), clipboard_copy_production(), clipboard_paste_production(), city_dialog::cma_double_clicked(), science_report::current_tech_changed(), disband_all_units(), city_widget::display_list_menu(), city_dialog::display_worklist_menu(), do_disband_alternative(), do_map_click(), science_report::goal_tech_changed(), handle_city_name_suggestion_info(), handle_city_sabotage_list(), diplo_dlg::init(), freeciv::upkeep_widget::item_double_clicked(), maybe_activate_keyboardless_goto(), mr_menu::menus_sensitive(), city_label::mousePressEvent(), plr_widget::mousePressEvent(), research_diagram::mousePressEvent(), freeciv::improvement_seller::operator()(), popup_multiplier_dialog(), science_report::push_research(), request_new_unit_activity_targeted(), request_orders_cleared(), request_unit_load(), request_unit_unload(), unit_list_widget::selected_playable_units(), sell_all_improvements(), set_government_choice(), spaceship_autoplace(), city_dialog::update_disabled(), city_dialog::update_prod_buttons(), plr_report::update_report(), upgrade_canvas_clipboard(), wakeup_button_pressed(), and wakeup_sentried_units().

◆ can_meet_with_player()

bool can_meet_with_player ( const struct player pplayer)

Returns TRUE iff the client can do diplomatic meetings with another given player.

Definition at line 1165 of file client_main.cpp.

Referenced by plr_report::update_report().

◆ charsets_init()

static void charsets_init ( )
static

Set up charsets for the client.

Definition at line 206 of file client_main.cpp.

Referenced by client_main().

◆ client_exit()

void client_exit ( )

Main client execution stop function.

This calls ui_exit() and not the other way around.

Definition at line 658 of file client_main.cpp.

Referenced by client_main().

◆ client_game_free()

static void client_game_free ( )
static

Called by set_client_state() and client_exit() below.

Definition at line 252 of file client_main.cpp.

Referenced by client_exit(), and client_state().

◆ client_game_init()

static void client_game_init ( )
static

Called only by set_client_state() below.

Definition at line 232 of file client_main.cpp.

Referenced by client_state().

◆ client_game_reset()

static void client_game_reset ( )
static

Called only by set_client_state() below.

Just free what is needed to change view (player target).

Definition at line 281 of file client_main.cpp.

Referenced by client_state().

◆ client_has_player()

◆ client_is_global_observer()

◆ client_is_observer()

◆ client_main()

int client_main ( int  argc,
char *  argv[] 
)

Entry point for common client code.

Definition at line 302 of file client_main.cpp.

Referenced by main().

◆ client_map_is_known_and_seen()

bool client_map_is_known_and_seen ( const struct tile ptile,
const struct player pplayer,
enum vision_layer  vlayer 
)

Return the vision of the player on a tile.

Client version of ./server/maphand/map_is_known_and_seen().

Definition at line 1236 of file client_main.cpp.

Referenced by fc_interface_init_client().

◆ client_packet_input()

void client_packet_input ( void *  packet,
int  type 
)

Handle packet received from server.

Definition at line 699 of file client_main.cpp.

Referenced by input_from_server().

◆ client_player()

struct player* client_player ( )

Either controlling or observing.

Definition at line 1230 of file client_main.cpp.

Referenced by trade_generator::add_tile(), diplo_wdg::all_advances(), attribute_flush(), attribute_restore(), city_dialog::buy(), center_next_enemy_city(), center_next_player_capital(), center_next_player_city(), center_on_something(), city_packet_common(), client_city_can_work_tile(), client_plr_tile_city_id_get(), client_remove_unit(), client_research_sprite(), client_state(), collect_eventually_buildable_targets(), collect_production_targets(), control_mouse_cursor(), cycle_enemy_units(), city_widget::display_list_menu(), do_disband_alternative(), draw_reqtree(), draw_trade_routes(), editor_apply_tool(), editor_grab_applied_player(), editor_grab_tool(), enter_goto_state(), freeciv::layer_grid::fill_sprite_array(), mr_menu::find_last_unit_pos(), find_nearest_unit(), get_act_sel_action_custom_text(), get_airlift_text(), get_bulbs_per_turn(), get_edge_type(), get_info_label_text_popup(), get_science_goal_text(), get_science_target_text(), get_units_upgrade_info(), get_units_view_data(), diplo_wdg::give_advance(), diplo_wdg::give_city(), handle_achievement_info(), handle_city_name_suggestion_info(), handle_city_sabotage_list(), handle_endgame_player(), handle_event(), handle_page_msg(), handle_player_attribute_chunk(), handle_player_diplstate(), handle_player_info(), handle_player_remove(), handle_research_info(), handle_spaceship_info(), handle_unit_action_answer(), handle_unit_packet_common(), handle_unit_remove(), unit_hud_selector::island_filter(), key_center_capital(), science_report::locate_goal(), science_report::locate_researching(), make_path_orders(), manual_turn_done_callback(), meswin_add(), research_diagram::mousePressEvent(), multipler_rates_dialog::multipler_rates_dialog(), plr_widget::nation_selected(), node_rectangle_minimum_size(), simple_citybar_painter::paint(), traditional_citybar_painter::paint(), polished_citybar_painter::paint(), pregame_options::pick_nation(), city_model::populate(), popup_bribe_dialog(), popup_incite_dialog(), popup_info_text(), science_report::push_research(), real_science_report_dialog_update(), request_units_return(), research_diagram::reset(), mr_menu::save_image(), science_dialog_text(), unit_hud_selector::select_units(), unit_list_widget::selected_playable_units(), send_rally_tile(), map_view::shortcut_pressed(), diplo_wdg::show_menu(), show_new_turn_info(), mr_menu::slot_execute_orders(), page_pregame::slot_pregame_start(), top_bar_right_click_science(), unit_hud_selector::uhs_select(), unit_description(), page_pregame::update_buttons(), pregame_options::update_buttons(), goto_dialog::update_dlg(), science_report::update_report(), plr_report::update_report(), pageGame::updateSidebarTooltips(), and units_view::upgrade_units().

◆ client_player_number()

int client_player_number ( )

Returns number of player attached to client.

Definition at line 1214 of file client_main.cpp.

Referenced by diplo_wdg::diplo_wdg(), and editor_apply_tool().

◆ client_plr_tile_city_id_get()

static int client_plr_tile_city_id_get ( const struct tile ptile,
const struct player pplayer 
)
static

Returns the id of the city the player believes exists at 'ptile'.

Definition at line 1246 of file client_main.cpp.

Referenced by fc_interface_init_client().

◆ client_remove_all_cli_conn()

void client_remove_all_cli_conn ( )

Remove (and free) all connections from all connection lists in client.

Assumes game.all_connections is properly maintained with all connections.

Definition at line 973 of file client_main.cpp.

Referenced by client_exit(), and client_state().

◆ client_remove_cli_conn()

void client_remove_cli_conn ( struct connection pconn)

Remove pconn from all connection lists in client, then free it.

Definition at line 955 of file client_main.cpp.

Referenced by client_remove_all_cli_conn(), and handle_conn_info().

◆ client_ss_by_name()

static server_setting_id client_ss_by_name ( const char *  name)
static

Returns the id of the server setting with the specified name.

Definition at line 1260 of file client_main.cpp.

Referenced by fc_interface_init_client().

◆ client_ss_name_get()

static const char* client_ss_name_get ( server_setting_id  id)
static

Returns the name of the server setting with the specified id.

Definition at line 1275 of file client_main.cpp.

Referenced by fc_interface_init_client().

◆ client_ss_type_get()

static enum sset_type client_ss_type_get ( server_setting_id  id)
static

Returns the type of the server setting with the specified id.

Definition at line 1275 of file client_main.cpp.

Referenced by fc_interface_init_client().

◆ client_ss_val_bitwise_get()

static unsigned int client_ss_val_bitwise_get ( server_setting_id  id)
static

Returns the value of the bitwise server setting with the specified id.

Definition at line 1361 of file client_main.cpp.

Referenced by fc_interface_init_client().

◆ client_ss_val_bool_get()

static bool client_ss_val_bool_get ( server_setting_id  id)
static

Returns the value of the boolean server setting with the specified id.

Definition at line 1331 of file client_main.cpp.

Referenced by fc_interface_init_client().

◆ client_ss_val_int_get()

static int client_ss_val_int_get ( server_setting_id  id)
static

Returns the value of the integer server setting with the specified id.

Definition at line 1346 of file client_main.cpp.

Referenced by fc_interface_init_client().

◆ client_state()

◆ client_url()

◆ emergency_exit()

static void emergency_exit ( )
static

This is called at program exit in any emergency.

This is registered as at_quick_exit() callback, so no destructor kind of actions here

Definition at line 216 of file client_main.cpp.

Referenced by at_exit(), and client_main().

◆ fc_interface_init_client()

static void fc_interface_init_client ( )
static

Initialize client specific functions.

Definition at line 1376 of file client_main.cpp.

Referenced by client_main().

◆ get_conv()

static bool get_conv ( char *  dst,
size_t  ndst,
const char *  src,
size_t  nsrc 
)
static

Convert a text string from the data to the internal encoding when it is first read from the network.

Returns FALSE if the destination isn't large enough or the source was bad.

Definition at line 177 of file client_main.cpp.

Referenced by charsets_init().

◆ get_seconds_to_new_turn()

int get_seconds_to_new_turn ( )

Return the number of seconds until turn-done.

Don't call this unless current_turn_timeout() != 0.

Definition at line 1077 of file client_main.cpp.

Referenced by turn_done_button::update_timeout_label().

◆ get_seconds_to_turndone()

int get_seconds_to_turndone ( )

Return the number of seconds until turn-done.

Don't call this unless current_turn_timeout() != 0.

Definition at line 1063 of file client_main.cpp.

Referenced by turn_done_button::update_timeout_label().

◆ is_client_quitting()

bool is_client_quitting ( )

Is the client marked as one going down?

Definition at line 1503 of file client_main.cpp.

Referenced by client_state().

◆ is_server_busy()

bool is_server_busy ( )

Returns if server is considered busy at the moment.

Definition at line 1201 of file client_main.cpp.

Referenced by can_end_turn(), and control_mouse_cursor().

◆ is_waiting_turn_change()

bool is_waiting_turn_change ( )

Are we in turn-change wait state?

Definition at line 1037 of file client_main.cpp.

Referenced by real_menus_update(), and turn_done_button::update_timeout_label().

◆ log_option_save_msg()

static void log_option_save_msg ( QtMsgType  lvl,
const QString &  msg 
)
static

Write messages from option saving to the log.

Definition at line 633 of file client_main.cpp.

Referenced by client_exit().

◆ mapimg_client_plrcolor_count()

static int mapimg_client_plrcolor_count ( )
static

Helper function for the mapimg module - number of player colors.

Definition at line 1474 of file client_main.cpp.

Referenced by client_game_init().

◆ mapimg_client_plrcolor_get()

static struct rgbcolor * mapimg_client_plrcolor_get ( int  i)
static

Helper function for the mapimg module - one player color.

For the client only the colors of the defined players are shown.

Definition at line 1480 of file client_main.cpp.

Referenced by client_game_init().

◆ mapimg_client_tile_city()

static struct player * mapimg_client_tile_city ( const struct tile ptile,
const struct player pplayer,
bool  knowledge 
)
static

Helper function for the mapimg module - city owner.

Definition at line 1438 of file client_main.cpp.

Referenced by client_game_init().

◆ mapimg_client_tile_known()

static enum known_type mapimg_client_tile_known ( const struct tile ptile,
const struct player pplayer,
bool  knowledge 
)
static

Helper function for the mapimg module - tile knowledge.

Definition at line 1376 of file client_main.cpp.

Referenced by client_game_init().

◆ mapimg_client_tile_owner()

static struct player * mapimg_client_tile_owner ( const struct tile ptile,
const struct player pplayer,
bool  knowledge 
)
static

Helper function for the mapimg module - tile owner.

Definition at line 1426 of file client_main.cpp.

Referenced by client_game_init().

◆ mapimg_client_tile_terrain()

static struct terrain * mapimg_client_tile_terrain ( const struct tile ptile,
const struct player pplayer,
bool  knowledge 
)
static

Helper function for the mapimg module - tile terrain.

Definition at line 1415 of file client_main.cpp.

Referenced by client_game_init().

◆ mapimg_client_tile_unit()

static struct player * mapimg_client_tile_unit ( const struct tile ptile,
const struct player pplayer,
bool  knowledge 
)
static

Helper function for the mapimg module - unit owner.

Definition at line 1456 of file client_main.cpp.

Referenced by client_game_init().

◆ put_conv()

static char* put_conv ( const char *  src,
size_t *  length 
)
static

Convert a text string from the internal to the data encoding, when it is written to the network.

Definition at line 159 of file client_main.cpp.

Referenced by charsets_init().

◆ real_timer_callback()

double real_timer_callback ( )

This function should be called at least once per second.

It does various updates (idle animations and timeout updates). It returns the number of seconds until it should be called again.

Definition at line 1084 of file client_main.cpp.

Referenced by fc_client::timerEvent().

◆ send_attribute_block_request()

void send_attribute_block_request ( )

Send attribute block.

Definition at line 991 of file client_main.cpp.

◆ send_report_request()

void send_report_request ( enum report_type  type)

Send request for some report to server.

Definition at line 754 of file client_main.cpp.

Referenced by mr_menu::slot_achievements(), mr_menu::slot_demographics(), mr_menu::slot_top_five(), and mr_menu::slot_traveler().

◆ send_turn_done()

void send_turn_done ( )

Send information about player having finished his/her turn to server.

Definition at line 725 of file client_main.cpp.

Referenced by key_end_turn(), update_turn_done_button_state(), and user_ended_turn().

◆ set_client_state()

void set_client_state ( enum client_states  newstate)

◆ set_miliseconds_to_turndone()

void set_miliseconds_to_turndone ( int  miliseconds)

Reset the number of seconds to turndone from an "authentic" source.

The seconds are taken as a double even though most callers will just know an integer value.

Definition at line 1022 of file client_main.cpp.

Referenced by handle_new_year(), and handle_timeout_info().

◆ set_server_busy()

void set_server_busy ( bool  busy)

Sets if server is considered busy.

Currently it is considered busy between turns.

Definition at line 1187 of file client_main.cpp.

Referenced by client_state(), handle_end_turn(), handle_server_join_reply(), and handle_start_phase().

◆ start_quitting()

void start_quitting ( )

Mark client as one going to quit as soon as possible,.

Definition at line 1508 of file client_main.cpp.

Referenced by popup_quit_dialog().

◆ start_turn_change_wait()

void start_turn_change_wait ( )

Start waiting of the server turn change activities.

Definition at line 1042 of file client_main.cpp.

Referenced by handle_end_turn().

◆ stop_turn_change_wait()

void stop_turn_change_wait ( )

Server is responsive again.

Definition at line 1053 of file client_main.cpp.

Referenced by disconnect_from_server(), and handle_begin_turn().

◆ user_ended_turn()

void user_ended_turn ( )

Handle user ending his/her turn.

Definition at line 720 of file client_main.cpp.

Referenced by handle_player_info(), handle_start_phase(), and manual_turn_done_callback().

Variable Documentation

◆ announce

enum announce_type announce

Definition at line 134 of file client_main.cpp.

Referenced by fcUdpScan::begin_scan(), client_main(), and remove_trade_route().

◆ auto_connect

bool auto_connect
Initial value:
=
false

Definition at line 132 of file client_main.cpp.

Referenced by client_main(), client_state(), and handle_server_join_reply().

◆ auto_spawn

bool auto_spawn = false

Definition at line 134 of file client_main.cpp.

Referenced by client_main(), and client_state().

◆ civclient_state

enum client_states civclient_state = C_S_INITIAL
static

Definition at line 134 of file client_main.cpp.

Referenced by client_state().

◆ client

struct civclient client

Definition at line 134 of file client_main.cpp.

Referenced by action_decision_clear_want(), trade_generator::add_all_cities(), freeciv::improvement_seller::add_to_menu(), adjust_workers_button_pressed(), diplo_wdg::all_advances(), national_budget_dialog::apply(), cma_yoloswag::apply_result_on_server(), ask_server_for_actions(), attribute_flush(), mr_menu::back_to_menu(), blink_turn_done_button(), can_client_change_view(), can_client_control(), can_end_turn(), can_meet_with_player(), center_on_something(), cma_yoloswag::check_city(), city_buy_production(), city_can_buy(), city_change_production(), city_change_specialist(), city_packet_common(), city_rename(), city_sell_improvement(), city_set_worklist(), client_game_free(), client_game_init(), client_government_sprite(), client_has_player(), client_is_global_observer(), client_is_observer(), client_kill_server(), client_packet_input(), client_player(), client_player_maps_reset(), client_player_number(), client_remove_cli_conn(), client_research_sprite(), client_start_server(), client_start_server_and_set_page(), client_state(), client_tile_get_known(), clipboard_copy_production(), clipboard_paste_production(), clipboard_send_production_packet(), cmp_love(), col_diplstate(), col_embassy(), col_love(), col_vision(), control_mouse_cursor(), units_select::create_pixmap(), fc_client::current_page(), science_report::current_tech_changed(), diplo_wdg::dbl_click(), diplstate_value(), disband_all_units(), city_dialog::disband_state_changed(), disconnect_from_server(), do_disband_alternative(), do_map_click(), do_move_unit(), do_unit_act_sel_vs(), do_unit_patrol_to(), edit_buffer_paste(), editor_apply_tool(), editor_apply_tool_to_selection(), editor_is_active(), editor_notify_edit_finished(), error_on_socket(), freeciv::layer_grid::fill_sprite_array(), find_best_focus_candidate(), find_city_or_settler_near_tile(), find_visible_unit(), found_city(), city_widget::gen_production_labels(), get_act_sel_action_custom_text(), city_dialog::get_city(), get_city_mapview_name_and_growth(), get_economy_report_data(), get_economy_report_units_data(), get_info_label_text(), get_info_label_text_popup(), get_score_text(), get_tile_output_text(), get_tooltip(), get_tooltip_improvement(), get_tooltip_unit(), get_turn_done_button_state(), get_units_upgrade_info(), get_units_waiting_data(), diplo_wdg::give_advance(), diplo_wdg::give_city(), diplo_wdg::give_embassy(), diplo_wdg::give_shared_vision(), global_worklist_alloc(), global_worklist_destroy(), global_worklists_free(), global_worklists_init(), science_report::goal_tech_changed(), diplo_wdg::gold_changed1(), diplo_wdg::gold_changed2(), page_network::handle_authentication_req(), handle_city_info(), handle_conn_info(), handle_conn_ping(), handle_diplomacy_init_meeting(), handle_event(), handle_new_year(), handle_player_diplstate(), handle_player_info(), handle_player_remove(), handle_processing_finished(), handle_processing_started(), handle_server_join_reply(), handle_start_phase(), handle_tile_info(), handle_unit_action_answer(), handle_unit_bombard_info(), handle_unit_combat_info(), handle_unit_packet_common(), handle_unit_short_info(), handle_worker_task(), has_player_unit_type(), diplo_dlg::init(), input_from_server(), is_any_city_dialog_open(), freeciv::upkeep_widget::item_double_clicked(), key_unit_action_select(), ss_report::launch(), make_connection(), mapimg_client_define(), meswin_popup_city(), research_diagram::mouseMoveEvent(), research_diagram::mousePressEvent(), message_widget::msg_update(), multiairlift(), races_dialog::nation_selected(), notify_about_incoming_packet(), notify_about_outgoing_packet(), notify_goto::notify_goto(), races_dialog::ok_pressed(), freeciv::improvement_seller::operator()(), overview_tile_color(), diplo_wdg::pact_allianze(), diplo_wdg::pact_ceasfire(), diplo_wdg::pact_peace(), pageGame::pageGame(), traditional_citybar_painter::paint(), polished_citybar_painter::paint(), national_budget_widget::paintEvent(), paste_tile(), player_clear(), plr_report::plr_cancel_threaty(), plr_report::plr_withdraw_vision(), popup_info_text(), popup_quit_dialog(), popup_revolution_dialog(), science_report::push_research(), cma_yoloswag::put_city_under_agent(), quickselect(), races_dialog::races_dialog(), races_dialog::random_pressed(), real_output_window_append(), real_science_report_dialog_update(), real_timer_callback(), national_budget_dialog::refresh(), freeciv::upkeep_widget::refresh(), pageGame::reloadSidebarIcons(), plr_report::req_meeeting(), request_action_details(), request_do_action(), request_move_unit_direction(), request_new_unit_activity_targeted(), request_orders_cleared(), request_unit_build_city(), request_unit_non_action_move(), request_unit_ssa_set(), request_unit_unload(), request_units_return(), diplo_wdg::response_accept(), diplo_wdg::response_cancel(), governor::run(), science_dialog_text(), diplo_wdg::sea_map_clause(), sell_all_improvements(), send_attribute_block_request(), send_chat(), send_chat_printf(), send_client_wants_hack(), send_goto_route(), send_path_orders(), send_rally_path_orders(), send_report_request(), send_turn_done(), set_government_choice(), help_widget::set_topic_building(), help_widget::set_topic_extra(), help_widget::set_topic_goods(), help_widget::set_topic_government(), help_widget::set_topic_specialist(), help_widget::set_topic_tech(), help_widget::set_topic_terrain(), help_widget::set_topic_unit(), show_new_turn_info(), page_network::slot_connect(), fc_client::slot_disconnect(), multipler_rates_dialog::slot_ok_button_pressed(), page_pregame::slot_pregame_start(), mr_menu::slot_rename(), mr_menu::slot_spaceship(), top_bar_widget::someSlot(), spaceship_autoplace(), spy_steal_shared(), page_pregame::start_page_menu(), start_revolution(), start_style_music(), fc_client::start_tutorial(), choice_dialog::switch_target(), tilespec_reread_callback(), top_bar_right_click_diplomacy(), try_to_autoconnect(), try_to_connect(), unit_focus_add(), unit_focus_advance(), unit_focus_set(), unit_focus_update(), gov_menu::update(), unit_actions::update_actions(), mr_menu::update_airlift_menu(), page_pregame::update_buttons(), city_dialog::update_buy_button(), city_dialog::update_disabled(), city_dialog::update_prod_buttons(), ss_report::update_report(), plr_report::update_report(), city_dialog::update_units(), pageGame::updateInfoLabelTimeout(), pageGame::updateSidebarTooltips(), upgrade_canvas_clipboard(), units_view::upgrade_units(), voteinfo_do_vote(), wakeup_sentried_units(), and diplo_wdg::world_map_clause().

◆ client_quitting

bool client_quitting = false
static

Definition at line 153 of file client_main.cpp.

Referenced by is_client_quitting(), and start_quitting().

◆ cmd_metaserver

QString cmd_metaserver

Definition at line 131 of file client_main.cpp.

Referenced by begin_metaserver_scan(), client_main(), and meta_read_response().

◆ forced_tileset_name

QString forced_tileset_name

◆ logfile

QString logfile

Definition at line 124 of file client_main.cpp.

Referenced by client_main(), and client_start_server().

◆ music_set_name

◆ savefile

QString savefile

Definition at line 126 of file client_main.cpp.

Referenced by client_main(), and client_start_server().

◆ scriptfile

QString scriptfile

Definition at line 125 of file client_main.cpp.

Referenced by client_main(), and client_start_server().

◆ seconds_shown_to_new_turn

int seconds_shown_to_new_turn
static

◆ seconds_shown_to_turndone

int seconds_shown_to_turndone
static

◆ server_busy

bool server_busy = false
static

Definition at line 147 of file client_main.cpp.

Referenced by is_server_busy(), and set_server_busy().

◆ sound_plugin_name

QString sound_plugin_name

Definition at line 128 of file client_main.cpp.

Referenced by audio_restart(), and client_main().

◆ sound_set_name

◆ waiting_for_end_turn

bool waiting_for_end_turn = false

Definition at line 142 of file client_main.cpp.

Referenced by send_turn_done(), and update_turn_done_button_state().

◆ waiting_turn_change

bool waiting_turn_change = false
static