19#ifdef SDL2_PLAIN_INCLUDE
50#define M_PI 3.14159265358979323846
53#define M_PI_2 1.57079632679489661923
112 pplayer = pplayer->
prev;
133 pplayer = pplayer->
prev;
154 pplayer = pplayer->
prev;
175 pplayer = pplayer->
prev;
196 pplayer = pplayer->
prev;
233 pplayer0 = pplayer0->
prev;
264 dst0.x = pplayer0->
size.x + pplayer0->
size.w / 2;
265 dst0.y = pplayer0->
size.y + pplayer0->
size.h / 2;
268 pplayer1 = pplayer1->
prev;
272 dst1.x = pplayer1->
size.x + pplayer1->
size.w / 2;
273 dst1.y = pplayer1->
size.y + pplayer1->
size.h / 2;
280 dst0.x, dst0.y, dst1.x, dst1.y,
287 dst0.x, dst0.y, dst1.x, dst1.y,
294 dst0.x, dst0.y, dst1.x, dst1.y,
301 dst0.x, dst0.y, dst1.x, dst1.y,
308 dst0.x, dst0.y, dst1.x, dst1.y,
455 if (!pplayer->is_alive) {
468 if (pplayer->is_alive) {
472 buf->data.player = pplayer;
487 r -= ((
MAX(
buf->size.w,
buf->size.h) * 2));
489 a = (2.0 *
M_PI) /
n;
535 buf->size.y =
n + (
h -
buf->size.h) / 2;
607 bool try_dlg =
FALSE;
608 bool popdown =
FALSE;
613 case SDL_BUTTON_LEFT:
616 case SDL_BUTTON_MIDDLE:
620 case SDL_BUTTON_RIGHT:
638 if (ds->
type != DS_NO_CONTACT
639 && (ds->
type != DS_WAR
647 "with your current contact state - "
648 "Try right mouse button for intelligence."));
670 char cbuf[128], *state;
718 if (
is_ai(pplayer)) {
721 if (pplayer->is_connected) {
722 if (pplayer->phase_done) {
728 state =
_(
"disconnected");
732 if (ds->
type == DS_CEASEFIRE) {
744 pstr->
style |= TTF_STYLE_BOLD;
784 buf->string_utf8->bgcol = (SDL_Color) {0, 0, 0, 0};
786 buf->data.player = pplayer;
792 area.w =
MAX(w, buf->size.w);
793 area.h += buf->size.h;
817 units_h = 20 * buf->size.h;
828 (pwindow->
size.w - pwindow->
area.w) + area.w,
829 (pwindow->
size.h + pwindow->
area.h) + area.h);
831 area = pwindow->
area;
849 buf->
size.x = area.x + area.w - buf->size.w - 1;
860 area.x + area.w, area.y,
void astr_free(struct astring *astr)
void astr_add_line(struct astring *astr, const char *format,...)
static const char * astr_str(const struct astring *astr) fc__attribute((nonnull(1)))
bool can_meet_with_player(const struct player *pplayer)
bool can_intel_with_player(const struct player *pplayer)
#define PL_(String1, String2, n)
static void popup_diplomacy_dialog(int other_player_id, int initiated_from)
void popup_intel_dialog(struct player *p)
void popdown_players_dialog(void)
void real_players_dialog_update(void *unused)
void popup_players_dialog(bool raise)
#define set_output_window_text(_pstr_)
SDL_Color * get_theme_color(enum theme_color themecolor)
int main_window_width(void)
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)
struct sdl2_data main_data
int main_window_height(void)
#define CF_DRAW_PLAYERS_ALLIANCE_STATUS
#define CF_DRAW_PLAYERS_CEASEFIRE_STATUS
#define CF_DRAW_PLAYERS_PEACE_STATUS
#define CF_DRAW_PLAYERS_NEUTRAL_STATUS
#define CF_DRAW_PLAYERS_WAR_STATUS
#define PRESSED_EVENT(event)
static struct advanced_dialog * short_players_dlg
void popdown_players_nations_dialog(void)
static int toggle_draw_alliance_status_callback(struct widget *pwidget)
void popup_players_nations_dialog(void)
static int exit_players_nations_dlg_callback(struct widget *pwidget)
static int player_callback(struct widget *pwidget)
static int toggle_draw_neutral_status_callback(struct widget *pwidget)
static int players_window_dlg_callback(struct widget *pwindow)
static int toggle_draw_war_status_callback(struct widget *pwidget)
static int toggle_draw_peace_status_callback(struct widget *pwidget)
static int exit_players_dlg_callback(struct widget *pwidget)
static int player_nation_callback(struct widget *pwidget)
static int players_nations_window_dlg_callback(struct widget *pwindow)
static int toggle_draw_ceasefire_status_callback(struct widget *pwidget)
static bool have_diplomat_info_about(struct player *pplayer)
static struct small_dialog * pplayers_dlg
utf8_str * copy_chars_to_utf8_str(utf8_str *pstr, const char *pchars)
SDL_Surface * create_text_surf_from_utf8(utf8_str *pstr)
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)
static SDL_Surface * get_nation_flag_surface(const struct nation_type *pnation)
#define fc_calloc(n, esz)
const char * nation_adjective_for_player(const struct player *pplayer)
struct nation_type * nation_of_player(const struct player *pplayer)
bool team_has_embassy(const struct team *pteam, const struct player *tgt_player)
struct player_diplstate * player_diplstate_get(const struct player *plr1, const struct player *plr2)
#define players_iterate_end
#define players_iterate(_pplayer)
static bool is_barbarian(const struct player *pplayer)
struct player_dlg_column player_dlg_columns[]
const int num_player_dlg_columns
void players_dialog_update(void)
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 widget * begin_widget_list
struct widget * end_widget_list
int fc_snprintf(char *str, size_t n, const char *format,...)
@ COLOR_THEME_PLRDLG_CEASEFIRE
@ COLOR_THEME_PLRDLG_ALLIANCE
@ COLOR_THEME_WIDGET_DISABLED_TEXT
@ COLOR_THEME_PLRDLG_PEACE
@ COLOR_THEME_PLRDLG_TEXT
@ COLOR_THEME_PLRDLG_WAR_RESTRICTED
@ COLOR_THEME_PLRDLG_ARMISTICE