56#define SPECLIST_TAG dialog
57#define SPECLIST_TYPE struct diplomacy_dialog
60#define dialog_list_iterate(dialoglist, pdialog) \
61 TYPED_LIST_ITERATE(struct diplomacy_dialog, dialoglist, pdialog)
62#define dialog_list_iterate_end LIST_ITERATE_END
100 if ((pdialog->treaty->plr0 ==
we && pdialog->treaty->plr1 ==
they)
101 || (pdialog->treaty->plr0 ==
they && pdialog->treaty->
plr1 ==
we)) {
160 cont->value >> 16) & 0xFFFF),
431 _(
"Invalid amount of gold specified."));
511 area = pwindow->area;
592 _(
"Give shared vision"),
612 buf->string_utf8->fgcol
626 buf->string_utf8->fgcol
643 buf->string_utf8->fgcol
661 buf->string_utf8->fgcol
676 buf->string_utf8->fgcol
696 buf->string_utf8->fgcol
735 buf->string_utf8->fgcol
748 buf->string_utf8->fgcol
754 buf->data.cont = cont;
777 buf->string_utf8->fgcol
783 buf->data.cont = cont;
819 buf->string_utf8->fgcol
829 for (j = 0; j <
i; j++) {
835 buf->string_utf8->fgcol
839 buf->data.cont = cont;
858 if (area.h < (count *
height)) {
877 (pwindow->size.w - pwindow->area.w) + area.w,
878 (pwindow->size.h - pwindow->area.h) + area.h);
880 area = pwindow->area;
970 pwindow->data.cont =
cont;
988 buf->private_data.cbox->state =
FALSE;
1004 buf->private_data.cbox->state =
FALSE;
1043 area = pwindow->area;
1049 buf = pwindow->prev;
1230 && (((
buf->data.cont->value >> 16) & 0xFFFF) == (
int)
type)
1231 && ((
buf->data.cont->value & 0xFFFF) == value))
1235 && ((
buf->data.cont->value >> 16) & 0xFFFF) == (
int)
type
1236 && (
buf->data.cont->value & 0xFFFF) == value)) {
1260 if (
buf->private_data.cbox->state) {
1262 src.w =
buf->private_data.cbox->false_theme->w / 4;
1263 src.h =
buf->private_data.cbox->false_theme->h;
1488 pwindow->dst,
_(
"No"),
1505 buf->data.player = pplayer;
1509 buf->next->size.w =
buf->size.w;
1519 (pwindow->size.w - pwindow->area.w) +
area.w,
1520 (pwindow->size.h - pwindow->area.h) +
area.h);
1522 area = pwindow->area;
1537 buf = pwindow->prev;
1605 area = pwindow->area;
1611 "What are your wishes?"),
1615 "What are your wishes?"),
1645 buf->string_utf8->fgcol
1647 buf->data.player = pplayer;
1651 buf->next->size.w =
buf->size.w;
1663 _(
"Withdraw vision"),
1668 buf->data.player = pplayer;
1670 buf->string_utf8->fgcol
1674 buf->next->size.w =
buf->size.w;
1683 _(
"Call Diplomatic Meeting"),
1688 buf->data.player = pplayer;
1693 buf->next->size.w =
buf->size.w;
1700 _(
"Send them back"),
1725 (pwindow->size.w - pwindow->area.w) +
area.w,
1726 (pwindow->size.h - pwindow->area.h) +
area.h);
1728 area = pwindow->area;
1757 buf->size.x =
buf->next->size.x;
1766 buf->size.x =
buf->next->size.x;
1775 buf->size.x =
buf->next->size.x;
struct canvas int int struct sprite int int int int height
struct canvas int int struct sprite int int int width
void output_window_append(const struct ft_color color, const char *featured_text)
bool is_capital(const struct city *pcity)
const char * city_name_get(const struct city *pcity)
int city_name_compare(const void *p1, const void *p2)
#define city_list_iterate(citylist, pcity)
#define city_list_iterate_end
bool can_meet_with_player(const struct player *pplayer)
bool can_client_issue_orders(void)
void client_diplomacy_clause_string(char *buf, int bufsiz, struct Clause *pclause)
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
struct treaty struct player struct player *initiator gui_recv_create_clause
struct treaty struct player * they
struct treaty struct player struct player *initiator struct treaty struct player *they gui_recv_accept_treaty
bool clause_enabled(enum clause_type type)
#define clause_list_iterate_end
#define clause_list_iterate(clauselist, pclause)
const struct ft_color ftc_client
void gui_init_meeting(struct treaty *ptreaty, struct player *they, struct player *initiator)
static void update_diplomacy_dialog(struct Diplomacy_dialog *pdialog)
void diplomacy_dialog_init(void)
static struct Diplomacy_dialog * create_diplomacy_dialog(struct treaty *ptreaty, struct player *plr0, struct player *plr1)
#define dialog_list_iterate_end
void gui_recv_remove_clause(struct treaty *ptreaty, struct player *they)
void close_all_diplomacy_dialogs(void)
#define dialog_list_iterate(dialoglist, pdialog)
static struct dialog_list * dialog_list
void gui_prepare_clause_updt(struct treaty *ptreaty, struct player *they)
void diplomacy_dialog_done(void)
static void popup_diplomacy_dialog(struct treaty *ptreaty, struct player *they, struct player *initiator)
SDL_Color * get_theme_color(enum theme_color themecolor)
static int dipomatic_window_callback(struct widget *pwindow)
static int shared_tiles_callback(struct widget *pwidget)
static int accept_treaty_callback(struct widget *pwidget)
static void update_clauses_list(struct diplomacy_dialog *pdialog)
static int remove_clause_callback(struct widget *pwidget)
static int cancel_pact_dlg_callback(struct widget *pwidget)
static void popdown_sdip_dialog(void)
static int sdip_window_callback(struct widget *pwindow)
static int withdraw_vision_dlg_callback(struct widget *pwidget)
static int cities_callback(struct widget *pwidget)
static int maps_callback(struct widget *pwidget)
static int cancel_meeting_callback(struct widget *pwidget)
static int embassy_callback(struct widget *pwidget)
static int gold_callback(struct widget *pwidget)
static void update_acceptance_icons(struct diplomacy_dialog *pdialog)
static void popdown_diplomacy_dialogs(void)
static void popdown_diplomacy_dialog(struct diplomacy_dialog *pdialog)
static int vision_callback(struct widget *pwidget)
static int techs_callback(struct widget *pwidget)
static int pact_callback(struct widget *pwidget)
static struct advanced_dialog * popup_diplomatic_objects(struct player *pplayer0, struct player *pplayer1, struct widget *main_window, bool L_R)
static struct diplomacy_dialog * get_diplomacy_dialog(struct player *they)
static int cancel_sdip_dlg_callback(struct widget *pwidget)
static int call_meeting_dlg_callback(struct widget *pwidget)
static void popup_war_dialog(struct player *pplayer)
static struct small_dialog * spy_dlg
static void remove_clause_widget_from_list(struct player *they, struct player *giver, enum clause_type type, int value)
int main_window_width(void)
int fill_rect_alpha(SDL_Surface *surf, SDL_Rect *prect, SDL_Color *pcolor)
int alphablit(SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect, unsigned char alpha_mod)
struct sdl2_data main_data
int main_window_height(void)
#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)
#define FREEUTF8STR(pstr)
#define create_utf8_from_char_fonto(string_in, fonto)
@ COLOR_THEME_DIPLODLG_MEETING_TEXT
@ COLOR_THEME_WARDLG_TEXT
@ COLOR_THEME_DIPLODLG_MEETING_HEADING_TEXT
@ COLOR_THEME_DIPLODLG_TEXT
#define fc_assert(condition)
#define fc_calloc(n, esz)
const char * nation_adjective_for_player(const struct player *pplayer)
int dsend_packet_diplomacy_create_clause_req(struct connection *pc, int counterpart, int giver, enum clause_type type, int value)
int dsend_packet_diplomacy_cancel_pact(struct connection *pc, int other_player_id, enum clause_type clause)
int dsend_packet_diplomacy_init_meeting_req(struct connection *pc, int counterpart)
int dsend_packet_diplomacy_cancel_meeting_req(struct connection *pc, int counterpart)
int dsend_packet_diplomacy_remove_clause_req(struct connection *pc, int counterpart, int giver, enum clause_type type, int value)
int dsend_packet_diplomacy_accept_treaty_req(struct connection *pc, int counterpart)
struct player * player_by_number(const int player_id)
int player_number(const struct player *pplayer)
enum dipl_reason pplayer_can_make_treaty(const struct player *p1, const struct player *p2, enum diplstate_type treaty)
bool player_has_real_embassy(const struct player *pplayer, const struct player *pplayer2)
enum dipl_reason pplayer_can_cancel_treaty(const struct player *p1, const struct player *p2)
struct player_diplstate * player_diplstate_get(const struct player *plr1, const struct player *plr2)
bool gives_shared_vision(const struct player *me, const struct player *them)
struct research * research_get(const struct player *pplayer)
enum tech_state research_invention_state(const struct research *presearch, Tech_type_id tech)
bool research_invention_gettable(const struct research *presearch, const Tech_type_id tech, bool allow_holes)
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
SDL_Surface * false_theme
struct packet_game_info info
struct advanced_dialog * pdialog
struct advanced_dialog * poffers
struct advanced_dialog * pwants
bool tech_trade_allow_holes
struct widget * begin_widget_list
struct widget * end_widget_list
struct clause_list * clauses
int fc_snprintf(char *str, size_t n, const char *format,...)
struct advance * advance_by_number(const Tech_type_id atype)
const char * advance_name_translation(const struct advance *padvance)
#define advance_index_iterate_max(_start, _index, _max)
#define advance_index_iterate_max_end
static Tech_type_id advance_count(void)