427 area = pwindow->
area;
435 area.w =
MAX(area.w,
buf->size.w);
443 area.w =
MAX(area.w,
buf->size.w);
452 _(
"Activate unit, close dialog"),
455 area.w =
MAX(area.w,
buf->size.w);
469 area.w =
MAX(area.w,
buf->size.w);
485 area.w =
MAX(area.w,
buf->size.w);
502 area.w =
MAX(area.w,
buf->size.w);
517 area.w =
MAX(area.w,
buf->size.w);
532 area.w =
MAX(area.w,
buf->size.w);
547 area.w =
MAX(area.w,
buf->size.w);
564 (pwindow->
size.w - pwindow->
area.w) + area.w,
568 area = pwindow->
area;
572 pwindow->
area.y + button->
size.y + 1);
577 buf->size.x = area.x;
578 buf->size.y = area.y + 1;
582 buf->size.w = area.w;
584 buf->size.x = area.x;
589 buf->size.w = area.w;
591 buf->size.x =
buf->next->size.x;
592 buf->size.y =
buf->next->size.y +
buf->next->size.h;
674 for (
i = 0;
i < happy_cost;
i++) {
981 _(
"Allow unit production\nto disband city"));
1030 buf->size.x =
buf->next->size.x;
1189 "Treasury contains %d gold.",
1199 PL_(
"Buy %s for %d gold?\n%s",
1200 "Buy %s for %d gold?\n%s", value),
1205 PL_(
"%s costs %d gold.\n%s",
1206 "%s costs %d gold.\n%s", value),
1212 _(
"Sorry, you have already bought here in this turn."));
1215 _(
"Sorry, you can't buy here in this turn."));
1245 pwindow->dst,
_(
"No"),
1263 buf->data.city = pcity;
1267 buf->next->size.w =
buf->size.w;
1278 (pwindow->size.w - pwindow->area.w) +
area.w,
1279 (pwindow->size.h - pwindow->area.h) +
area.h);
1281 area = pwindow->area;
1319 buf = pwindow->prev;
1451 "Sell %s for %d gold?",
price),
1464 pwindow->
dst,
_(
"Cancel"),
1473 pwindow->
dst,
_(
"Sell"),
1475 ok_button->
data.
ptr = (
void *)impr;
1476 ok_button->
size.w = cancel_button->
size.w;
1509 cancel_button->
size.y = ok_button->
size.y;
1668 struct city **array;
1826 struct unit_list *units;
1883 struct unit_list *units;
1956 dest.y += surf->h + 1;
2028 xx = dest.x + surf->w;
2103 int step,
i, j, count;
2123 dest.y += surf->h + 1;
2147 dest.x, dest.y, dest.x +
adj_size(176), dest.y,
2238 count += (
tmp->h + 1);
2262 dest.y += (
tmp->h + 1);
2296 count += (
tmp->h + 1);
2317 count += (
tmp->h + 1);
2339 count += (
tmp->h + 1);
2367 dest.y += (
tmp->h + 1);
2386 dest.y += (
tmp->h + 1);
2405 dest.y += (
tmp->h + 1);
2546 for (
i = 0;
i < count;
i++) {
2590 for (
i = 0;
i < count;
i++) {
2634 for (
i = 0;
i < count;
i++) {
2793 for (
i = 0;
i < count;
i++) {
2874 for (
i = 0;
i < count;
i++) {
2924 }
else if (count < 0) {
2927 _(
"City shrinks: %d %s"),
abs(count),
2928 PL_(
"turn",
"turns",
abs(count)));
2931 _(
"City growth: %d %s"), count,
2932 PL_(
"turn",
"turns", count));
2952 i = (count - 1) *
step + 14;
2993 dest.x - 1, dest.y - 1, dest.w, dest.h,
3004 dest.x - 1, dest.y - 1, dest.w, dest.h,
3033 while (count &&
cost) {
3097 dest.x - 1, dest.y - 1, dest.w, dest.h,
3166 dest.y += (
buf2->h -
buf->h) / 2;
3208 dest.y += (
buf2->h -
buf->h) / 2;
3242 dest.x - 1, dest.y - 1, dest.w, dest.h,
3393 case SUPPORTED_UNITS_PAGE:
3465 prev_y +=
buf->size.h;
3515 _(
"City of %s (Population %s citizens)"),
3590 area = pwindow->
area;
3604 buf->size.x = area.x + area.w -
buf->size.w;
3745 buf->size.y = area.y + area.h -
buf->size.h;
3760 buf->size.y = area.y + area.h -
buf->size.h;
3773 buf->size.x = area.x + (area.w -
buf->size.w) / 2;
SDL_Surface * zoomSurface(SDL_Surface *src, double zoomx, double zoomy, int smooth)
Zoom a surface by independent horizontal and vertical factors with optional smoothing.
const char * action_id_name_translation(action_id act_id)
void astr_free(struct astring *astr)
static const char * astr_str(const struct astring *astr) fc__attribute((nonnull(1)))
#define BV_ISSET(bv, bit)
const char * city_improvement_name_translation(const struct city *pcity, const struct impr_type *pimprove)
int city_granary_size(int city_size)
const char * city_name_get(const struct city *pcity)
int city_population(const struct city *pcity)
int city_unit_unhappiness(const struct civ_map *nmap, struct unit *punit, int *free_unhappy)
int city_production_turns_to_build(const struct city *pcity, bool include_shield_stock)
bool city_unhappy(const struct city *pcity)
bool city_celebrating(const struct city *pcity)
int city_illness_calc(const struct city *pcity, int *ill_base, int *ill_size, int *ill_trade, int *ill_pollution)
bool city_happy(const struct city *pcity)
int city_map_radius_sq_get(const struct city *pcity)
citizens city_specialists(const struct city *pcity)
int city_turns_to_grow(const struct city *pcity)
const char * city_production_name_translation(const struct city *pcity)
static citizens city_size_get(const struct city *pcity)
#define city_owner(_pcity_)
#define city_built_iterate(_pcity, _p)
#define city_built_iterate_end
int city_rename(struct city *pcity, const char *name)
int city_buy_production(struct city *pcity)
int city_toggle_worker(struct city *pcity, int city_x, int city_y)
void city_rotate_specialist(struct city *pcity, int citizen_index)
bool canvas_to_city_pos(int *city_x, int *city_y, int city_radius_sq, int canvas_x, int canvas_y)
int city_sell_improvement(struct city *pcity, Impr_type_id sell_id)
bool city_can_buy(const struct city *pcity)
bool can_client_issue_orders(void)
struct city * get_nearest_city(const struct unit *punit, int *sq_dist)
bool cma_is_city_under_agent(const struct city *pcity, struct cm_parameter *parameter)
void request_unit_fortify(struct unit *punit)
void unit_focus_set(struct unit *punit)
void request_unit_change_homecity(struct unit *punit)
void request_unit_sentry(struct unit *punit)
#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 * 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 cost
int get_city_bonus(const struct city *pcity, enum effect_type effect_type)
int get_city_bonus_effects(struct effect_list *plist, const struct city *pcity, const struct output_type *poutput, enum effect_type effect_type)
bool building_has_effect(const struct impr_type *pimprove, enum effect_type effect_type)
#define effect_list_iterate_end
#define effect_list_iterate(effect_list, peffect)
#define PL_(String1, String2, n)
const char * population_to_text(int thousand_citizen)
struct city * game_city_by_number(int id)
void canvas_free(struct canvas *store)
struct canvas * canvas_create(int width, int height)
void real_city_dialog_popup(struct city *pcity)
bool city_dialog_is_open(struct city *pcity)
void real_city_dialog_refresh(struct city *pcity)
void popdown_all_city_dialogs(void)
void refresh_unit_city_dialogs(struct unit *punit)
void popdown_city_dialog(struct city *pcity)
static int units_orders_city_dlg_callback(struct widget *button)
static void redraw_supported_units_city_dialog(struct widget *city_window, struct city *pcity)
static int activate_and_exit_units_orders_city_dlg_callback(struct widget *button)
static int cancel_buy_prod_city_dlg_callback(struct widget *button)
static int units_orders_dlg_callback(struct widget *button)
static int options_city_dlg_callback(struct widget *button)
static void redraw_city_dialog(struct city *pcity)
static int army_city_dlg_callback(struct widget *button)
static void rebuild_imprm_list(struct city *pcity)
static void redraw_happiness_city_dialog(const struct widget *city_window, struct city *pcity)
static void redraw_misc_city_dialog(struct widget *city_window, struct city *pcity)
static void redraw_info_city_dialog(struct widget *city_window, struct city *pcity)
static int new_name_city_dlg_callback(struct widget *pedit)
static int sell_imprvm_dlg_cancel_callback(struct widget *cancel_button)
static int next_prev_city_dlg_callback(struct widget *button)
static void disable_city_dlg_widgets(void)
static int sell_imprvm_dlg_ok_callback(struct widget *ok_button)
static SDL_Surface * create_unit_surface(struct unit *punit, bool support, int w, int h)
static int resource_map_city_dlg_callback(struct widget *map)
static void refresh_city_names(struct city *pcity)
void enable_city_dlg_widgets(void)
static int buy_prod_city_dlg_callback(struct widget *button)
static int upgrade_units_orders_city_dlg_callback(struct widget *button)
static int fortify_units_orders_city_dlg_callback(struct widget *button)
static void redraw_army_city_dialog(struct widget *city_window, struct city *pcity)
static void popdown_hurry_production_dialog(void)
static int change_prod_dlg_callback(struct widget *button)
struct impr_type * get_building_for_effect(enum effect_type effect_type)
void popup_hurry_production_dialog(struct city *pcity, SDL_Surface *pdest)
static void create_city_options_widget_list(struct city *pcity)
static int supported_unit_city_dlg_callback(struct widget *button)
static int city_comp_by_turn_founded(const void *a, const void *b)
static int activate_units_orders_city_dlg_callback(struct widget *button)
static void popdown_city_menu_dlg(bool enable_city_dialog_widgets)
static struct small_dialog * hurry_prog_dlg
static int hurry_production_window_callback(struct widget *pwindow)
static void del_city_dialog(void)
static int ok_buy_prod_city_dlg_callback(struct widget *button)
static int cancel_units_orders_city_dlg_callback(struct widget *button)
static void rebuild_citydlg_title_str(struct widget *pwindow, struct city *pcity)
static int cma_city_dlg_callback(struct widget *button)
static int homecity_units_orders_city_dlg_callback(struct widget *button)
static int sentry_units_orders_city_dlg_callback(struct widget *button)
static struct city_dialog * pcity_dlg
static int exit_city_dlg_callback(struct widget *button)
static int sell_imprvm_dlg_callback(struct widget *impr)
static int info_city_dlg_callback(struct widget *button)
static int disband_units_orders_city_dlg_callback(struct widget *button)
static int happy_city_dlg_callback(struct widget *button)
static int city_dlg_callback(struct widget *pwindow)
static float city_map_zoom
SDL_Surface * get_scaled_city_map(struct city *pcity)
static int misc_panel_city_dlg_callback(struct widget *pwidget)
void free_city_units_lists(void)
static void create_present_supported_units_widget_list(struct unit_list *units)
bool is_city_report_open(void)
void popup_city_cma_dialog(struct city *pcity)
SDL_Color * get_theme_color(enum theme_color themecolor)
void put_window_near_map_tile(struct widget *pwindow, int window_width, int window_height, struct tile *ptile)
void popup_unit_disband_dlg(struct unit *punit, bool city)
void popup_unit_upgrade_dlg(struct unit *punit, bool city)
int main_window_width(void)
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)
int alphablit(SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect, unsigned char alpha_mod)
bool is_in_rect_area(int x, int y, const SDL_Rect *rect)
struct sdl2_data main_data
SDL_Surface * create_surf(int width, int height, Uint32 flags)
void get_smaller_surface_rect(SDL_Surface *surf, SDL_Rect *rect)
void create_frame(SDL_Surface *dest, Sint16 left, Sint16 top, Sint16 width, Sint16 height, SDL_Color *pcolor)
int main_window_height(void)
SDL_Surface * resize_surface_box(const SDL_Surface *psrc, Uint16 new_width, Uint16 new_height, int smooth, bool scale_up, bool absolute_dimensions)
@ ID_CITY_DLG_HAPPY_BUTTON
@ ID_CITY_DLG_CHANGE_PROD_BUTTON
@ ID_CITY_DLG_PROD_BUY_BUTTON
@ ID_CITY_DLG_RESOURCE_MAP
@ ID_CITY_DLG_NEXT_BUTTON
@ ID_CITY_DLG_OPTIONS_BUTTON
@ ID_CITY_DLG_SUPPORT_BUTTON
@ ID_CITY_DLG_ARMY_BUTTON
@ ID_REVOLUTION_DLG_WINDOW
@ ID_CITY_DLG_EXIT_BUTTON
@ ID_CITY_DLG_INFO_BUTTON
@ ID_CITY_DLG_PREV_BUTTON
#define CF_CHANGED_CITY_NAME
struct widget * selected_widget
#define CF_CITY_STATUS_SPECIAL
#define PRESSED_EVENT(event)
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)
#define FREEUTF8STR(pstr)
#define create_utf8_from_char_fonto(string_in, fonto)
void reload_citizens_icons(int style)
SDL_Surface * get_city_gfx(void)
static SDL_Surface * get_building_surface(const struct impr_type *pimprove)
static SDL_Surface * get_citizen_surface(enum citizen_category type, int citizen_index)
static SDL_Surface * get_tax_surface(Output_type_id otype)
static SDL_Surface * get_unittype_surface(const struct unit_type *punittype, enum direction8 facing)
SDL_Surface * create_city_map(struct city *pcity)
SDL_Surface * theme_get_background(const struct theme *t, enum theme_background background)
@ COLOR_THEME_CITYDLG_INFOPANEL
@ COLOR_THEME_CITYDLG_SELL
@ COLOR_THEME_CITYDLG_FOODPERTURN
@ COLOR_THEME_CITYDLG_IMPR
@ COLOR_THEME_CITYDLG_BUY
@ COLOR_THEME_CITYDLG_SHIELDSTOCK
@ COLOR_THEME_CITYDLG_LUX
@ COLOR_THEME_CITYDLG_TRADE
@ COLOR_THEME_CITYDLG_PROD
@ COLOR_THEME_CITYDLG_GROWTH
@ COLOR_THEME_CITYDLG_SUPPORT
@ COLOR_THEME_CITYDLG_GRANARY
@ COLOR_THEME_CITYDLG_SCIENCE
@ COLOR_THEME_CITYDLG_CORRUPTION
@ COLOR_THEME_CITYDLG_FOODSTOCK
@ COLOR_THEME_CITYDLG_GOLD
@ COLOR_THEME_CITYDLG_STOCKS
@ COLOR_THEME_CITYDLG_UPKEEP
@ COLOR_THEME_CITYDLG_FRAME
@ COLOR_THEME_CITYDLG_FOOD_SURPLUS
@ COLOR_THEME_CITYDLG_PANEL
@ COLOR_THEME_CHECKBOX_LABEL_TEXT
struct theme * active_theme
void popup_worklist_editor(struct city *pcity, struct global_worklist *gwl)
struct impr_type * improvement_by_number(const Impr_type_id id)
int impr_sell_gold(const struct impr_type *pimprove)
bool can_city_sell_building(const struct city *pcity, const struct impr_type *pimprove)
Impr_type_id improvement_number(const struct impr_type *pimprove)
int impr_build_shield_cost(const struct city *pcity, const struct impr_type *pimprove)
bool is_wonder(const struct impr_type *pimprove)
bool is_convert_improvement(const struct impr_type *pimprove)
const char * improvement_name_translation(const struct impr_type *pimprove)
#define improvement_iterate_end
#define improvement_iterate(_p)
#define fc_assert(condition)
#define fc_assert_ret_val(condition, val)
void put_unit(const struct unit *punit, struct canvas *pcanvas, float zoom, int canvas_x, int canvas_y)
void center_tile_mapcanvas(const struct tile *ptile)
#define fc_calloc(n, esz)
const char * move_points_text(int mp, bool reduce)
int dsend_packet_city_options_req(struct connection *pc, int city_id, bv_city_options options, enum city_wl_cancel_behavior wl_cb)
struct unit * player_unit_by_number(const struct player *pplayer, int unit_id)
#define requirement_vector_iterate_end
#define requirement_vector_iterate(req_vec, preq)
Specialist_type_id specialist_count(void)
struct widget * begin_active_widget_list
struct widget * end_widget_list
struct widget * end_active_widget_list
struct widget * active_widget_list
struct scroll_bar * scroll
struct widget * begin_widget_list
struct widget * resource_map
struct advanced_dialog * imprv
struct widget * begin_city_menu_widget_list
struct widget * end_city_widget_list
enum city_dialog::@191 page
struct widget * begin_city_widget_list
struct widget * city_name_edit
struct widget * end_city_menu_widget_list
struct widget * add_point
struct advanced_dialog * panel
SDL_Surface * big_trade_corr
SDL_Surface * big_shield_corr
SDL_Surface * female_angry
SDL_Surface * specialists[SP_MAX]
SDL_Surface * female_happy
SDL_Surface * female_content
SDL_Surface * big_coin_upkeep
SDL_Surface * female_unhappy
SDL_Surface * male_unhappy
SDL_Surface * male_content
SDL_Surface * big_coin_corr
SDL_Surface * big_food_corr
SDL_Surface * big_food_surplus
SDL_Surface * big_shield_surplus
enum city_wl_cancel_behavior wlcb
struct unit_list * info_units_present
bv_city_options city_options
struct unit_list * info_units_supported
struct universal production
citizens feel[CITIZEN_LAST][FEELING_LAST]
citizens specialists[SP_MAX]
struct unit_list * units_supported
struct city::@17::@20 client
struct packet_game_info info
struct city_list * cities
struct widget * begin_widget_list
struct widget * end_widget_list
enum unit_activity activity
int style_of_city(const struct city *pcity)
int fc_snprintf(char *str, size_t n, const char *format,...)
size_t fc_strlcat(char *dest, const char *src, size_t n)
#define sz_strlcat(dest, src)
const char * get_nearest_city_text(struct city *pcity, int sq_dist)
const char * unit_description(struct unit *punit)
struct city * tile_city(const struct tile *ptile)
int tileset_full_tile_height(const struct tileset *t)
int tileset_unit_with_small_upkeep_height(const struct tileset *t)
int tileset_unit_layout_small_offset_y(const struct tileset *t)
int tileset_full_tile_width(const struct tileset *t)
int tileset_tile_width(const struct tileset *t)
#define trade_routes_iterate_end
#define trade_routes_iterate(c, proute)
const struct unit_type * utype
const struct impr_type * building
void unit_activity_astr(const struct unit *punit, struct astring *astr)
#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)
const struct unit_type * can_upgrade_unittype(const struct player *pplayer, const struct unit_type *punittype)
int utype_build_shield_cost(const struct city *pcity, const struct player *pplayer, const struct unit_type *punittype)
const char * utype_name_translation(const struct unit_type *punittype)