20#ifdef FREECIV_MSWINDOWS
115 const struct player *pplayer,
121 const struct player *pplayer,
124 const struct player *pplayer,
127 const struct player *pplayer,
172static char *
put_conv(
const char *src,
size_t *length)
191 const char *src,
size_t nsrc)
363#ifdef FREECIV_MSWINDOWS
364# ifndef FREECIV_NDEBUG
367 fprintf(
stderr,
"exchndl.dll could not be loaded, no crash debugger\n");
416 _(
"Announce game in LAN using protocol PROTO "
417 "(IPv4/IPv6/none)"));
419 _(
"Skip connect dialog"));
424 _(
"Set debug log level (one of f,e,w,n,v,d, or "
425 "d:file1,min,max:...)"));
430 _(
"Set debug log level (one of f,e,w,n,v)"));
432#ifndef FREECIV_NDEBUG
436 _(
"Raise a signal on failed assertion"));
441 _(
"Load saved game FILE"));
443 _(
"Print a summary of the options"));
446 _(
"Do not request hack access to local server"));
451 _(
"Use FILE as logfile (spawned server also uses this)"));
455 _(
"Connect to the metaserver at HOST"));
459 _(
"Use NAME as username on server"));
463 _(
"Connect to server port PORT (usually with -a)"));
467 _(
"Use PLUGIN for sound output %s"),
472 _(
"Read startup script FILE (for spawned server only)"));
476 _(
"Connect to the server at HOST (usually with -a)"));
480 _(
"Read sound tags from FILE"));
484 _(
"Read music tags from FILE"));
488 _(
"Use data file FILE.tilespec for tiles"));
490 _(
"Print the version number"));
492 _(
"Warn about deprecated modpack constructs"));
509#ifndef FREECIV_NDEBUG
545 _(
"Invalid port \"%s\" specified with --port option.\n"),
559 _(
"Invalid debug level \"%s\" specified with --debug "
573#ifdef FREECIV_IPV6_SUPPORT
786 log_error(
"Received packet %s (%d) before establishing connection!",
790 log_error(
"Received unknown packet (type %d) from server!",
type);
808 log_debug(
"send_turn_done() can_end_turn=%d",
853 log_fatal(
_(
"Failed to start local server; aborting."));
860 log_fatal(
_(
"There was an error while auto connecting; aborting."));
979 if (pplayer && pplayer->
cities) {
1038 "Trying to remove a non existing connection");
1056 "Connection list missing");
1375 const struct player *pplayer,
1385 const struct player *pplayer)
1420 log_error(
"No server setting with the id %d exists.",
id);
1434 log_error(
"No server setting with the id %d exists.",
id);
1445 "%s is a client option type but not a server "
1478 log_error(
"No server setting with the id %d exists.",
id);
1493 log_error(
"No server setting with the id %d exists.",
id);
1508 log_error(
"No server setting with the id %d exists.",
id);
1542 const struct player *pplayer,
1566 const struct player *pplayer,
1576 const struct player *pplayer,
1592 const struct player *pplayer,
1597 if (unit_count == 0) {
1626 return pplayer->rgb;
void agents_disconnect(void)
void agents_game_start(void)
void init_ai(struct ai_type *ai)
struct ai_type * get_ai_type(int id)
void attribute_init(void)
void attribute_free(void)
void attribute_flush(void)
void audio_shutdown(bool play_quit_tag)
const char * audio_get_all_plugin_names(void)
void audio_play_sound(const char *const tag, const char *const alt_tag, const char *const alt_tag2)
void audio_real_init(const char *const soundset_name, const char *const musicset_name, const char *const preferred_plugin_name)
bool dbv_isset(const struct dbv *pdbv, int bit)
void init_our_capability(void)
void fc_destroy_ow_mutex(void)
void fc_init_ow_mutex(void)
#define city_list_iterate(citylist, pcity)
#define city_owner(_pcity_)
#define city_list_iterate_end
void init_city_report_game_data(void)
char forced_tileset_name[512]
void client_remove_all_cli_conn(void)
static struct player * mapimg_client_tile_city(const struct tile *ptile, const struct player *pplayer, bool knowledge)
bool is_client_quitting(void)
static enum client_states civclient_state
static server_setting_id client_ss_by_name(const char *name)
bool can_client_control(void)
void start_turn_change_wait(void)
void fc__noreturn client_exit(int return_value)
static struct player * mapimg_client_tile_unit(const struct tile *ptile, const struct player *pplayer, bool knowledge)
bool client_is_global_observer(void)
static struct timer * turndone_timer
void client_remove_cli_conn(struct connection *pconn)
int get_seconds_to_new_turn(void)
static bool waiting_turn_change
int get_seconds_to_turndone(void)
static void charsets_init(void)
bool client_is_observer(void)
static int client_plr_tile_city_id_get(const struct tile *ptile, const struct player *pplayer)
static struct rgbcolor * mapimg_client_plrcolor_get(int i)
bool can_meet_with_player(const struct player *pplayer)
void client_packet_input(void *packet, int type)
double real_timer_callback(void)
static void fc_interface_init_client(void)
static void at_exit(void)
bool client_map_is_known_and_seen(const struct tile *ptile, const struct player *pplayer, enum vision_layer vlayer)
bool waiting_for_end_turn
static char * put_conv(const char *src, size_t *length)
static enum sset_type client_ss_type_get(server_setting_id id)
void send_attribute_block_request(void)
static struct terrain * mapimg_client_tile_terrain(const struct tile *ptile, const struct player *pplayer, bool knowledge)
enum announce_type announce
int client_main(int argc, char *argv[], bool postpone_tileset)
bool can_intel_with_player(const struct player *pplayer)
int client_player_number(void)
static int mapimg_client_plrcolor_count(void)
static void client_game_free(void)
static enum known_type mapimg_client_tile_known(const struct tile *ptile, const struct player *pplayer, bool knowledge)
static bool client_quitting
void stop_turn_change_wait(void)
void set_server_busy(bool busy)
static bool client_ss_val_bool_get(server_setting_id id)
void user_ended_turn(void)
static bool get_conv(char *dst, size_t ndst, const char *src, size_t nsrc)
static int client_ss_val_int_get(server_setting_id id)
static void client_game_reset(void)
void send_turn_done(void)
static unsigned int client_ss_val_bitwise_get(server_setting_id id)
static int seconds_shown_to_new_turn
enum client_states client_state(void)
bool is_waiting_turn_change(void)
char sound_plugin_name[512]
static void emergency_exit(void)
static double seconds_to_turndone
static void log_option_save_msg(enum log_level lvl, const char *msg,...)
void set_seconds_to_turndone(double seconds)
static int seconds_shown_to_turndone
void send_report_request(enum report_type type)
static void client_game_init(void)
bool can_client_issue_orders(void)
void start_quitting(void)
bool client_has_player(void)
bool is_server_busy(void)
static struct timer * between_turns
static struct player * mapimg_client_tile_owner(const struct tile *ptile, const struct player *pplayer, bool knowledge)
const char * title_for_player(const struct player *pplayer, char *buf, size_t buf_len)
char fc_password[MAX_LEN_PASSWORD]
int default_tileset_select(void)
void wait_till_request_got_processed(int request_id)
static const char * client_ss_name_get(server_setting_id id)
void set_client_state(enum client_states newstate)
bool can_client_change_view(void)
const char *const gui_character_encoding
const bool gui_use_transliteration
void create_event(struct tile *ptile, enum event_type event, const struct ft_color color, const char *format,...)
void center_on_something(void)
void start_autoconnecting_to_server(void)
void disconnect_from_server(bool leaving_sound)
double try_to_autoconnect(void)
void input_from_server_till_request_got_processed(int fd, int expected_request_id)
bool cma_is_city_under_agent(const struct city *pcity, struct cm_parameter *parameter)
void cma_release_city(struct city *pcity)
void client_kill_server(bool force)
bool client_start_server(void)
void conn_reset_delta_state(struct connection *pc)
double blink_turn_done_button(void)
void unit_focus_set(struct unit *punit)
struct unit_list * get_units_in_focus(void)
int get_num_units_in_focus(void)
void unit_focus_update(void)
void control_mouse_cursor(struct tile *ptile)
double blink_active_unit(void)
void dio_set_get_conv_callback(DIO_GET_CONV_FUN fun)
void dio_set_put_conv_callback(DIO_PUT_CONV_FUN fun)
void deprecation_warnings_enable(void)
bool could_intel_with_player(const struct player *pplayer, const struct player *aplayer)
bool could_meet_with_player(const struct player *pplayer, const struct player *aplayer)
void cmdhelp_destroy(struct cmdhelp *pcmdhelp)
void cmdhelp_display(struct cmdhelp *pcmdhelp, bool sort, bool gui_options, bool report_bugs)
struct cmdhelp * cmdhelp_new(const char *cmdname)
void cmdhelp_add(struct cmdhelp *pcmdhelp, const char *shortarg, const char *longarg, const char *helpstr,...)
bool is_option(const char *option_name, char *option)
char * get_option_malloc(const char *option_name, char **argv, int *i, int argc, bool gc)
void cmdline_option_values_free(void)
void libfreeciv_init(bool check_fc_interface)
void libfreeciv_free(void)
struct functions * fc_interface_funcs(void)
#define IDENTITY_NUMBER_ZERO
void backtrace_deinit(void)
void backtrace_init(void)
const char * get_internal_encoding(void)
static char void init_character_encodings(const char *my_internal_encoding, bool my_use_transliteration)
char * internal_to_data_string_malloc(const char *text)
void fc_fprintf(FILE *stream, const char *format,...) fc__attribute((__format__(__printf__
char * data_to_internal_string_malloc(const char *text)
const char * get_locale_dir(void)
#define bindtextdomain(Package, Directory)
const struct ft_color ftc_client
int current_turn_timeout(void)
void game_init(bool keep_ruleset_value)
void global_worklists_build(void)
void global_worklists_unbuild(void)
const char * default_title_for_player(const struct player *pplayer, char *buf, size_t buf_len)
const char * ruler_title_for_player(const struct player *pplayer, char *buf, size_t buf_len)
void popdown_all_city_dialogs(void)
void color_free(struct color *color)
void popdown_races_dialog(void)
void popdown_all_game_dialogs(void)
void close_all_diplomacy_dialogs(void)
void editgui_popdown_all(void)
void editgui_tileset_changed(void)
int ui_main(int argc, char **argv)
const char * client_string
void update_timeout_label(void)
void update_info_label(void)
void update_unit_info_label(struct unit_list *punits)
void voteinfo_gui_update(void)
static struct gui_funcs funcs
void conn_list_dialog_update(void)
void free_help_texts(void)
void boot_help_texts(void)
void log_init(const char *filename, enum log_level initial_level, log_callback_fn callback, log_prefix_fn prefix, int fatal_assertions)
bool log_parse_level_str(const char *level_str, enum log_level *ret_level)
#define fc_assert_msg(condition, message,...)
#define fc_assert_ret(condition)
#define fc_assert(condition)
#define log_va_list(level, msg, args)
#define fc_assert_ret_val(condition, val)
#define log_fatal(message,...)
#define log_debug(message,...)
#define log_error(message,...)
#define FC_STATIC_ASSERT(cond, tag)
#define fc_assert_ret_val_msg(condition, val, message,...)
void update_turn_done_button_state(void)
void mapimg_init(mapimg_tile_known_func mapimg_tile_known, mapimg_tile_terrain_func mapimg_tile_terrain, mapimg_tile_player_func mapimg_tile_owner, mapimg_tile_player_func mapimg_tile_city, mapimg_tile_player_func mapimg_tile_unit, mapimg_plrcolor_count_func mapimg_plrcolor_count, mapimg_plrcolor_get_func mapimg_plrcolor_get)
void update_map_canvas_visible(void)
void animations_init(void)
void link_marks_init(void)
void animations_free(void)
void link_marks_free(void)
void meswin_clear_older(int turn, int phase)
void start_menu_music(const char *const tag, char *const alt_tag)
void stop_menu_music(void)
void start_style_music(void)
void stop_style_music(void)
void fc_shutdown_network(void)
void fc_init_network(void)
void fill_topo_ts_default(void)
const char * tileset_name_for_topology(int topology_id)
const struct option_set * server_optset
int option_number(const struct option *poption)
const char * option_name(const struct option *poption)
int option_int_get(const struct option *poption)
struct option * optset_option_by_number(const struct option_set *poptset, int id)
bool option_bool_get(const struct option *poption)
void server_options_init(void)
enum option_type option_type(const struct option *poption)
void options_dialogs_update(void)
void server_options_free(void)
void options_save(option_save_log_callback log_cb)
struct client_options gui_options
unsigned option_bitwise_get(const struct option *poption)
struct option * optset_option_by_name(const struct option_set *poptset, const char *name)
void options_dialogs_set(void)
#define DEFAULT_METASERVER_OPTION
void refresh_overview_canvas(void)
void packets_deinit(void)
const char * packet_name(enum packet_type type)
int dsend_packet_player_phase_done(struct connection *pc, int turn)
int send_packet_client_heartbeat(struct connection *pc)
int send_packet_player_attribute_block(struct connection *pc)
int dsend_packet_report_req(struct connection *pc, enum report_type type)
@ PACKET_PROCESSING_STARTED
@ PACKET_PROCESSING_FINISHED
@ PACKET_AUTHENTICATION_REQ
@ PACKET_SERVER_JOIN_REPLY
bool client_handle_packet(enum packet_type type, const void *packet)
void set_client_page(enum client_pages page)
enum client_pages get_client_page(void)
bool is_valid_username(const char *name)
int player_number(const struct player *pplayer)
#define players_iterate_end
#define players_iterate(_pplayer)
void init_player_dlg_common(void)
void fc_srand(RANDOM_TYPE seed)
void registry_module_init(void)
void registry_module_close(void)
struct research * research_get(const struct player *pplayer)
void research_update(struct research *presearch)
static int fatal_assertions
bool script_client_init(void)
void script_client_free(void)
#define SERVER_SETTING_NONE
char * user_username(char *buf, size_t bufsz)
void dont_run_as_root(const char *argv0, const char *fallback)
bool str_to_int(const char *str, int *pint)
struct conn_list * est_connections
struct packet_game_info info
struct conn_list * all_connections
struct packet_timeout_info tinfo
struct civ_game::@31::@34 client
char default_sound_set_name[512]
char default_metaserver[512]
char default_tileset_name[512]
bool auto_center_each_turn
char default_server_host[512]
bool save_options_on_exit
char default_music_set_name[512]
char default_sound_plugin_name[512]
char default_user_name[512]
float last_turn_change_time
struct city_list * cities
struct dbv tile_vision[V_COUNT]
struct player::@70::@73 client
int fc_snprintf(char *str, size_t n, const char *format,...)
int fc_strcasecmp(const char *str0, const char *str1)
int fc_at_quick_exit(void(*func)(void))
#define sz_strlcpy(dest, src)
void free_svg_flag_API(void)
enum known_type tile_get_known(const struct tile *ptile, const struct player *pplayer)
struct city * tile_city(const struct tile *ptile)
#define tile_terrain(_tile)
#define tile_owner(_tile)
bool tilespec_try_read(const char *tileset_name, bool verbose, int topo_id, bool global_default)
struct tileset * unscaled_tileset
int index_ts_topology(int idx)
void tileset_free(struct tileset *t)
void timer_start(struct timer *t)
double timer_read_seconds(struct timer *t)
struct timer * timer_renew(struct timer *t, enum timer_timetype type, enum timer_use use, const char *name)
void role_unit_precalcs(void)
void update_queue_free(void)
void update_queue_init(void)
const char * freeciv_name_version(void)
void voteinfo_queue_init(void)
void voteinfo_queue_check_removed(void)
void voteinfo_queue_free(void)
bool zoom_update(double time_until_next_call)