95
105
extern int seconds_to_turndone;
97
bool better_fog = TRUE;
98
bool enable_alpha = TRUE;
100
107
const static RECT textwin_size={0,1,0,100};
102
109
struct fcwin_box *main_win_box;
105
112
const char * const gui_character_encoding = NULL;
106
113
const bool gui_use_transliteration = TRUE;
108
client_option gui_options[] = {
109
GEN_BOOL_OPTION_CB(better_fog,
110
N_("Better fog-of-war drawing"),
111
N_("If this is enabled then a better method is used for "
112
"drawing fog-of-war. It is not any slower but will "
113
"consume about twice as much memory."),
114
COC_GRAPHICS, mapview_redraw_callback),
115
GEN_BOOL_OPTION_CB(enable_alpha,
116
N_("Enable alpha blending"),
117
N_("If this is enabled, then alpha blending will be "
118
"used in rendering, instead of an ordered dither. "
119
"If there is no hardware support for alpha "
120
"blending, this is much slower."),
121
COC_GRAPHICS, mapview_redraw_callback)
123
const int num_gui_options = ARRAY_SIZE(gui_options);
125
115
bool process_net_input(void);
127
117
struct callback {
535
525
WM_SETFONT,(WPARAM) font_12arial,MAKELPARAM(TRUE,0));
536
526
SendMessage(unit_info_label,
537
527
WM_SETFONT,(WPARAM) font_12arial,MAKELPARAM(TRUE,0));
538
append_output_window(_("Freeciv is free software and you are welcome to distribute copies of"
539
" it\nunder certain conditions; See the \"Copying\" item on the Help"
540
" menu.\nNow.. Go give'em hell!") );
528
chat_welcome_message();
541
529
hchatline=fcwin_box_add_edit(main_win_box,"",40,
543
531
ES_WANTRETURN | ES_AUTOVSCROLL | ES_MULTILINE,
566
554
FD_SET(net_input, &civfdset);
569
if (my_select(1, &civfdset, NULL, NULL, &tv)) {
557
if (fc_select(1, &civfdset, NULL, NULL, &tv)) {
570
558
if (FD_ISSET(net_input, &civfdset)) {
571
559
input_from_server(net_input);
572
560
processed = TRUE;
591
/****************************************************************************
592
Extra initializers for client options.
593
****************************************************************************/
594
void gui_options_extra_init(void)
603
599
static HINSTANCE hmsimg32;
605
601
/**************************************************************************
621
617
if ((AlphaBlend = GetProcAddress(hmsimg32, "AlphaBlend"))) {
622
618
/* fall through, do nothing */
624
freelog(LOG_NORMAL, "No AlphaBlend() in msimg32.dll, alpha blending disabled");
620
freelog(LOG_TEST, "No AlphaBlend() in msimg32.dll, alpha blending disabled");
628
freelog(LOG_NORMAL, "No msimg32.dll, alpha blending disabled");
624
freelog(LOG_TEST, "No msimg32.dll, alpha blending disabled");
632
628
hdc = GetDC(map_window);
634
630
if (GetDeviceCaps(hdc, BITSPIXEL) < 32) {
635
freelog(LOG_NORMAL, "Not running in 32 bit color, alpha blending disabled");
631
freelog(LOG_TEST, "Not running in 32 bit color, alpha blending disabled");
636
632
ReleaseDC(map_window, hdc);
642
638
#define SB_NONE 0
644
640
if (GetDeviceCaps(hdc, SHADEBLENDCAPS) == SB_NONE) {
645
freelog(LOG_NORMAL, "Device does not support alpha blending, alpha blending disabled");
641
freelog(LOG_TEST, "Device does not support alpha blending, alpha blending disabled");
646
642
ReleaseDC(map_window, hdc);
715
/**************************************************************************
711
extern void anim_cursor(float time);
713
/**************************************************************************
714
Entry point for whole freeciv client program.
715
**************************************************************************/
716
int main(int argc, char **argv)
718
return client_main(argc, argv);
721
/**************************************************************************
722
Entry point for GUI specific portion. Called from client_main()
717
723
**************************************************************************/
719
725
ui_main(int argc, char *argv[])
825
830
/**************************************************************************
832
**************************************************************************/
833
enum gui_type get_gui_type(void)
838
/**************************************************************************
826
839
Update the connected users list at pregame state.
827
840
**************************************************************************/
828
841
void update_conn_list_dialog(void)
907
920
callback_list_prepend(callbacks, cb);
923
/****************************************************************************
924
Stub for editor function
925
****************************************************************************/
926
void editgui_tileset_changed(void)
929
/****************************************************************************
930
Stub for editor function
931
****************************************************************************/
932
void editgui_refresh(void)
935
/****************************************************************************
936
Stub for editor function
937
****************************************************************************/
938
void editgui_popup_properties(const struct tile_list *tiles, int objtype)
941
/****************************************************************************
942
Stub for editor function
943
****************************************************************************/
944
void editgui_popdown_all(void)
947
/****************************************************************************
948
Stub for editor function
949
****************************************************************************/
950
void editgui_notify_object_changed(int objtype, int object_id, bool remove)
953
/****************************************************************************
954
Stub for editor function
955
****************************************************************************/
956
void editgui_notify_object_created(int tag, int id)
959
/****************************************************************************
960
Stub for ggz function
961
****************************************************************************/
962
void gui_ggz_embed_leave_table(void)
965
/****************************************************************************
966
Stub for ggz function
967
****************************************************************************/
968
void gui_ggz_embed_ensure_server(void)
972
/**************************************************************************
973
Updates a gui font style.
974
**************************************************************************/
975
void gui_update_font(const char *font_name, const char *font_value)