# HG changeset patch # User belugas # Date 1187743945 0 # Node ID 4c3c40297b9bd95a064e031f620250391cc9d02f # Parent 7a2abd0934989296892d6737f453975c09178dbe (svn r10961) -Codechange: Flag default substitutes of industry/tiles with a value that cannot be legal. This avoids the forest of coal mine error in the futur diff -r 7a2abd093498 -r 4c3c40297b9b src/industry.h --- a/src/industry.h Tue Aug 21 00:29:10 2007 +0000 +++ b/src/industry.h Wed Aug 22 00:52:25 2007 +0000 @@ -133,7 +133,7 @@ /** Data related to the handling of grf files. Common to both industry and industry tile */ struct GRFFileProps { - uint8 subst_id; + uint16 subst_id; uint16 local_id; ///< id defined by the grf file for this industry struct SpriteGroup *spritegroup; ///< pointer to the different sprites of the industry const struct GRFFile *grffile; ///< grf file that introduced this industry diff -r 7a2abd093498 -r 4c3c40297b9b src/table/build_industry.h --- a/src/table/build_industry.h Tue Aug 21 00:29:10 2007 +0000 +++ b/src/table/build_industry.h Wed Aug 22 00:52:25 2007 +0000 @@ -1177,7 +1177,7 @@ c1, c2, c3, proc, p1, r1, p2, r2, m, a1, im1, a2, im2, a3, im3, pr, clim, bev, in, intx, s1, s2, s3) \ {tbl, lengthof(tbl), min(255, d), d, pc, {c1, c2, c3}, proc, {p1, p2}, {r1, r2}, m, \ {a1, a2, a3}, {{im1, 0}, {im2, 0}, {im3, 0}}, pr, clim, bev, col, in, intx, s1, s2, s3, {ai1, ai2, ai3, ai4}, {ag1, ag2, ag3, ag4}, \ - sndc, snd, 0, 0, true, {0, 0, NULL, NULL, INVALID_INDUSTRYTYPE}} + sndc, snd, 0, 0, true, {INVALID_INDUSTRYTYPE, 0, NULL, NULL, INVALID_INDUSTRYTYPE}} /* Format: tile table count and sounds table cost multiplier appear chances(4ingame, 4random) map colour @@ -1573,7 +1573,7 @@ * @param a2 next frame of animation * @param a3 chooses between animation or construction state */ -#define MT(ca1, c1, ca2, c2, ca3, c3, sl, a1, a2, a3) {{c1, c2, c3}, {ca1, ca2, ca3}, sl, a1, a2, a3, 0, 0xFFFF, 2, 0, 0, true, {0, 0, NULL, NULL, INVALID_INDUSTRYTILE}} +#define MT(ca1, c1, ca2, c2, ca3, c3, sl, a1, a2, a3) {{c1, c2, c3}, {ca1, ca2, ca3}, sl, a1, a2, a3, 0, 0xFFFF, 2, 0, 0, true, {INVALID_INDUSTRYTILE, 0, NULL, NULL, INVALID_INDUSTRYTILE}} static const IndustryTileSpec _origin_industry_tile_specs[NEW_INDUSTRYTILEOFFSET] = { /* Coal Mine */ MT(0, CT_INVALID, 0, CT_INVALID, 0, CT_INVALID, SLOPE_STEEP, INDUSTRYTILE_NOANIM, INDUSTRYTILE_NOANIM, false),