diff options
author | yexo <yexo@openttd.org> | 2011-12-09 16:11:42 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2011-12-09 16:11:42 +0000 |
commit | 6aae285b72bfe5612ccfc59f75fe51ee557086cd (patch) | |
tree | 14d4e9ea34f472412b0a0df2e81fd1ea1dd5015d /src/newgrf_industries.cpp | |
parent | e7777f44b9c6e44b882052227f371def959ffbfd (diff) | |
download | openttd-6aae285b72bfe5612ccfc59f75fe51ee557086cd.tar.xz |
(svn r23457) -Codechange: introduce Industry::TileBelongsToIndustry() to simplify code checking for that
Diffstat (limited to 'src/newgrf_industries.cpp')
-rw-r--r-- | src/newgrf_industries.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/newgrf_industries.cpp b/src/newgrf_industries.cpp index 70e270b26..38daaa09b 100644 --- a/src/newgrf_industries.cpp +++ b/src/newgrf_industries.cpp @@ -248,7 +248,7 @@ uint32 IndustryGetVariable(const ResolverObject *object, byte variable, uint32 p /* Get random tile bits at offset param */ case 0x61: tile = GetNearbyTile(parameter, tile, false); - return (IsTileType(tile, MP_INDUSTRY) && Industry::GetByTile(tile) == industry) ? GetIndustryRandomBits(tile) : 0; + return industry->TileBelongsToIndustry(tile) ? GetIndustryRandomBits(tile) : 0; /* Land info of nearby tiles */ case 0x62: return GetNearbyIndustryTileInformation(parameter, tile, INVALID_INDUSTRY, false, object->grffile->grf_version >= 8); @@ -256,7 +256,7 @@ uint32 IndustryGetVariable(const ResolverObject *object, byte variable, uint32 p /* Animation stage of nearby tiles */ case 0x63: tile = GetNearbyTile(parameter, tile, false); - if (IsTileType(tile, MP_INDUSTRY) && Industry::GetByTile(tile) == industry) { + if (industry->TileBelongsToIndustry(tile)) { return GetAnimationFrame(tile); } return 0xFFFFFFFF; |