# HG changeset patch # User belugas # Date 1180490898 0 # Node ID be85c217e87ee231c0e8eff0b0cce8a16c54edff # Parent 7579278d958f622b8d107343aff134ec32cd2069 (svn r9984) -Codechange: Remove an obsolete structure and a now meaningless enum, in favor of the "real thing" diff -r 7579278d958f -r be85c217e87e src/industry_cmd.cpp --- a/src/industry_cmd.cpp Wed May 30 01:55:11 2007 +0000 +++ b/src/industry_cmd.cpp Wed May 30 02:08:18 2007 +0000 @@ -108,12 +108,12 @@ * This will ensure at once : proper access and * not allowing modifications of it. * @param gfx of industrytile (which is the index in _industry_specs) - * @pre gfx < NUM_INDUSTRY_GFXES + * @pre gfx < INVALID_INDUSTRYTILE * @return a pointer to the corresponding industrytile spec **/ const IndustryTileSpec *GetIndustryTileSpec(IndustryGfx gfx) { - assert(gfx < NUM_INDUSTRY_GFXES); + assert(gfx < INVALID_INDUSTRYTILE); return &_industry_tile_specs[gfx]; } diff -r 7579278d958f -r be85c217e87e src/industry_map.h --- a/src/industry_map.h Wed May 30 01:55:11 2007 +0000 +++ b/src/industry_map.h Wed May 30 02:08:18 2007 +0000 @@ -48,7 +48,6 @@ GFX_BUBBLE_CATCHER = 162, GFX_TOFFEE_QUARY = 165, GFX_SUGAR_MINE_SIEVE = 174, - NUM_INDUSTRY_GFXES = 175, }; /** @@ -201,12 +200,6 @@ _m[tile].m1 = 0; } -/** Structure used to make a mapping from industry gfx to industry type */ -struct IndustryTypeSolver { - IndustryGfx MinGfx; ///< The first gfx index for the industry type - IndustryGfx MaxGfx; ///< The last gfx index for the industry type -}; - /** * Get the animation loop number * @param tile the tile to get the animation loop number of diff -r 7579278d958f -r be85c217e87e src/table/industry_land.h --- a/src/table/industry_land.h Wed May 30 01:55:11 2007 +0000 +++ b/src/table/industry_land.h Wed May 30 02:08:18 2007 +0000 @@ -42,7 +42,7 @@ #define M(s1, p1, s2, p2, sx, sy, w, h, dz, p) { { s1, p1 }, { s2, p2 }, sx, sy, w - 1, h - 1, dz, p } /** Structure for industry tiles drawing */ -static const DrawBuildingsTileStruct _industry_draw_tile_data[NUM_INDUSTRY_GFXES * 4] = { +static const DrawBuildingsTileStruct _industry_draw_tile_data[NEW_INDUSTRYTILEOFFSET * 4] = { M( 0xf54, PAL_NONE, 0x7db, PAL_NONE, 7, 0, 9, 9, 10, 0), M( 0xf54, PAL_NONE, 0x7dc, PAL_NONE, 7, 0, 9, 9, 30, 0), M( 0xf54, PAL_NONE, 0x7dd, PAL_NONE, 7, 0, 9, 9, 30, 0),