diff options
author | frosch <frosch@openttd.org> | 2008-01-31 17:46:08 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2008-01-31 17:46:08 +0000 |
commit | fe9891c8ec0376a3a79195ee2bd76bba317865a5 (patch) | |
tree | 938c7be67dc7eb597b5484394eaaf2db1f9b663a /src/newgrf_industrytiles.cpp | |
parent | ef35cefddc94539174c490e4e0bbe04a5a9d3dc8 (diff) | |
download | openttd-fe9891c8ec0376a3a79195ee2bd76bba317865a5.tar.xz |
(svn r12028) -Codechange: Split common part of station var 0x67, house var 0x62, indtile var 0x60 and industry var 0x62 to 'newgrf_commons.cpp'.
Diffstat (limited to 'src/newgrf_industrytiles.cpp')
-rw-r--r-- | src/newgrf_industrytiles.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/newgrf_industrytiles.cpp b/src/newgrf_industrytiles.cpp index fcf4105bc..0a964d115 100644 --- a/src/newgrf_industrytiles.cpp +++ b/src/newgrf_industrytiles.cpp @@ -45,16 +45,10 @@ static uint32 GetGRFParameter(IndustryGfx indtile_id, byte parameter) */ uint32 GetNearbyIndustryTileInformation(byte parameter, TileIndex tile, IndustryID index) { - byte tile_type; - bool is_same_industry; - if (parameter != 0) tile = GetNearbyTile(parameter, tile); // only perform if it is required - is_same_industry = (IsTileType(tile, MP_INDUSTRY) && GetIndustryIndex(tile) == index); - tile_type = GetTerrainType(tile) << 2 | (IsTileType(tile, MP_WATER) ? 1 : 0) << 1 | (is_same_industry ? 1 : 0); + bool is_same_industry = (IsTileType(tile, MP_INDUSTRY) && GetIndustryIndex(tile) == index); - uint z; - Slope tileh = GetTileSlope(tile, &z); - return GetTileType(tile) << 24 | z << 16 | tile_type << 8 | tileh; + return GetNearbyTileInformation(tile) | (is_same_industry ? 1 : 0) << 8; } /** This is the position of the tile relative to the northernmost tile of the industry. |