7 |
7 |
8 #include "oldpool.h" |
8 #include "oldpool.h" |
9 #include "helpers.hpp" |
9 #include "helpers.hpp" |
10 #include "newgrf_storage.h" |
10 #include "newgrf_storage.h" |
11 |
11 |
12 typedef byte IndustryGfx; |
12 typedef uint16 IndustryGfx; |
13 typedef uint8 IndustryType; |
13 typedef uint8 IndustryType; |
14 |
14 |
15 enum { |
15 enum { |
16 INVALID_INDUSTRY = 0xFFFF, |
16 INVALID_INDUSTRY = 0xFFFF, |
17 NEW_INDUSTRYOFFSET = 37, ///< original number of industries |
17 NEW_INDUSTRYOFFSET = 37, ///< original number of industries |
18 NUM_INDUSTRYTYPES = 37, ///< total number of industries, new and old |
18 NUM_INDUSTRYTYPES = 64, ///< total number of industries, new and old |
19 INDUSTRYTILE_NOANIM = 0xFF, ///< flag to mark industry tiles as having no animation |
19 INDUSTRYTILE_NOANIM = 0xFF, ///< flag to mark industry tiles as having no animation |
20 NEW_INDUSTRYTILEOFFSET = 175, ///< original number of tiles |
20 NEW_INDUSTRYTILEOFFSET = 175, ///< original number of tiles |
21 INVALID_INDUSTRYTYPE = NUM_INDUSTRYTYPES, ///< one above amount is considered invalid |
21 INVALID_INDUSTRYTYPE = NUM_INDUSTRYTYPES, ///< one above amount is considered invalid |
22 NUM_INDUSTRYTILES = NEW_INDUSTRYTILEOFFSET, ///< total number of industry tiles, new and old |
22 NUM_INDUSTRYTILES = 512, ///< total number of industry tiles, new and old |
23 INVALID_INDUSTRYTILE = NUM_INDUSTRYTILES, ///< one above amount is considered invalid |
23 INVALID_INDUSTRYTILE = NUM_INDUSTRYTILES, ///< one above amount is considered invalid |
24 INDUSTRY_COMPLETED = 3, ///< final stage of industry construction. |
24 INDUSTRY_COMPLETED = 3, ///< final stage of industry construction. |
25 }; |
25 }; |
26 |
26 |
27 enum { |
27 enum { |
103 |
103 |
104 TileIndex xy; ///< coordinates of the primary tile the industry is built one |
104 TileIndex xy; ///< coordinates of the primary tile the industry is built one |
105 byte width; |
105 byte width; |
106 byte height; |
106 byte height; |
107 const Town *town; ///< Nearest town |
107 const Town *town; ///< Nearest town |
|
108 CargoID produced_cargo[2]; ///< 2 production cargo slots |
108 uint16 produced_cargo_waiting[2]; ///< amount of cargo produced per cargo |
109 uint16 produced_cargo_waiting[2]; ///< amount of cargo produced per cargo |
109 uint16 incoming_cargo_waiting[3]; ///< incoming cargo waiting to be processed |
110 uint16 incoming_cargo_waiting[3]; ///< incoming cargo waiting to be processed |
110 byte production_rate[2]; ///< production rate for each cargo |
111 byte production_rate[2]; ///< production rate for each cargo |
111 byte prod_level; ///< general production level |
112 byte prod_level; ///< general production level |
|
113 CargoID accepts_cargo[3]; ///< 3 input cargo slots |
112 uint16 this_month_production[2]; ///< stats of this month's production per cargo |
114 uint16 this_month_production[2]; ///< stats of this month's production per cargo |
113 uint16 this_month_transported[2]; ///< stats of this month's transport per cargo |
115 uint16 this_month_transported[2]; ///< stats of this month's transport per cargo |
114 byte last_month_pct_transported[2]; ///< percentage transported per cargo in the last full month |
116 byte last_month_pct_transported[2]; ///< percentage transported per cargo in the last full month |
115 uint16 last_month_production[2]; ///< total units produced per cargo in the last full month |
117 uint16 last_month_production[2]; ///< total units produced per cargo in the last full month |
116 uint16 last_month_transported[2]; ///< total units transported per cargo in the last full month |
118 uint16 last_month_transported[2]; ///< total units transported per cargo in the last full month |