src/newgrf_industries.cpp
changeset 8202 ec7e5b2d35c9
parent 8181 074de85b0f1a
child 8246 ff7b892d8a28
equal deleted inserted replaced
8201:9bb285e50530 8202:ec7e5b2d35c9
    81  * @param tile TileIndex of the tile to query
    81  * @param tile TileIndex of the tile to query
    82  * @param i Industry to which to compare the tile to
    82  * @param i Industry to which to compare the tile to
    83  * @return value encoded as per NFO specs */
    83  * @return value encoded as per NFO specs */
    84 uint32 GetIndustryIDAtOffset(TileIndex tile, const Industry *i)
    84 uint32 GetIndustryIDAtOffset(TileIndex tile, const Industry *i)
    85 {
    85 {
    86 	if (!IsTileType(tile, MP_INDUSTRY) || GetIndustryIndex(tile) == i->index) {
    86 	if (!IsTileType(tile, MP_INDUSTRY) || GetIndustryIndex(tile) != i->index) {
    87 		/* No industry and/or the tile does not have the same industry as the one we match it with */
    87 		/* No industry and/or the tile does not have the same industry as the one we match it with */
    88 		return 0xFFFF;
    88 		return 0xFFFF;
    89 	}
    89 	}
    90 
    90 
    91 	IndustryGfx gfx = GetCleanIndustryGfx(tile);
    91 	IndustryGfx gfx = GetCleanIndustryGfx(tile);