summaryrefslogtreecommitdiff
path: root/src/newgrf_industrytiles.cpp
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2010-10-19 21:00:45 +0000
committeryexo <yexo@openttd.org>2010-10-19 21:00:45 +0000
commit9373ee71d999a08c51938f6214fc0360c477992a (patch)
tree00e8ee0c86f194913c08f2bb0876a1ae08b00537 /src/newgrf_industrytiles.cpp
parent3ab422b05715591be52334ce8cd522e506ddfdee (diff)
downloadopenttd-9373ee71d999a08c51938f6214fc0360c477992a.tar.xz
(svn r20996) -Change: [NewGRF] the X and Y offsets in the parameter for industry vars 60,61,62,63 are unsigned instead of signed
Diffstat (limited to 'src/newgrf_industrytiles.cpp')
-rw-r--r--src/newgrf_industrytiles.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/newgrf_industrytiles.cpp b/src/newgrf_industrytiles.cpp
index fa1606b39..db6378702 100644
--- a/src/newgrf_industrytiles.cpp
+++ b/src/newgrf_industrytiles.cpp
@@ -32,11 +32,12 @@
* @param parameter from callback. It's in fact a pair of coordinates
* @param tile TileIndex from which the callback was initiated
* @param index of the industry been queried for
+ * @param signed_offsets Are the x and y offset encoded in parameter signed?
* @return a construction of bits obeying the newgrf format
*/
-uint32 GetNearbyIndustryTileInformation(byte parameter, TileIndex tile, IndustryID index)
+uint32 GetNearbyIndustryTileInformation(byte parameter, TileIndex tile, IndustryID index, bool signed_offsets)
{
- if (parameter != 0) tile = GetNearbyTile(parameter, tile); // only perform if it is required
+ if (parameter != 0) tile = GetNearbyTile(parameter, tile, signed_offsets); // only perform if it is required
bool is_same_industry = (IsTileType(tile, MP_INDUSTRY) && GetIndustryIndex(tile) == index);
return GetNearbyTileInformation(tile) | (is_same_industry ? 1 : 0) << 8;