Mercurial > hg > openttd
changeset 6092:1921ab72b54d draft
(svn r8827) -Codechange: Cleanup of industry_cmd (Step-6). Implementation of IndustryTileSPec, the alter ego of IndustrySpec.
It offers identification of the different industry tiles in a more distinct manner, as well as regrouping scattered pieces of data across the sources. More to come
author | belugas <belugas@openttd.org> |
---|---|
date | Wed, 21 Feb 2007 02:22:43 +0000 |
parents | 17ebeb5a2c37 |
children | 1f2c064d8490 |
files | src/industry.h src/industry_cmd.cpp src/table/build_industry.h src/table/industry_land.h |
diffstat | 4 files changed, 260 insertions(+), 159 deletions(-) [+] |
line wrap: on
line diff
--- a/src/industry.h +++ b/src/industry.h @@ -78,7 +78,13 @@ StringID production_down_text; } IndustrySpec; +typedef struct IndustryTileSpec { + CargoID accepts_cargo[3]; + Slope slopes_refused; +} IndustryTileSpec; + const IndustrySpec *GetIndustrySpec(IndustryType thistype); +const IndustryTileSpec *GetIndustryTileSpec(IndustryGfx gfx); DECLARE_OLD_POOL(Industry, Industry, 3, 8000)
--- a/src/industry_cmd.cpp +++ b/src/industry_cmd.cpp @@ -87,6 +87,12 @@ return &_industry_specs[thistype]; } +const IndustryTileSpec *GetIndustryTileSpec(IndustryGfx gfx) +{ + assert(gfx < NUM_INDUSTRY_GFXES); + return &_industry_tile_specs[gfx]; +} + void DestroyIndustry(Industry *i) { BEGIN_TILE_LOOP(tile_cur, i->width, i->height, i->xy); @@ -277,16 +283,16 @@ static void GetAcceptedCargo_Industry(TileIndex tile, AcceptedCargo ac) { - IndustryGfx gfx = GetIndustryGfx(tile); + const IndustryTileSpec *itspec = GetIndustryTileSpec(GetIndustryGfx(tile)); CargoID a; - a = _industry_section_accepts_1[gfx]; - if (a != CT_INVALID) ac[a] = (a == 0) ? 1 : 8; + a = itspec->accepts_cargo[0]; + if (a != CT_INVALID) ac[a] = (a == CT_PASSENGERS) ? 1 : 8; - a = _industry_section_accepts_2[gfx]; + a = itspec->accepts_cargo[1]; if (a != CT_INVALID) ac[a] = 8; - a = _industry_section_accepts_3[gfx]; + a = itspec->accepts_cargo[2]; if (a != CT_INVALID) ac[a] = 8; } @@ -1155,7 +1161,7 @@ * CheckIfCanLevelIndustryPlatform(). */ if (tileh != SLOPE_FLAT) { Slope t; - byte bits = _industry_section_bits[it->gfx]; + byte bits = GetIndustryTileSpec(it->gfx)->slopes_refused; if (bits & 0x10) return false;
--- a/src/table/build_industry.h +++ b/src/table/build_industry.h @@ -1,6 +1,7 @@ /* $Id$ */ - +#ifndef BUILD_INDUSTRY_H +#define BUILD_INDUSTRY_H #define MK(x,y, m) {{x, y}, m} @@ -1460,141 +1461,257 @@ _industry_create_table_3, }; - -#define PAS CT_PASSENGERS +#define MK(c1, c2, c3, sl) \ + {{c1, c2, c3}, sl} -#define COL CT_COAL -#define RUB CT_RUBBER -#define SUG CT_SUGAR +static const IndustryTileSpec _industry_tile_specs[] = { + /* Coal Mine */ + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_PASSENGERS, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), -#define MAL CT_MAIL + /* Power Station */ + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_PASSENGERS, CT_INVALID, CT_COAL, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), -#define OIL CT_OIL -#define TOY CT_TOYS - -#define LIV CT_LIVESTOCK // Fruit too -#define BAT CT_BATTERIES + /* Sawmill */ + MK(CT_PASSENGERS, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_PASSENGERS, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_PASSENGERS, CT_INVALID, CT_WOOD, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), -#define GRA CT_GRAIN -#define WHT CT_WHEAT // Maize too -#define TOF CT_TOFFEE + /* Forest Artic, temperate */ + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), -#define WOD CT_WOOD -#define CLA CT_COLA + /* Oil refinery */ + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_OIL, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_PASSENGERS, CT_INVALID, CT_INVALID, SLOPE_STEEP), -#define IRN CT_IRON_ORE -#define COP CT_COPPER_ORE -#define CCY CT_COTTON_CANDY + /* oil Rig */ + MK(CT_INVALID, CT_INVALID, CT_PASSENGERS, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_MAIL, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), -#define STL CT_STEEL -#define PAP CT_PAPER -#define WAT CT_WATER -#define BBL CT_BUBBLES + /* Oil Wells artic, temperate */ + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + + /* Farm tropic, arctic and temperate */ + MK(CT_PASSENGERS, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_PASSENGERS, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), -#define VAL CT_VALUABLES -#define GLD CT_GOLD // Diamonds too -#define PLC CT_PLASTIC + /* Factory temperate */ + MK(CT_GRAIN, CT_STEEL, CT_LIVESTOCK, SLOPE_STEEP), + MK(CT_GRAIN, CT_STEEL, CT_LIVESTOCK, SLOPE_STEEP), + MK(CT_GRAIN, CT_STEEL, CT_LIVESTOCK, SLOPE_STEEP), + MK(CT_GRAIN, CT_STEEL, CT_LIVESTOCK, SLOPE_STEEP), + + /* Printing works */ + MK(CT_INVALID, CT_INVALID, CT_PAPER, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_PAPER, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_PAPER, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_PAPER, SLOPE_STEEP), -#define INV CT_INVALID + /* Copper ore mine */ + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_PASSENGERS, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_PASSENGERS, CT_INVALID, CT_INVALID, SLOPE_STEEP), + + /* Steel mill */ + MK(CT_PASSENGERS, CT_INVALID, CT_IRON_ORE, SLOPE_STEEP), + MK(CT_PASSENGERS, CT_INVALID, CT_IRON_ORE, SLOPE_STEEP), + MK(CT_PASSENGERS, CT_INVALID, CT_IRON_ORE, SLOPE_STEEP), + MK(CT_PASSENGERS, CT_INVALID, CT_IRON_ORE, SLOPE_STEEP), + MK(CT_PASSENGERS, CT_INVALID, CT_IRON_ORE, SLOPE_STEEP), + MK(CT_PASSENGERS, CT_INVALID, CT_IRON_ORE, SLOPE_STEEP), + + /* Bank temperate*/ + MK(CT_PASSENGERS, CT_INVALID, CT_VALUABLES, SLOPE_E), + MK(CT_PASSENGERS, CT_INVALID, CT_VALUABLES, SLOPE_S), -static const CargoID _industry_section_accepts_1[] = { - INV, INV, INV, PAS, INV, INV, INV, INV, - PAS, INV, INV, PAS, PAS, PAS, INV, INV, - INV, INV, INV, INV, INV, INV, INV, PAS, - INV, INV, INV, INV, INV, INV, INV, INV, - INV, PAS, PAS, INV, INV, INV, INV, GRA, - GRA, GRA, GRA, INV, INV, INV, INV, INV, - INV, INV, PAS, PAS, PAS, PAS, PAS, PAS, - PAS, PAS, PAS, PAS, WHT, WHT, WHT, WHT, - INV, INV, INV, INV, INV, INV, INV, INV, - INV, INV, INV, INV, INV, INV, INV, INV, - INV, INV, INV, INV, INV, INV, INV, INV, - INV, INV, INV, INV, INV, INV, INV, INV, - INV, INV, INV, INV, INV, INV, INV, INV, - INV, INV, INV, INV, INV, INV, INV, INV, - INV, INV, INV, INV, INV, INV, INV, INV, - INV, COP, COP, COP, COP, INV, INV, INV, - INV, INV, INV, CCY, CCY, CCY, CCY, INV, - INV, INV, INV, INV, INV, INV, BAT, BAT, - BAT, BAT, BAT, BAT, INV, INV, INV, INV, - INV, INV, INV, INV, BBL, BBL, BBL, BBL, - INV, INV, INV, INV, INV, INV, INV, INV, - INV, INV, INV, INV, INV, INV, INV -}; + /* Food processing plant, tropic and arctic. CT_MAIZE or CT_WHEAT, CT_LIVESTOCK or CT_FRUIT*/ + MK(CT_MAIZE, CT_INVALID, CT_LIVESTOCK, SLOPE_STEEP), + MK(CT_MAIZE, CT_INVALID, CT_LIVESTOCK, SLOPE_STEEP), + MK(CT_MAIZE, CT_INVALID, CT_LIVESTOCK, SLOPE_STEEP), + MK(CT_MAIZE, CT_INVALID, CT_LIVESTOCK, SLOPE_STEEP), + + /* Paper mill */ + MK(CT_INVALID, CT_INVALID, CT_WOOD, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_WOOD, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_WOOD, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_WOOD, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_WOOD, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_WOOD, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_WOOD, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_WOOD, SLOPE_STEEP), + /* Gold mine */ + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), -static const CargoID _industry_section_accepts_2[] = { - INV, INV, INV, INV, INV, INV, INV, INV, - INV, INV, INV, INV, INV, INV, INV, INV, - INV, INV, INV, INV, INV, INV, INV, INV, - INV, INV, INV, INV, INV, INV, INV, INV, - INV, INV, INV, INV, INV, INV, INV, STL, - STL, STL, STL, INV, INV, INV, INV, INV, - INV, INV, INV, INV, INV, INV, INV, INV, - INV, INV, INV, INV, INV, INV, INV, INV, - INV, INV, INV, INV, INV, INV, INV, INV, - INV, INV, INV, INV, INV, INV, INV, INV, - INV, INV, INV, INV, INV, INV, INV, INV, - INV, INV, INV, INV, INV, INV, INV, INV, - INV, INV, INV, INV, INV, INV, INV, INV, - INV, INV, INV, INV, INV, INV, INV, INV, - INV, INV, INV, INV, INV, INV, INV, INV, - INV, WOD, WOD, WOD, WOD, INV, INV, INV, - INV, INV, INV, TOF, TOF, TOF, TOF, INV, - INV, INV, INV, INV, INV, INV, INV, INV, - INV, INV, INV, INV, INV, INV, INV, INV, - INV, INV, INV, INV, INV, INV, INV, INV, - INV, INV, INV, INV, INV, INV, INV, INV, - INV, INV, INV, INV, INV, INV, INV -}; + /* Bank Sub Arctic */ + MK(CT_INVALID, CT_INVALID, CT_GOLD, SLOPE_E), + MK(CT_INVALID, CT_INVALID, CT_GOLD, SLOPE_S), + + /* Diamond mine */ + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + + /* Iron ore Mine */ + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + + /* Fruit plantation */ + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + + /* Rubber plantation */ + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + + /* Water supply */ + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + + /* Water tower */ + MK(CT_INVALID, CT_INVALID, CT_WATER, SLOPE_STEEP), + + /* Factory (sub-tropical) */ + MK(CT_COPPER_ORE, CT_WOOD, CT_RUBBER, SLOPE_STEEP), + MK(CT_COPPER_ORE, CT_WOOD, CT_RUBBER, SLOPE_STEEP), + MK(CT_COPPER_ORE, CT_WOOD, CT_RUBBER, SLOPE_STEEP), + MK(CT_COPPER_ORE, CT_WOOD, CT_RUBBER, SLOPE_STEEP), + + /* Lumber mill */ + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + + /* Candyfloss forest */ + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), -static const CargoID _industry_section_accepts_3[] = { - INV, INV, INV, INV, INV, INV, INV, INV, - COL, INV, INV, INV, INV, WOD, INV, INV, - INV, INV, INV, INV, OIL, INV, INV, INV, - PAS, MAL, INV, INV, INV, INV, INV, INV, - INV, INV, INV, INV, INV, INV, INV, LIV, - LIV, LIV, LIV, PAP, PAP, PAP, PAP, INV, - INV, INV, INV, INV, IRN, IRN, IRN, IRN, - IRN, IRN, VAL, VAL, LIV, LIV, LIV, LIV, - WOD, WOD, WOD, WOD, WOD, WOD, WOD, WOD, - INV, INV, INV, INV, INV, INV, INV, INV, - INV, INV, INV, INV, INV, INV, INV, INV, - INV, GLD, GLD, INV, INV, INV, INV, INV, - INV, INV, INV, INV, INV, INV, INV, INV, - INV, INV, INV, INV, INV, INV, INV, INV, - INV, INV, INV, INV, INV, INV, INV, INV, - WAT, RUB, RUB, RUB, RUB, INV, INV, INV, - INV, INV, INV, SUG, SUG, SUG, SUG, INV, - INV, INV, TOY, TOY, TOY, TOY, PLC, PLC, - PLC, PLC, PLC, PLC, INV, INV, INV, INV, - INV, INV, INV, INV, CLA, CLA, CLA, CLA, - INV, INV, INV, INV, INV, INV, INV, INV, - INV, INV, INV, INV, INV, INV, INV -}; + /* Sweet factory */ + MK(CT_COTTON_CANDY, CT_TOFFEE, CT_SUGAR, SLOPE_STEEP), + MK(CT_COTTON_CANDY, CT_TOFFEE, CT_SUGAR, SLOPE_STEEP), + MK(CT_COTTON_CANDY, CT_TOFFEE, CT_SUGAR, SLOPE_STEEP), + MK(CT_COTTON_CANDY, CT_TOFFEE, CT_SUGAR, SLOPE_STEEP), + + /* Batter farm */ + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + + /* Cola wells */ + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + + /* Toy shop */ + MK(CT_INVALID, CT_INVALID, CT_TOYS, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_TOYS, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_TOYS, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_TOYS, SLOPE_STEEP), + + /* Toy factory */ + MK(CT_BATTERIES, CT_INVALID, CT_PLASTIC, SLOPE_STEEP), + MK(CT_BATTERIES, CT_INVALID, CT_PLASTIC, SLOPE_STEEP), + MK(CT_BATTERIES, CT_INVALID, CT_PLASTIC, SLOPE_STEEP), + MK(CT_BATTERIES, CT_INVALID, CT_PLASTIC, SLOPE_STEEP), + MK(CT_BATTERIES, CT_INVALID, CT_PLASTIC, SLOPE_STEEP), + MK(CT_BATTERIES, CT_INVALID, CT_PLASTIC, SLOPE_STEEP), -#undef PAS -#undef COL -#undef RUB -#undef SUG -#undef MAL -#undef OIL -#undef TOY -#undef LIV -#undef BAT -#undef GRA -#undef WHT -#undef TOF -#undef WOD -#undef CLA -#undef IRN -#undef COP -#undef CCY -#undef STL -#undef PAP -#undef WAT -#undef BBL -#undef VAL -#undef GLD -#undef PLC -#undef INV + /* Plastic Fountain */ + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + + /* Fizzy drink factory */ + MK(CT_BUBBLES, CT_INVALID, CT_COLA, SLOPE_STEEP), + MK(CT_BUBBLES, CT_INVALID, CT_COLA, SLOPE_STEEP), + MK(CT_BUBBLES, CT_INVALID, CT_COLA, SLOPE_STEEP), + MK(CT_BUBBLES, CT_INVALID, CT_COLA, SLOPE_STEEP), + + /* Bubble generator */ + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + + /* Toffee quarry */ + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + + /* Sugar mine */ + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), + MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP), +}; +#undef MK + +#endif /* BUILD_INDUSTRY_H */
--- a/src/table/industry_land.h +++ b/src/table/industry_land.h @@ -961,34 +961,6 @@ #undef N -/** - * The indices into this table are the ones as described by - * the enum with GFX_*s in industry_map.h. - */ -static const byte _industry_section_bits[NUM_INDUSTRY_GFXES] = { - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 4, 2, 16, 16, 16, 16, // <- temperate bank - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 4, 2, 16, 16, 16, 16, 16, // <- sub-arctic/sub-tropical bank - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, -}; /** * When true, the tile has to be drawn using the animation