00001
00002
00003
00004
00005
00006 #include "cliglobs.h"
00007 #include "common.h"
00008 #include "geometry.h"
00009 #include "lcintl.h"
00010
00011 Screen_Geometry scr;
00012 short mappointoldtype[WORLD_SIDE_LEN][WORLD_SIDE_LEN];
00013
00014 int lc_mouse_type;
00015 char progbox[(PROGBOXW + 16) * (PROGBOXH + 16)];
00016
00017
00018 int overwrite_transport_flag = 0;
00019 int suppress_popups = 0;
00020 int time_multiplex_stats = 0;
00021 int no_init_help = 0;
00022 int confine_flag = 0;
00023 int skip_splash_screen = 0;
00024 int suppress_firsttime_module_help = 0;
00025
00026 int main_screen_flag = MAIN_SCREEN_NORMAL_FLAG;
00027
00028 int mappoint_stats_flag = 0, mappoint_stats_time = 0;
00029 int mini_screen_flags = MINI_SCREEN_NORMAL_FLAG;
00030 int mini_screen_time = 0;
00031 int mini_screen_port_x, mini_screen_port_y;
00032
00033 float gamma_correct_red = 0.0, gamma_correct_green = 0.0, gamma_correct_blue = 0.0;
00034
00035 int mouse_initialized = 0;
00036 int cs_mouse_x, cs_mouse_y, cs_mouse_button;
00037 int cs_mouse_shifted = 0;
00038 int cs_mouse_xmax, cs_mouse_ymax, omx, omy, mox = 10, moy = 10;
00039
00040 int mouse_hide_count;
00041 #if defined (WIN32)
00042
00043 int cs_square_mouse_visible = 0;
00044 #endif
00045 int kmousex, kmousey, kmouse_val, reset_mouse_flag, mt_flag = 0;
00046
00047 char under_square_mouse_pointer_top[20 * 2 * 4];
00048 char under_square_mouse_pointer_left[18 * 2 * 4];
00049 char under_square_mouse_pointer_right[18 * 2 * 4];
00050 char under_square_mouse_pointer_bottom[20 * 2 * 4];
00051 int mouse_type = MOUSE_TYPE_NORMAL;
00052
00053 int mt_start_posx, mt_start_posy, mt_current_posx, mt_current_posy;
00054
00055 char *months[] =
00056 {N_("Jan"), N_("Feb"), N_("Mar"), N_("Apr"),
00057 N_("May"), N_("Jun"), N_("Jul"), N_("Aug"),
00058 N_("Sep"), N_("Oct"), N_("Nov"), N_("Dec")};
00059
00060 char *up_pbar1_graphic, *up_pbar2_graphic;
00061 char *down_pbar1_graphic, *down_pbar2_graphic, *pop_pbar_graphic;
00062 char *tech_pbar_graphic, *food_pbar_graphic, *jobs_pbar_graphic;
00063 char *money_pbar_graphic, *coal_pbar_graphic, *goods_pbar_graphic;
00064 char *ore_pbar_graphic, *steel_pbar_graphic;
00065 char *pause_button1_off, *pause_button2_off;
00066 char *pause_button1_on, *pause_button2_on;
00067 char *fast_button1_off, *fast_button2_off;
00068 char *fast_button1_on, *fast_button2_on;
00069 char *med_button1_off, *med_button2_off;
00070 char *med_button1_on, *med_button2_on;
00071 char *slow_button1_off, *slow_button2_off;
00072 char *slow_button1_on, *slow_button2_on;
00073 char *results_button1, *results_button2;
00074 char *toveron_button1, *toveron_button2;
00075 char *toveroff_button1, *toveroff_button2;
00076 #ifdef LC_X11
00077 char *confine_button, *unconfine_button;
00078 #endif
00079 int pause_flag = 0, slow_flag = 0, med_flag = 0, fast_flag = 0;
00080
00081 char *ms_pollution_button_graphic, *ms_normal_button_graphic;
00082 char *ms_fire_cover_button_graphic, *ms_health_cover_button_graphic;
00083 char *ms_cricket_cover_button_graphic;
00084 char *ms_ub40_button_graphic, *ms_coal_button_graphic;
00085 char *ms_starve_button_graphic, *ms_ocost_button_graphic;
00086 char *ms_power_button_graphic;
00087 char *checked_box_graphic, *unchecked_box_graphic;
00088
00089 char market_cb_gbuf[MARKET_CB_W * MARKET_CB_H];
00090 int market_cb_flag = 0, mcbx, mcby, market_cb_drawn_flag = 0;
00091 int port_cb_flag = 0, port_cb_drawn_flag = 0;
00092
00093
00094
00095
00096
00097
00098
00099 int help_flag, numof_help_buttons, help_history_count, help_return_val;
00100 int block_help_exit;
00101 int help_button_x[MAX_NUMOF_HELP_BUTTONS];
00102 int help_button_y[MAX_NUMOF_HELP_BUTTONS];
00103 int help_button_w[MAX_NUMOF_HELP_BUTTONS];
00104 int help_button_h[MAX_NUMOF_HELP_BUTTONS];
00105 char help_button_s[MAX_NUMOF_HELP_BUTTONS][MAX_LENOF_HELP_FILENAME];
00106 char help_button_history[MAX_HELP_HISTORY][MAX_LENOF_HELP_FILENAME];
00107 char *help_button_graphic, help_graphic[MAX_ICON_LEN];
00108 char *quit_button_graphic, *load_button_graphic, *save_button_graphic;
00109 char *menu_button_graphic;
00110 int quit_flag, network_flag, load_flag, save_flag;
00111 int prefs_flag = 0, prefs_drawn_flag = 0;
00112 int monument_bul_flag, river_bul_flag, shanty_bul_flag;
00113 int must_release_button = 0, let_one_through = 0;
00114
00115 int db_yesbox_x1, db_yesbox_x2, db_yesbox_y1, db_yesbox_y2;
00116 int db_nobox_x1, db_nobox_x2, db_nobox_y1, db_nobox_y2;
00117 int db_flag, db_yesbox_clicked, db_nobox_clicked;
00118 char okmessage[22][74];
00119 int db_okbox_x1, db_okbox_x2, db_okbox_y1, db_okbox_y2, db_okflag, db_okbox_clicked;
00120 int suppress_ok_buttons;
00121
00122 disp display;
00123 int borderx, bordery;
00124
00125 int command_line_debug = 0;
00126
00127 #ifdef LC_X11
00128 int winX, winY, mouse_button;
00129
00130 char *bg_color = NULL;
00131 int verbose = FALSE;
00132 int stay_in_front = FALSE;
00133 int text_bg = 0;
00134 int text_fg = 255;
00135 int x_key_value;
00136 int x_key_shifted = 0;
00137 int xclip_x1, xclip_y1, xclip_x2, xclip_y2, clipping_flag = 0;
00138 long unsigned int colour_table[256];
00139 unsigned char *open_font;
00140 int open_font_height, suppress_next_expose = 0;
00141 Cursor pirate_cursor;
00142
00143 #ifdef USE_PIXMAPS
00144 Pixmap icon_pixmap[NUM_OF_TYPES];
00145 char icon_pixmap_flag[NUM_OF_TYPES];
00146 #endif
00147 #endif
00148
00149 #ifdef WIN32
00150 int mouse_button;
00151 char *bg_color = NULL;
00152 char dummy1[1024];
00153 char dummy2[1024];
00154 int verbose = FALSE;
00155 int stay_in_front = FALSE;
00156 int text_bg = 0;
00157 int text_fg = 255;
00158 int x_key_value = 0;
00159 BOOL x_key_shifted = FALSE;
00160 int xclip_x1, xclip_y1, xclip_x2, xclip_y2, clipping_flag = 0;
00161 long unsigned int colour_table[256];
00162 unsigned char *open_font;
00163 int open_font_height, suppress_next_expose = 0;
00164
00165 #if defined (USE_PIXMAPS)
00166 HBITMAP icon_pixmap[NUM_OF_TYPES];
00167 char icon_pixmap_flag[NUM_OF_TYPES];
00168 #endif
00169 #endif