1 /* ---------------------------------------------------------------------- * 2 * cliglobs.h 3 * This file is part of lincity. 4 * Lincity is copyright (c) I J Peters 1995-1997, (c) Greg Sharp 1997-2001. 5 * ---------------------------------------------------------------------- */ 6 #ifndef __cliglobs_h__ 7 #define __cliglobs_h__ 8 9 #include "common.h" 10 #include "lin-city.h" 11 #include "geometry.h" 12 13 extern Screen_Geometry scr; 14 extern short mappointoldtype[WORLD_SIDE_LEN][WORLD_SIDE_LEN]; 15 16 extern int lc_mouse_type; 17 extern char progbox[(PROGBOXW + 16) * (PROGBOXH + 16)]; 18 19 /* Preferences */ 20 extern int time_multiplex_stats; 21 extern int suppress_popups; 22 extern int overwrite_transport_flag; 23 extern int confine_flag; 24 extern int skip_splash_screen; 25 extern int no_init_help; 26 extern int suppress_firsttime_module_help; 27 28 extern int main_screen_flag; 29 extern int mappoint_stats_flag, mappoint_stats_time; 30 extern int mini_screen_flags, mini_screen_time; 31 extern int mini_screen_port_x, mini_screen_port_y; 32 33 extern float gamma_correct_red, gamma_correct_green, gamma_correct_blue; 34 35 extern int mouse_initialized; /* wcoreyk */ 36 extern int cs_mouse_x, cs_mouse_y, cs_mouse_button; /* current mouse status */ 37 extern int cs_mouse_shifted; /* shift key pressed with mouse. */ 38 extern int cs_mouse_xmax, cs_mouse_ymax, omx, omy, mox, moy; 39 40 extern int mouse_hide_count; 41 #if defined (WIN32) 42 /* extern int cs_current_mouse_x, cs_current_mouse_y, cs_current_mouse_button; */ 43 extern int cs_square_mouse_visible; 44 #endif 45 extern int kmousex, kmousey, kmouse_val, reset_mouse_flag, mt_flag; 46 extern int modern_windmill_flag; 47 48 extern char under_square_mouse_pointer_top[20 * 2 * 4]; 49 extern char under_square_mouse_pointer_left[18 * 2 * 4]; 50 extern char under_square_mouse_pointer_right[18 * 2 * 4]; 51 extern char under_square_mouse_pointer_bottom[20 * 2 * 4]; 52 extern int mouse_type; 53 54 extern int mt_start_posx, mt_start_posy, mt_current_posx, mt_current_posy; 55 extern int main_screen_originx, main_screen_originy; 56 57 extern long real_time; 58 extern int screen_refresh_flag; 59 60 extern int total_money, income_tax_rate, coal_tax_rate; 61 extern int dole_rate, transport_cost_rate; 62 extern int goods_tax_rate; 63 extern int export_tax_rate, import_cost_rate; 64 extern int tech_level, highest_tech_level, unnat_deaths; 65 66 extern char *months[]; 67 68 extern int monthgraph_size; 69 extern int *monthgraph_pop; 70 extern int *monthgraph_starve; 71 extern int *monthgraph_nojobs; 72 extern int *monthgraph_ppool; 73 74 extern char *up_pbar1_graphic, *up_pbar2_graphic; 75 extern char *down_pbar1_graphic, *down_pbar2_graphic, *pop_pbar_graphic; 76 extern char *tech_pbar_graphic, *food_pbar_graphic, *jobs_pbar_graphic; 77 extern char *money_pbar_graphic, *coal_pbar_graphic, *goods_pbar_graphic; 78 extern char *ore_pbar_graphic, *steel_pbar_graphic; 79 extern char *pause_button1_off, *pause_button2_off; 80 extern char *pause_button1_on, *pause_button2_on; 81 extern char *fast_button1_off, *fast_button2_off; 82 extern char *fast_button1_on, *fast_button2_on; 83 extern char *med_button1_off, *med_button2_off; 84 extern char *med_button1_on, *med_button2_on; 85 extern char *slow_button1_off, *slow_button2_off; 86 extern char *slow_button1_on, *slow_button2_on; 87 extern char *results_button1, *results_button2; 88 extern char *toveron_button1, *toveron_button2; 89 extern char *toveroff_button1, *toveroff_button2; 90 #ifdef LC_X11 91 extern char *confine_button, *unconfine_button; 92 #endif 93 extern int pause_flag, slow_flag, med_flag, fast_flag; 94 extern int prefs_flag; 95 extern int prefs_drawn_flag; 96 97 extern char *ms_pollution_button_graphic, *ms_normal_button_graphic; 98 extern char *ms_fire_cover_button_graphic, *ms_health_cover_button_graphic; 99 extern char *ms_cricket_cover_button_graphic; 100 extern char *ms_ub40_button_graphic, *ms_coal_button_graphic; 101 extern char *ms_starve_button_graphic, *ms_ocost_button_graphic; 102 extern char *ms_power_button_graphic; 103 extern char *checked_box_graphic, *unchecked_box_graphic; 104 105 extern char market_cb_gbuf[MARKET_CB_W * MARKET_CB_H]; 106 extern int market_cb_flag, mcbx, mcby, market_cb_drawn_flag; 107 extern int port_cb_flag, port_cb_drawn_flag; 108 109 #if defined (commentout) 110 extern int diffgraph_power[MAPPOINT_STATS_W], diffgraph_coal[MAPPOINT_STATS_W]; 111 extern int diffgraph_goods[MAPPOINT_STATS_W], diffgraph_ore[MAPPOINT_STATS_W]; 112 extern int diffgraph_population[MAPPOINT_STATS_W], diff_old_population; 113 #endif 114 115 /* GCS -- this one is difficult to deal with. 116 LinCity will give your money back if you bulldoze 117 the most recently constructed building (i.e. if 118 you make a mistake. How does this fit into a 119 multiplayer game? Not at all, I suppose... */ 120 extern int last_built_x, last_built_y; 121 122 extern int help_flag, numof_help_buttons, help_history_count, help_return_val; 123 extern int block_help_exit; 124 extern int help_button_x[MAX_NUMOF_HELP_BUTTONS]; 125 extern int help_button_y[MAX_NUMOF_HELP_BUTTONS]; 126 extern int help_button_w[MAX_NUMOF_HELP_BUTTONS]; 127 extern int help_button_h[MAX_NUMOF_HELP_BUTTONS]; 128 extern char help_button_s[MAX_NUMOF_HELP_BUTTONS][MAX_LENOF_HELP_FILENAME]; 129 extern char help_button_history[MAX_HELP_HISTORY][MAX_LENOF_HELP_FILENAME]; 130 extern char *help_button_graphic, help_graphic[MAX_ICON_LEN]; 131 extern char *quit_button_graphic, *load_button_graphic, *save_button_graphic; 132 extern char *menu_button_graphic; 133 extern int quit_flag, network_flag, load_flag, save_flag, cheat_flag; 134 extern int monument_bul_flag, river_bul_flag, shanty_bul_flag; 135 extern int must_release_button, let_one_through; 136 137 extern int db_yesbox_x1, db_yesbox_x2, db_yesbox_y1, db_yesbox_y2; 138 extern int db_nobox_x1, db_nobox_x2, db_nobox_y1, db_nobox_y2; 139 extern int db_flag, db_yesbox_clicked, db_nobox_clicked; 140 extern char okmessage[22][74]; 141 extern int db_okbox_x1, db_okbox_x2, db_okbox_y1, db_okbox_y2, db_okflag, db_okbox_clicked; 142 extern int suppress_ok_buttons; 143 144 extern int pbar_pops[12], pbar_pop_oldtot, pop_diff, pbar_pop_olddiff; 145 extern int pbar_techs[12], pbar_tech_oldtot, tech_diff, pbar_tech_olddiff; 146 extern int pbar_foods[12], pbar_food_oldtot, food_diff, pbar_food_olddiff; 147 extern int pbar_jobs[12], pbar_jobs_oldtot, jobs_diff, pbar_jobs_olddiff; 148 extern int pbar_coal[12], pbar_coal_oldtot, coal_diff, pbar_coal_olddiff; 149 extern int pbar_goods[12], pbar_goods_oldtot, goods_diff, pbar_goods_olddiff; 150 extern int pbar_ore[12], pbar_ore_oldtot, ore_diff, pbar_ore_olddiff; 151 extern int pbar_steel[12], pbar_steel_oldtot, steel_diff, pbar_steel_olddiff; 152 extern int pbar_money[12], pbar_money_oldtot, money_diff, pbar_money_olddiff; 153 154 extern int askdir_lines; 155 extern char *askdir_path[4]; 156 extern int lc_save_dir_len; 157 158 159 extern struct _disp display; 160 extern int borderx, bordery; 161 162 extern int command_line_debug; 163 164 #ifdef LC_X11 165 extern int winX, winY, mouse_button; 166 extern unsigned int winW, winH; 167 168 extern char *bg_color; 169 /*extern char* pixmap;*/ 170 extern char dummy2[1024]; 171 extern int verbose; /* display settings if TRUE */ 172 extern int stay_in_front; /* Try to stay in clear area of the screen. */ 173 extern int text_bg; 174 extern int text_fg; 175 extern int x_key_value; 176 extern int x_key_shifted; /* Is the key shifted? */ 177 extern int xclip_x1, xclip_y1, xclip_x2, xclip_y2, clipping_flag; 178 extern long unsigned int colour_table[256]; 179 extern unsigned char *open_font; 180 extern int open_font_height, suppress_next_expose; 181 extern Cursor pirate_cursor; 182 183 #ifdef USE_PIXMAPS 184 extern Pixmap icon_pixmap[NUM_OF_TYPES]; 185 extern char icon_pixmap_flag[NUM_OF_TYPES]; 186 #endif 187 #endif 188 189 #ifdef WIN32 190 extern int mouse_button; 191 extern char *bg_color; 192 extern int verbose; /* display settings if TRUE */ 193 extern int stay_in_front; /* Try to stay in clear area of the screen. */ 194 extern int text_bg; 195 extern int text_fg; 196 extern int x_key_value; /* GCS: Add initialization value */ 197 extern BOOL x_key_shifted; /* Is the key shifted? */ 198 extern int xclip_x1, xclip_y1, xclip_x2, xclip_y2, clipping_flag; 199 extern long unsigned int colour_table[256]; 200 extern unsigned char *open_font; 201 extern int open_font_height, suppress_next_expose; 202 203 #if defined (USE_PIXMAPS) 204 extern HBITMAP icon_pixmap[NUM_OF_TYPES]; 205 extern char icon_pixmap_flag[NUM_OF_TYPES]; 206 #endif 207 208 #endif /* WIN32 */ 209 #endif /* __cliglobs_h__ */ 210