20#ifdef FREECIV_MSWINDOWS
117 const struct player *pplayer,
123 const struct player *pplayer,
126 const struct player *pplayer,
129 const struct player *pplayer,
176static char *
put_conv(
const char *src,
size_t *length)
195 const char *src,
size_t nsrc)
367#ifdef FREECIV_MSWINDOWS
368# ifndef FREECIV_NDEBUG
371 fprintf(
stderr,
"exchndl.dll could not be loaded, no crash debugger\n");
422 _(
"Announce game in LAN using protocol PROTO "
423 "(IPv4/IPv6/none)"));
425 _(
"Skip connect dialog"));
430 _(
"Set debug log level (one of f,e,w,n,v,d, or "
431 "d:file1,min,max:...)"));
436 _(
"Set debug log level (one of f,e,w,n,v)"));
438#ifndef FREECIV_NDEBUG
442 _(
"Raise a signal on failed assertion"));
447 _(
"Load saved game FILE"));
449 _(
"Print a summary of the options"));
452 _(
"Do not request hack access to local server"));
457 _(
"Use FILE as logfile (spawned server also uses this)"));
461 _(
"Connect to the metaserver at HOST"));
465 _(
"Use NAME as username on server"));
469 _(
"Connect to server port PORT (usually with -a)"));
473 _(
"Use PLUGIN for sound output %s"),
478 _(
"Read startup script FILE (for spawned server only)"));
482 _(
"Connect to the server at HOST (usually with -a)"));
486 _(
"Read sound tags from FILE"));
490 _(
"Read music tags from FILE"));
494 _(
"Use data file FILE.tilespec for tiles"));
496 _(
"Print the version number"));
498 _(
"Warn about deprecated modpack constructs"));
515#ifndef FREECIV_NDEBUG
551 _(
"Invalid port \"%s\" specified with --port option.\n"),
565 _(
"Invalid debug level \"%s\" specified with --debug "
579#ifdef FREECIV_IPV6_SUPPORT
797 log_error(
"Received packet %s (%d) before establishing connection!",
801 log_error(
"Received unknown packet (type %d) from server!",
type);
819 log_debug(
"send_turn_done() can_end_turn=%d",
864 log_fatal(
_(
"Failed to start local server; aborting."));
871 log_fatal(
_(
"There was an error while auto connecting; aborting."));
990 if (pplayer && pplayer->
cities) {
1049 "Trying to remove a non existing connection");
1067 "Connection list missing");
1391 const struct player *pplayer,
1401 const struct player *pplayer)
1436 log_error(
"No server setting with the id %d exists.",
id);
1450 log_error(
"No server setting with the id %d exists.",
id);
1461 "%s is a client option type but not a server "
1494 log_error(
"No server setting with the id %d exists.",
id);
1509 log_error(
"No server setting with the id %d exists.",
id);
1524 log_error(
"No server setting with the id %d exists.",
id);
1558 const struct player *pplayer,
1582 const struct player *pplayer,
1592 const struct player *pplayer,
1608 const struct player *pplayer,
1613 if (unit_count == 0) {
1642 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)
static void cache_tilesets(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)
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit int const struct action *paction struct unit struct city * pcity
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 gui_properties_init(void)
struct client_properties gui_properties
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)
struct fileinfo_list * get_modpacks_list(void)
const char * modpack_cache_tileset(struct section_file *sf)
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)
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)
struct section_file * secfile_load(const char *filename, bool allow_duplicates)
void registry_module_init(void)
void registry_module_close(void)
void secfile_destroy(struct section_file *secfile)
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)
#define fileinfo_list_iterate(list, pnode)
#define fileinfo_list_iterate_end
struct civ_game::@32::@35 client
struct conn_list * est_connections
struct packet_game_info info
struct conn_list * all_connections
struct packet_timeout_info tinfo
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::@73::@76 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)
void advance_global_anim_state(void)
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 set_client_page(enum client_pages page)
void update_queue_init(void)
enum client_pages get_client_page(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)