summaryrefslogtreecommitdiff
path: root/src/newgrf_industrytiles.cpp
diff options
context:
space:
mode:
authorNiels Martin Hansen <nielsm@indvikleren.dk>2019-10-04 21:26:44 +0200
committerCharles Pigott <charlespigott@googlemail.com>2019-10-19 17:16:25 +0100
commit53f8d0b815a7be57fb6489d95e67b9002ade14d7 (patch)
tree0b712b7ddfb763497414d03475839b5185227acb /src/newgrf_industrytiles.cpp
parente5f175562907efed0c958db76ca61145b838dc63 (diff)
downloadopenttd-53f8d0b815a7be57fb6489d95e67b9002ade14d7.tar.xz
Codechange: Use std::vector for industry tile layouts
Diffstat (limited to 'src/newgrf_industrytiles.cpp')
-rw-r--r--src/newgrf_industrytiles.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/newgrf_industrytiles.cpp b/src/newgrf_industrytiles.cpp
index 5a8794564..d5b2ee325 100644
--- a/src/newgrf_industrytiles.cpp
+++ b/src/newgrf_industrytiles.cpp
@@ -212,13 +212,13 @@ extern bool IsSlopeRefused(Slope current, Slope refused);
* @param its Tile specification.
* @param type Industry type.
* @param gfx Gfx of the tile.
- * @param itspec_index Layout.
+ * @param layout_index Layout.
* @param initial_random_bits Random bits of industry after construction
* @param founder Industry founder
* @param creation_type The circumstances the industry is created under.
* @return Succeeded or failed command.
*/
-CommandCost PerformIndustryTileSlopeCheck(TileIndex ind_base_tile, TileIndex ind_tile, const IndustryTileSpec *its, IndustryType type, IndustryGfx gfx, uint itspec_index, uint16 initial_random_bits, Owner founder, IndustryAvailabilityCallType creation_type)
+CommandCost PerformIndustryTileSlopeCheck(TileIndex ind_base_tile, TileIndex ind_tile, const IndustryTileSpec *its, IndustryType type, IndustryGfx gfx, size_t layout_index, uint16 initial_random_bits, Owner founder, IndustryAvailabilityCallType creation_type)
{
Industry ind;
ind.index = INVALID_INDUSTRY;
@@ -228,7 +228,7 @@ CommandCost PerformIndustryTileSlopeCheck(TileIndex ind_base_tile, TileIndex ind
ind.random = initial_random_bits;
ind.founder = founder;
- uint16 callback_res = GetIndustryTileCallback(CBID_INDTILE_SHAPE_CHECK, 0, creation_type << 8 | itspec_index, gfx, &ind, ind_tile);
+ uint16 callback_res = GetIndustryTileCallback(CBID_INDTILE_SHAPE_CHECK, 0, creation_type << 8 | (uint32)layout_index, gfx, &ind, ind_tile);
if (callback_res == CALLBACK_FAILED) {
if (!IsSlopeRefused(GetTileSlope(ind_tile), its->slopes_refused)) return CommandCost();
return_cmd_error(STR_ERROR_SITE_UNSUITABLE);