1 /* ---------------------------------------------------------------------- *
2  * engglobs.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 __engglobs_h__
7 #define __engglobs_h__
8 
9 #include "lin-city.h"
10 #include "common.h"
11 #include "geometry.h"
12 
13 
14 /* GCS -- One of these days I will get this right. */
15 struct map_struct
16 {
17     short type[WORLD_SIDE_LEN][WORLD_SIDE_LEN];
18     short group[WORLD_SIDE_LEN][WORLD_SIDE_LEN];
19     int pollution[WORLD_SIDE_LEN][WORLD_SIDE_LEN];
20     Map_Point_Info info[WORLD_SIDE_LEN][WORLD_SIDE_LEN];
21 };
22 typedef struct map_struct Map;
23 
24 extern Map map;
25 
26 #define MP_TYPE(x,y)   map.type[x][y]
27 #define MP_GROUP(x,y)  map.group[x][y]
28 #define MP_POL(x,y)    map.pollution[x][y]
29 #define MP_INFO(x,y)   map.info[x][y]
30 
31 #define MP_SIZE(x,y)   main_groups[MP_GROUP(x,y)].size
32 #define MP_COLOR(x,y)  main_groups[MP_GROUP(x,y)].colour
33 #define MP_GROUP_IS_RESIDENCE(x,y)  (GROUP_IS_RESIDENCE(MP_GROUP(x,y)))
34 
35 
36 
37 extern int mappoint_array_x[WORLD_SIDE_LEN], mappoint_array_y[WORLD_SIDE_LEN];
38 extern int numof_shanties, numof_communes;
39 extern int last_built_x, last_built_y;
40 
41 extern int sust_dig_ore_coal_tip_flag, sust_port_flag, sustain_flag;
42 extern int sust_dig_ore_coal_count, sust_port_count, sust_old_money;
43 extern int sust_old_money_count, sust_old_population, sust_old_population_count;
44 extern int sust_old_tech, sust_old_tech_count, sust_fire_count;
45 
46 extern int total_time;    /* game time */
47 
48 extern int population, starving_population;
49 extern int housed_population;
50 extern int unemployed_population, people_pool;
51 extern int substationx[MAX_NUMOF_SUBSTATIONS], substationy[MAX_NUMOF_SUBSTATIONS];
52 extern int numof_substations;
53 extern int marketx[MAX_NUMOF_MARKETS], markety[MAX_NUMOF_MARKETS], numof_markets;
54 extern int numof_health_centres, max_pop_ever, total_evacuated, total_births;
55 
56 extern int total_money, income_tax_rate, coal_tax_rate;
57 extern int dole_rate, transport_cost_rate;
58 extern int goods_tax_rate;
59 extern int export_tax_rate, import_cost_rate;
60 extern int tech_level, highest_tech_level, unnat_deaths;
61 
62 extern int total_pollution_deaths, total_starve_deaths, total_unemployed_days;
63 extern int total_unemployed_years;
64 extern float pollution_deaths_history, starve_deaths_history;
65 extern float unemployed_history;
66 
67 extern int university_intake_rate;
68 extern int power_made, power_used, coal_made, coal_used;
69 extern int goods_made, goods_used, ore_made, ore_used;
70 extern int rockets_launched, rockets_launched_success;
71 extern int coal_survey_done;
72 
73 extern int selected_type_cost;
74 
75 extern int ex_tax_dis[NUMOF_DISCOUNT_TRIGGERS];
76 
77 #endif /* __engglobs_h__ */
78