27#ifdef SDL2_PLAIN_INCLUDE
109 int window_width,
int window_height,
113 int window_x = 0, window_y = 0;
192 struct unit *enemy_unit,
193 struct unit *my_unit)
195 if (!my_unit || !enemy_unit) {
217#define SPECLIST_TAG notify_goto
218#define SPECLIST_TYPE struct notify_goto_data
298 if (NULL != pdata->
ptile) {
322 str->style |= TTF_STYLE_BOLD;
343 pdialog->
label = NULL;
362 if (NULL != pdialog->
label) {
366 notify_goto_list_destroy(pdialog->
datas);
386 if (NULL != pdialog->
label) {
421 if (1 < notify_goto_list_size(pdialog->
datas)) {
422 notify_goto_list_remove(pdialog->
datas,
423 notify_goto_list_get(pdialog->
datas, 0));
439 const struct text_tag_list *tags,
469 log_error(
"popup_connect_msg() PORT ME");
672 "SDL2 popup_upgrade_dialog() handles max 1 unit.");
714 area = pwindow->area;
731 pwindow->dst,
_(
"Cancel"),
752 buf->next->size.w =
buf->size.w;
762 (pwindow->size.w - pwindow->area.w) +
area.w,
763 (pwindow->size.h - pwindow->area.h) +
area.h);
765 area = pwindow->area;
792 buf->size.y =
buf->next->size.y;
895 struct unit_list *punits = unit_list_new();
897 unit_list_append(punits,
punit);
899 unit_list_destroy(punits);
903 pstr->
style |= TTF_STYLE_BOLD;
914 area = pwindow->area;
931 pwindow->dst,
_(
"Cancel"),
941 if (unit_disband_result) {
962 (pwindow->size.w - pwindow->area.w) + area.w,
963 (pwindow->size.h - pwindow->area.h) + area.h);
965 area = pwindow->area;
979 dst.x = area.x + (area.w - text->w) / 2;
981 alphablit(text, NULL, pwindow->theme, &dst, 255);
988 if (unit_disband_result) {
1101 n = unit_list_size(ptile->
units);
1110 fc_snprintf(cbuf,
sizeof(cbuf),
"%s (%d)",
_(
"Unit selection"),
n);
1112 pstr->
style |= TTF_STYLE_BOLD;
1122 area = pwindow->
area;
1132 buf->
key = SDLK_ESCAPE;
1139 for (i = 0; i <
n; i++) {
1140 const char *vetname;
1150 fc_snprintf(cbuf ,
sizeof(cbuf),
_(
"Contact %s (%d / %d) %s(%d,%d,%s) %s"),
1151 (vetname != NULL ? vetname :
""),
1160 int att_chance, def_chance;
1162 fc_snprintf(cbuf ,
sizeof(cbuf),
_(
"%s %s %s(A:%d D:%d M:%s FP:%d) HP:%d%%"),
1164 (vetname != NULL ? vetname :
""),
1170 (
punit->
hp * 100 / punittype->
hp + 9) / 10);
1175 cat_snprintf(cbuf,
sizeof(cbuf),
_(
" CtW: Att:%d%% Def:%d%%"),
1176 att_chance, def_chance);
1185 area.w =
MAX(area.w, buf->
size.w);
1186 area.h += buf->
size.h;
1207 area.h =
NUM_SEEN * pwindow->prev->prev->size.h;
1211 (pwindow->size.w - pwindow->area.w) + area.w,
1212 (pwindow->size.h - pwindow->area.h) + area.h);
1214 area = pwindow->area;
1226 buf = pwindow->
prev;
1227 buf->
size.x = area.x + area.w - buf->
size.w - 1;
1237 area.x + area.w, area.y,
1305 static char buffer[64];
1306 int bonus = (
tile_terrain(ptile)->defense_bonus - 10) * 10;
1310 && pextra->category == ECAT_NATURAL) {
1311 bonus += pextra->defense_bonus;
1315 fc_snprintf(buffer,
sizeof(buffer),
_(
"Terrain Defense Bonus: +%d%% "), bonus);
1582 && ACTIVITY_IDLE == other_unit->activity
1583 && other_unit->ssa_controller == SSA_NONE
1625 if (ptile != NULL) {
1654 if (ptile != NULL) {
1695 Uint16 pos_x, Uint16 pos_y)
1699 struct unit *focus_unit;
1704 int n, w = 0, h, units_h = 0;
1712 n = unit_list_size(ptile->
units);
1715 if (!
n && !pcity && !focus_unit) {
1731 pstr->
style |= TTF_STYLE_BOLD;
1741 area = pwindow->
area;
1749 area.w += buf->size.w +
adj_size(10);
1752 buf->key = SDLK_ESCAPE;
1758 pstr->
style |= TTF_STYLE_BOLD;
1763 buf->string_utf8->bgcol = (SDL_Color) {0, 0, 0, 0};
1765 buf->data.cont = cont;
1772 area.w =
MAX(area.w, buf->size.w);
1773 area.h += buf->size.h;
1781 area.h += buf->next->size.h;
1788 buf->data.city = pcity;
1793 area.w =
MAX(area.w, buf->size.w);
1794 area.h += buf->size.h;
1800 buf->data.city = pcity;
1805 area.w =
MAX(area.w, buf->size.w);
1806 area.h += buf->size.h;
1812 buf->data.city = pcity;
1817 area.w =
MAX(area.w, buf->size.w);
1818 area.h += buf->size.h;
1824 buf->data.city = pcity;
1829 area.w =
MAX(area.w, buf->size.w);
1830 area.h += buf->size.h;
1840 area.h += buf->next->size.h;
1845 buf->data.cont = cont;
1850 area.w =
MAX(area.w, buf->size.w);
1851 area.h += buf->size.h;
1856 buf->data.cont = cont;
1861 area.w =
MAX(area.w, buf->size.w);
1862 area.h += buf->size.h;
1868 connect_here_callback);
1869 buf->data.cont = cont;
1874 area.w =
MAX(area.w, buf->size.w);
1875 area.h += buf->size.h;
1888 buf->data.cont = cont;
1893 area.w =
MAX(area.w, buf->size.w);
1894 area.h += buf->size.h;
1904 const struct unit_type *punittype = NULL;
1912 area.h += buf->next->size.h;
1915 struct unit *defender, *attacker;
1921 #define ADV_NUM_SEEN 15
1927 for (
i = 0;
i <
n;
i++) {
1940 _(
"Activate %s (%d / %d) %s (%d,%d,%s) %s"),
1941 (vetname != NULL ? vetname :
""),
1952 buf->data.unit =
punit;
1957 int att_chance, def_chance;
1959 fc_snprintf(cbuf,
sizeof(cbuf),
_(
"%s %s %s (A:%d D:%d M:%s FP:%d) HP:%d%%"),
1961 (vetname != NULL ? vetname :
""),
1973 cat_snprintf(cbuf,
sizeof(cbuf),
_(
" CtW: Att:%d%% Def:%d%%"),
1974 att_chance, def_chance);
1977 if (attacker && attacker ==
punit) {
1981 if (defender && defender ==
punit) {
1997 area.w =
MAX(area.w, buf->size.w);
1998 units_h += buf->size.h;
2018 fc_snprintf(cbuf,
sizeof(cbuf),
"%s (%d)",
_(
"Ready all"), my_units);
2025 area.h += buf->size.h;
2027 fc_snprintf(cbuf,
sizeof(cbuf),
"%s (%d)",
_(
"Sentry idle"), my_units);
2034 area.h += buf->size.h;
2040 area.h += buf->next->size.h;
2047 if (
punit != focus_unit) {
2048 const char *vetname;
2057 _(
"Activate %s (%d / %d) %s (%d,%d,%s) %s"),
2058 (vetname != NULL ? vetname :
""),
2069 buf->data.unit =
punit;
2074 area.w =
MAX(area.w, buf->size.w);
2075 units_h += buf->size.h;
2081 area.h += buf->next->size.h;
2083 int att_chance, def_chance;
2085 fc_snprintf(cbuf,
sizeof(cbuf),
_(
"%s %s %s (A:%d D:%d M:%s FP:%d) HP:%d%%"),
2087 (vetname != NULL ? vetname :
""),
2099 cat_snprintf(cbuf,
sizeof(cbuf),
_(
" CtW: Att:%d%% Def:%d%%"),
2100 att_chance, def_chance);
2104 area.w =
MAX(area.w, buf->size.w);
2105 units_h += buf->size.h;
2112 area.h += buf->next->size.h;
2118 _(
"Look up \"%s\" in the Help Browser"),
2125 area.w =
MAX(area.w, buf->size.w);
2126 units_h += buf->size.h;
2138 (pwindow->
size.w - pwindow->
area.w) + area.w,
2139 (pwindow->
size.h - pwindow->
area.h) + area.h);
2141 area = pwindow->
area;
2154 buf = pwindow->
prev;
2156 buf->
size.x = area.x + area.w - buf->size.w - 1;
2162 buf->size.x = area.x + 1;
2163 buf->size.y = area.y + 1;
2177 buf->size.x = buf->next->size.x;
2178 buf->size.y = buf->next->size.y + buf->next->size.h;
2185 area2.y = buf->size.h / 2 - 1;
2186 area2.w = buf->size.w -
adj_size(20);
2188 SDL_FillRect(buf->theme, &area2,
map_rgba(buf->theme->format,
2299 pstr->
style |= TTF_STYLE_BOLD;
2309 area = pwindow->
area;
2319 area.w += buf->size.w +
adj_size(10);
2322 buf->key = SDLK_ESCAPE;
2328 const char *
name = NULL;
2340 buf->data.unit =
punit;
2345 area.w =
MAX(area.w, buf->size.w);
2346 area.h += buf->size.h;
2353 (pwindow->
size.w - pwindow->
area.w) + area.w,
2354 (pwindow->
size.h - pwindow->
area.h) + area.h);
2356 area = pwindow->
area;
2364 buf = pwindow->
prev;
2365 buf->
size.x = area.x + area.w - buf->size.w - 1;
2371 area.x, area.y + 1, area.w, 0,
2609 if (strlen(pstr) == 0) {
2665 const struct nation_leader_list *leaders =
2720 const struct nation_leader_list *leaders =
2906 struct widget *pwindow, *ok_button;
2920 pstr->
style |= TTF_STYLE_BOLD;
2932 pwindow->
dst,
_(
"OK"),
2936 ok_button->
key = SDLK_ESCAPE;
2948 area = pwindow->
area;
2969 (pwindow->
size.w - pwindow->
area.w) + area.w,
2970 (pwindow->
size.h - pwindow->
area.h) + area.h);
2981 ok_button->
size.x = area.x + (area.w - ok_button->
size.w) / 2;
3021 SDL_Surface *tmp_surf, *tmp_surf_zoomed;
3031 label->
theme = tmp_surf_zoomed;
3037 label->
size.x = pwindow->
size.x + pwindow->
size.w / 2 +
3038 (pwindow->
size.w / 2 - label->
size.w) / 2;
3049 const struct nation_leader_list *leaders =
3074 if (1 < nation_leader_list_size(leaders)) {
3081 if (setup->
selected_leader < (nation_leader_list_size(leaders) - 1)) {
3092 int playable_nation_count = 0;
3095 if (pnation->is_playable && !pnation->player
3097 playable_nation_count++;
3100 return playable_nation_count;
3108 SDL_Color bg_color = {255,255,255,128};
3125#define TARGETS_ROW 5
3126#define TARGETS_COL 1
3145 pwindow->
data.
ptr = (
void *)setup;
3252 pwindow->
dst, NULL, 0);
3263 pwindow->
dst, NULL, 0);
3308 pwindow->
dst, NULL, 0);
3316 pwindow->
dst, NULL, 0);
3344 if (tmp_surf->w > 48) {
3359 last_City_Style = pwidget;
3365 pwindow->
dst,
_(
"Cancel"),
3392 area = pwindow->
area;
3401 i = (area.h -
adj_size(43) - h) / 2;
3416 area2.x = area.x + w +
adj_size(11);
3417 area2.y = area.y + i -
adj_size(4);
3423 area2.x, area2.y - 1, area2.w, area2.h + 1,
3429 buf->size.x = area.x + area.w / 2 + (area.w / 2 - buf->size.w) / 2;
3430 buf->size.y = area.y +
adj_size(46);
3432 natinfo_y = buf->size.y;
3433 natinfo_h = area.h -= buf->size.y;
3437 buf->size.x = area.x + area.w / 2 + (area.w / 2 - buf->size.w) / 2;
3438 buf->size.y = natinfo_y +
adj_size(46);
3445 buf->size.x = buf->next->size.x + buf->next->size.w;
3446 buf->size.y = buf->next->size.y;
3450 buf->size.x = buf->next->next->size.x - buf->size.w;
3451 buf->size.y = buf->next->size.y;
3460 buf->size.x = area.x + area.w / 2 + (area.w / 2 - buf->size.w) / 2;
3461 buf->size.y = natinfo_y +
adj_size(46);
3465 buf->size.x = area.x + area.w / 2 + (area.w / 2 - buf->size.w) / 2;
3466 buf->size.y = natinfo_y + (natinfo_h - buf->size.h) / 2 -
adj_size(30);
3470 buf->size.x = buf->next->size.x + buf->next->size.w;
3471 buf->size.y = buf->next->size.y;
3475 buf->size.x = buf->next->next->size.x - buf->size.w;
3476 buf->size.y = buf->next->size.y;
3480 buf->size.x = area.x + area.w / 2 + (area.w / 2 - buf->size.w) / 2;
3481 buf->size.y = buf->next->size.y + buf->next->size.h +
adj_size(20);
3485 buf->size.x = area.x + area.w / 2 + (area.w / 2 -
len) / 2 -
adj_size(20);
3486 buf->size.y = buf->next->size.y + buf->next->size.h +
adj_size(20);
3489 while (buf != last_City_Style) {
3491 buf->size.x = buf->next->size.x + buf->next->size.w +
adj_size(3);
3492 buf->size.y = buf->next->size.y;
3504 buf->size.x = area.x +
adj_size(10);
3505 buf->size.y = natinfo_y + natinfo_h -
adj_size(7) - buf->size.h;
3509 buf->size.x = area.w -
adj_size(10) - buf->size.w;
3510 buf->size.y = buf->next->size.y;
3547 if (
nation_dlg != NULL && !nationset_change) {
3571 bool change =
FALSE;
3696 int attacker_hp,
int defender_hp,
3697 bool make_att_veteran,
bool make_def_veteran)
void astr_free(struct astring *astr)
static const char * astr_str(const struct astring *astr) fc__attribute((nonnull(1)))
struct canvas int int canvas_y
struct canvas int canvas_x
void output_window_append(const struct ft_color color, const char *featured_text)
const char * city_name_get(const struct city *pcity)
#define city_owner(_pcity_)
void activate_all_units(struct tile *ptile)
void popup_city_dialog(struct city *pcity)
enum client_states client_state(void)
enum known_type client_tile_get_known(const struct tile *ptile)
struct unit * get_attacker(const struct civ_map *nmap, const struct unit *defender, const struct tile *ptile)
double unit_win_chance(const struct civ_map *nmap, const struct unit *attacker, const struct unit *defender)
struct unit * get_defender(const struct civ_map *nmap, const struct unit *attacker, const struct tile *ptile)
void clear_hover_state(void)
void unit_focus_set(struct unit *punit)
void do_unit_paradrop_to(struct unit *punit, struct tile *ptile)
struct unit_list * get_units_in_focus(void)
void request_unit_disband(struct unit *punit)
void request_new_unit_activity_targeted(struct unit *punit, enum unit_activity act, struct extra_type *tgt)
void set_hover_state(struct unit_list *punits, enum cursor_hover_state state, enum unit_activity activity, struct extra_type *tgt, int last_tgt, int last_sub_tgt, action_id action, enum unit_orders order)
void do_unit_patrol_to(struct tile *ptile)
struct unit * head_of_units_in_focus(void)
void request_unit_upgrade(struct unit *punit)
void request_new_unit_activity(struct unit *punit, enum unit_activity act)
#define can_unit_do_activity_client(_punit_, _act_)
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 show_tileset_error
const char const char * headline
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 bool fatal
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 * punit
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 bool const char * tset_name
const struct ft_color ftc_client
void exit_goto_state(void)
bool send_goto_tile(struct unit *punit, struct tile *ptile)
void enter_goto_state(struct unit_list *punits)
const char * government_name_translation(const struct government *pgovern)
struct government * government_by_number(const Government_type_id gov)
bool can_change_to_government(struct player *pplayer, const struct government *gov)
Government_type_id government_number(const struct government *pgovern)
#define governments_iterate(NAME_pgov)
#define governments_iterate_end
void popdown_all_city_dialogs(void)
void city_report_dialog_popdown(void)
void unit_select_dialog_popup(struct tile *ptile)
void popup_upgrade_dialog(struct unit_list *punits)
void races_update_pickable(bool nationset_change)
static void pillage_callback(GtkWidget *dlg, gint arg)
void popup_notify_goto_dialog(const char *headline, const char *lines, const struct text_tag_list *tags, struct tile *ptile)
void show_tech_gained_dialog(Tech_type_id tech)
void popup_races_dialog(struct player *pplayer)
void popdown_races_dialog(void)
void popup_pillage_dialog(struct unit *punit, bv_extras extras)
void popup_connect_msg(const char *headline, const char *message)
bool handmade_scenario_warning(void)
void unit_select_dialog_update_real(void *unused)
void races_toggles_set_sensitive(void)
void popup_combat_info(int attacker_unit_id, int defender_unit_id, int attacker_hp, int defender_hp, bool make_att_veteran, bool make_def_veteran)
struct player * races_player
void popdown_all_game_dialogs(void)
void popdown_help_dialog(void)
void update_unit_info_label(struct unit_list *punits)
void meswin_dialog_popdown(void)
static GtkWidget * nation_button
void popdown_players_dialog(void)
void units_report_dialog_popdown(void)
void economy_report_dialog_popdown(void)
void unit_select_dialog_popdown(void)
void enable_city_dlg_widgets(void)
void popup_hurry_production_dialog(struct city *pcity, SDL_Surface *pdest)
void free_city_units_lists(void)
void popup_city_cma_dialog(struct city *pcity)
SDL_Color * get_theme_color(enum theme_color themecolor)
SDL_Color * get_game_color(enum color_std stdcolor)
void put_window_near_map_tile(struct widget *pwindow, int window_width, int window_height, struct tile *ptile)
static int adv_unit_sentry_idle_callback(struct widget *pwidget)
static struct small_dialog * terrain_info_dlg
void popup_government_dialog(void)
static struct notify_goto_data * notify_goto_data_new(const char *headline, const char *lines, struct tile *ptile)
static int adv_unit_select_callback(struct widget *pwidget)
static struct small_dialog * unit_disband_dlg
static void popdown_unit_upgrade_dlg(void)
void popup_unit_disband_dlg(struct unit *punit, bool city)
static void popdown_unit_disband_dlg(void)
static void notify_goto_data_destroy(struct notify_goto_data *pdata)
static int cma_callback(struct widget *pwidget)
static struct small_dialog * connect_dlg
bool is_unit_move_blocked
static int hurry_production_callback(struct widget *pwidget)
static void select_random_leader(Nation_type_id nation)
static int next_set_callback(struct widget *next_button)
static int exit_unit_select_callback(struct widget *pwidget)
void popdown_advanced_terrain_dialog(void)
void popup_musicset_suggestion_dialog(void)
static void popdown_pillage_dialog(void)
static struct advanced_dialog * unit_select_dlg
static int notify_goto_dialog_callback(struct widget *widget)
int exit_advanced_terrain_dlg_callback(struct widget *pwidget)
static int ok_upgrade_unit_window_callback(struct widget *pwidget)
static int prev_set_callback(struct widget *prev_button)
static int prev_name_callback(struct widget *prev_button)
static int terrain_info_callback(struct widget *pwidget)
void popup_soundset_suggestion_dialog(void)
static int style_callback(struct widget *pwidget)
static int unit_help_callback(struct widget *pwidget)
static int move_government_dlg_callback(struct widget *pwindow)
static void popdown_government_dialog(void)
static struct advanced_dialog * nation_dlg
static int change_sex_callback(struct widget *sex)
static int cancel_help_dlg_callback(struct widget *pwidget)
static int next_name_callback(struct widget *next_button)
void popup_tileset_suggestion_dialog(void)
static void popup_terrain_info_dialog(SDL_Surface *pdest, struct tile *ptile)
static int get_playable_nation_count(void)
static struct small_dialog * help_dlg
struct advanced_dialog * advanced_terrain_dlg
static void popdown_terrain_info_dialog(void)
static int adv_unit_select_all_callback(struct widget *pwidget)
static void notify_goto_dialog_advance(struct notify_goto_dialog *pdialog)
static int unit_select_callback(struct widget *pwidget)
static int exit_notify_dialog_callback(struct widget *pwidget)
void popdown_notify_goto_dialog(void)
int advanced_terrain_window_dlg_callback(struct widget *pwindow)
static int cancel_upgrade_unit_callback(struct widget *pwidget)
static int nation_button_callback(struct widget *pnation)
static int races_dialog_cancel_callback(struct widget *button)
static int notify_goto_dialog_close_callback(struct widget *widget)
static int leader_name_edit_callback(struct widget *pedit)
static int patrol_here_callback(struct widget *pwidget)
static int pillage_window_callback(struct widget *pwindow)
static int help_dlg_callback(struct widget *pwindow)
bool popup_theme_suggestion_dialog(const char *theme_name)
static int disband_unit_window_callback(struct widget *pwindow)
static int nations_dialog_callback(struct widget *pwindow)
static void notify_goto_dialog_update(struct notify_goto_dialog *pdialog)
void popdown_diplomat_dialog(void)
void real_multipliers_dialog_update(void *unused)
static int goto_here_callback(struct widget *pwidget)
static struct small_dialog * gov_dlg
static int notify_goto_dialog_goto_callback(struct widget *widget)
bool request_transport(struct unit *pcargo, struct tile *ptile)
static void change_nation_label(void)
static struct small_dialog * pillage_dlg
void nationset_changed(void)
void popdown_incite_dialog(void)
static int races_dialog_ok_callback(struct widget *start_button)
void popdown_bribe_dialog(void)
static void notify_goto_dialog_destroy(struct notify_goto_dialog *pdialog)
static int cancel_disband_unit_callback(struct widget *pwidget)
static int change_production_callback(struct widget *pwidget)
static int exit_pillage_dlg_callback(struct widget *pwidget)
static int terrain_info_window_dlg_callback(struct widget *pwindow)
void popup_unit_upgrade_dlg(struct unit *punit, bool city)
static int zoom_to_city_callback(struct widget *pwidget)
static bool sdl_get_chance_to_win(int *att_chance, int *def_chance, struct unit *enemy_unit, struct unit *my_unit)
static int government_dlg_callback(struct widget *gov_button)
const char * sdl_get_tile_defense_info_text(struct tile *ptile)
static int upgrade_unit_window_callback(struct widget *pwindow)
static int notify_dialog_window_callback(struct widget *pwindow)
static int unit_select_window_callback(struct widget *pwindow)
static struct small_dialog * unit_upgrade_dlg
static int exit_terrain_info_dialog_callback(struct widget *button)
static int paradrop_here_callback(struct widget *pwidget)
static int ok_disband_unit_window_callback(struct widget *pwidget)
void popup_advanced_terrain_dialog(struct tile *ptile, Uint16 pos_x, Uint16 pos_y)
static struct notify_goto_dialog * notify_goto_dialog_new(void)
static void popdown_connect_dialog(void)
static char * leader_name
struct advanced_dialog * notify_dlg
void popdown_find_dialog(void)
void popdown_goto_airlift_dialog(void)
int main_window_width(void)
void remove_gui_layer(struct gui_layer *gui_layer)
int fill_rect_alpha(SDL_Surface *surf, SDL_Rect *prect, SDL_Color *pcolor)
void create_line(SDL_Surface *dest, Sint16 x0, Sint16 y0, Sint16 x1, Sint16 y1, SDL_Color *pcolor)
SDL_Surface * crop_rect_from_surface(SDL_Surface *psource, SDL_Rect *prect)
int alphablit(SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect, unsigned char alpha_mod)
struct sdl2_data main_data
SDL_Surface * create_surf(int width, int height, Uint32 flags)
int clear_surface(SDL_Surface *surf, SDL_Rect *dstrect)
void create_frame(SDL_Surface *dest, Sint16 left, Sint16 top, Sint16 width, Sint16 height, SDL_Color *pcolor)
int main_window_height(void)
#define map_rgba(format, color)
void force_exit_from_event_loop(void)
struct widget * selected_widget
#define PRESSED_EVENT(event)
void popup_unit_info(Unit_type_id type_id)
void popdown_intel_dialogs(void)
void popdown_newcity_dialog(void)
void enable_and_redraw_revolution_button(void)
SDL_Surface * get_terrain_surface(struct tile *ptile)
void popdown_optiondlg(bool leave_game)
void popdown_players_nations_dialog(void)
void science_report_dialogs_popdown_all(void)
void popup_worklist_editor(struct city *pcity, struct global_worklist *gwl)
void popdown_worklist_editor(void)
@ ID_TERRAIN_ADV_DLG_WINDOW
@ ID_NATION_WIZARD_WINDOW
@ ID_UNIT_SELECT_DLG_WINDOW
@ ID_NATION_WIZARD_START_BUTTON
@ ID_NATION_WIZARD_NEXT_LEADER_NAME_BUTTON
@ ID_UNIT_SELECT_DLG_EXIT_BUTTON
@ ID_NATION_WIZARD_CHANGE_SEX_BUTTON
@ ID_TERRAIN_ADV_DLG_EXIT_BUTTON
@ ID_TERRAIN_INFO_DLG_WINDOW
@ ID_TERRAIN_INFO_DLG_EXIT_BUTTON
@ ID_NATION_PREV_NATIONSET_BUTTON
@ ID_NATION_NEXT_NATIONSET_BUTTON
@ ID_NATION_WIZARD_DISCONNECT_BUTTON
@ ID_PILLAGE_DLG_EXIT_BUTTON
@ ID_NATION_WIZARD_PREV_LEADER_NAME_BUTTON
@ ID_NATION_WIZARD_LEADER_NAME_EDIT
@ ID_GOVERNMENT_DLG_WINDOW
utf8_str * copy_chars_to_utf8_str(utf8_str *pstr, const char *pchars)
SDL_Surface * create_text_surf_from_utf8(utf8_str *pstr)
void change_fonto_utf8(utf8_str *pstr, enum font_origin origin)
utf8_str * create_utf8_str_fonto(char *in_text, size_t n_alloc, enum font_origin origin)
SDL_Surface * create_text_surf_smaller_than_w(utf8_str *pstr, int w)
#define FREEUTF8STR(pstr)
#define create_utf8_from_char_fonto(string_in, fonto)
static SDL_Surface * get_government_surface(const struct government *gov)
static SDL_Surface * get_nation_flag_surface(const struct nation_type *pnation)
static SDL_Surface * get_sample_city_surface(int city_style)
void helptext_nation(char *buf, size_t bufsz, struct nation_type *pnation, const char *user_text)
#define fc_assert_msg(condition, message,...)
#define fc_assert(condition)
#define log_debug(message,...)
#define log_error(message,...)
struct tile * map_pos_to_tile(const struct civ_map *nmap, int map_x, int map_y)
int real_map_distance(const struct tile *tile0, const struct tile *tile1)
static int index_to_map_pos_y(int mindex)
static int index_to_map_pos_x(int mindex)
void center_tile_mapcanvas(const struct tile *ptile)
bool tile_to_canvas_pos(float *canvas_x, float *canvas_y, float zoom, const struct tile *ptile)
#define fc_calloc(n, esz)
const char * move_points_text(int mp, bool reduce)
const char * nation_rule_name(const struct nation_type *pnation)
bool nation_leader_is_male(const struct nation_leader *pleader)
const char * nation_adjective_for_player(const struct player *pplayer)
struct nation_type * nation_by_number(const Nation_type_id nation)
int nation_set_index(const struct nation_set *pset)
bool is_nation_pickable(const struct nation_type *nation)
const struct nation_leader_list * nation_leaders(const struct nation_type *pnation)
const char * nation_set_name_translation(const struct nation_set *pset)
bool is_nation_playable(const struct nation_type *nation)
int nation_set_count(void)
struct nation_set * nation_set_by_number(int id)
const char * nation_plural_translation(const struct nation_type *pnation)
struct nation_set * nation_set_by_setting_value(const char *setting)
Nation_type_id nation_index(const struct nation_type *pnation)
const char * nation_leader_name(const struct nation_leader *pleader)
const char * nation_set_rule_name(const struct nation_set *pset)
struct nation_style * style_of_nation(const struct nation_type *pnation)
#define nations_iterate_end
#define nations_iterate(NAME_pnation)
const struct option_set * server_optset
bool option_str_set(struct option *poption, const char *str)
const char * option_str_get(const struct option *poption)
struct option * optset_option_by_name(const struct option_set *poptset, const char *name)
int dsend_packet_nation_select_req(struct connection *pc, int player_no, Nation_type_id nation_no, bool is_male, const char *name, int style)
void set_government_choice(struct government *government)
struct unit * player_unit_by_number(const struct player *pplayer, int unit_id)
int player_number(const struct player *pplayer)
bool pplayers_non_attack(const struct player *pplayer, const struct player *pplayer2)
struct widget * active_widget_list
struct widget * end_widget_list
struct widget * begin_widget_list
struct widget * begin_active_widget_list
struct widget * end_active_widget_list
struct scroll_bar * scroll
struct government * government_during_revolution
struct widget * pset_name
struct widget * pset_prev
unsigned char selected_leader
struct widget * name_edit
struct widget * pset_next
struct widget * name_next
unsigned char nation_style
struct widget * change_sex
struct widget * name_prev
struct notify_goto_list * datas
struct widget * close_button
struct widget * begin_widget_list
struct widget * end_widget_list
int style_number(const struct nation_style *pstyle)
int basic_city_style_for_style(struct nation_style *pstyle)
#define styles_iterate(_p)
#define styles_iterate_end
int fc_snprintf(char *str, size_t n, const char *format,...)
int cat_snprintf(char *str, size_t n, const char *format,...)
struct extra_type * get_preferred_pillage(bv_extras extras)
bool get_units_disband_info(char *buf, size_t bufsz, struct unit_list *punits)
const char * popup_info_text(struct tile *ptile)
SDL_Surface * theme_get_background(const struct theme *t, enum theme_background background)
@ BACKGROUND_CHOOSEGOVERNMENTDLG
@ COLOR_THEME_ADVANCEDTERRAINDLG_TEXT
@ COLOR_THEME_UNITUPGRADE_TEXT
@ COLOR_THEME_NATIONDLG_LEGEND
@ COLOR_THEME_UNITDISBAND_TEXT
@ COLOR_THEME_NATIONDLG_TEXT
@ COLOR_THEME_NATIONDLG_FRAME
struct theme * active_theme
struct city * tile_city(const struct tile *ptile)
#define tile_terrain(_tile)
#define tile_has_extra(ptile, pextra)
int tileset_tile_height(const struct tileset *t)
int tileset_tile_width(const struct tileset *t)
enum unit_upgrade_result unit_upgrade_info(const struct civ_map *nmap, const struct unit *punit, char *buf, size_t bufsz)
bool can_unit_paradrop(const struct civ_map *nmap, const struct unit *punit)
void unit_activity_astr(const struct unit *punit, struct astring *astr)
static bool is_non_attack_unit_tile(const struct tile *ptile, const struct player *pplayer)
#define unit_list_iterate(unitlist, punit)
#define unit_list_iterate_end
const char * utype_veteran_name_translation(const struct unit_type *punittype, int level)
const struct unit_type * unit_type_get(const struct unit *punit)
bool unit_has_type_flag(const struct unit *punit, enum unit_type_flag_id flag)
Unit_type_id utype_number(const struct unit_type *punittype)
const char * utype_name_translation(const struct unit_type *punittype)