author | darkvater |
Tue, 04 Jan 2005 14:54:27 +0000 | |
changeset 884 | c5bf8b3dbab4 |
parent 830 | 36c1366367e4 |
child 919 | 544f374ee392 |
permissions | -rw-r--r-- |
0 | 1 |
#ifndef INDUSTRY_H |
2 |
#define INDUSTRY_H |
|
3 |
||
4 |
struct Industry { |
|
5 |
TileIndex xy; |
|
6 |
byte width; /* swapped order of w/h with town */ |
|
7 |
byte height; |
|
8 |
Town *town; |
|
9 |
byte produced_cargo[2]; |
|
10 |
uint16 cargo_waiting[2]; |
|
11 |
byte production_rate[2]; |
|
12 |
byte accepts_cargo[3]; |
|
13 |
byte prod_level; |
|
14 |
uint16 last_mo_production[2]; |
|
15 |
uint16 last_mo_transported[2]; |
|
16 |
byte pct_transported[2]; |
|
17 |
uint16 total_production[2]; |
|
18 |
uint16 total_transported[2]; |
|
19 |
uint16 counter; |
|
20 |
||
21 |
byte type; |
|
22 |
byte owner; |
|
23 |
byte color_map; |
|
24 |
byte last_prod_year; |
|
25 |
byte was_cargo_delivered; |
|
26 |
}; |
|
27 |
||
28 |
VARDEF int _total_industries; // For the AI: the amount of industries active |
|
29 |
VARDEF Industry _industries[90]; |
|
30 |
#define DEREF_INDUSTRY(i) (&_industries[i]) |
|
830
36c1366367e4
(svn r1301) -Codechange: _industries finally has FOR_ALL_INDUSTRIES too
truelight
parents:
0
diff
changeset
|
31 |
#define FOR_ALL_INDUSTRIES(i) for(i = _industries; i != endof(_industries); i++) |
0 | 32 |
VARDEF bool _industry_sort_dirty; |
33 |
void DeleteIndustry(Industry *is); |
|
34 |
||
35 |
enum { |
|
36 |
IT_COAL_MINE = 0, |
|
37 |
IT_POWER_STATION = 1, |
|
38 |
IT_SAWMILL = 2, |
|
39 |
IT_FOREST = 3, |
|
40 |
IT_OIL_REFINERY = 4, |
|
41 |
IT_OIL_RIG = 5, |
|
42 |
IT_FACTORY = 6, |
|
43 |
IT_PRINTING_WORKS = 7, |
|
44 |
IT_STEEL_MILL = 8, |
|
45 |
IT_FARM = 9, |
|
46 |
IT_COPPER_MINE = 10, |
|
47 |
IT_OIL_WELL = 11, |
|
48 |
IT_BANK = 12, |
|
49 |
IT_FOOD_PROCESS = 13, |
|
50 |
IT_PAPER_MILL = 14, |
|
51 |
IT_GOLD_MINE = 15, |
|
52 |
IT_BANK_2 = 16, |
|
53 |
IT_DIAMOND_MINE = 17, |
|
54 |
IT_IRON_MINE = 18, |
|
55 |
IT_FRUIT_PLANTATION = 19, |
|
56 |
IT_RUBBER_PLANTATION = 20, |
|
57 |
IT_WATER_SUPPLY = 21, |
|
58 |
IT_WATER_TOWER = 22, |
|
59 |
IT_FACTORY_2 = 23, |
|
60 |
IT_FARM_2 = 24, |
|
61 |
IT_LUMBER_MILL = 25, |
|
62 |
IT_COTTON_CANDY = 26, |
|
63 |
IT_CANDY_FACTORY = 27, |
|
64 |
IT_BATTERY_FARM = 28, |
|
65 |
IT_COLA_WELLS = 29, |
|
66 |
IT_TOY_SHOP = 30, |
|
67 |
IT_TOY_FACTORY = 31, |
|
68 |
IT_PLASTIC_FOUNTAINS = 32, |
|
69 |
IT_FIZZY_DRINK_FACTORY = 33, |
|
70 |
IT_BUBBLE_GENERATOR = 34, |
|
71 |
IT_TOFFEE_QUARRY = 35, |
|
72 |
IT_SUGAR_MINE = 36, |
|
73 |
}; |
|
74 |
||
75 |
#endif |