GRF: Use access mask when evaluating get nearby tile information variable
This commit is contained in:
@@ -106,12 +106,14 @@ StationGfx GetTranslatedAirportTileID(StationGfx gfx)
|
||||
* @param grf_version8 True, if we are dealing with a new NewGRF which uses GRF version >= 8.
|
||||
* @return a construction of bits obeying the newgrf format
|
||||
*/
|
||||
static uint32 GetNearbyAirportTileInformation(byte parameter, TileIndex tile, StationID index, bool grf_version8)
|
||||
static uint32 GetNearbyAirportTileInformation(byte parameter, TileIndex tile, StationID index, bool grf_version8, uint32 mask)
|
||||
{
|
||||
if (parameter != 0) tile = GetNearbyTile(parameter, tile); // only perform if it is required
|
||||
bool is_same_airport = (IsTileType(tile, MP_STATION) && IsAirport(tile) && GetStationIndex(tile) == index);
|
||||
|
||||
return GetNearbyTileInformation(tile, grf_version8) | (is_same_airport ? 1 : 0) << 8;
|
||||
uint32 result = (is_same_airport ? 1 : 0) << 8;
|
||||
if (mask & ~0x100) result |= GetNearbyTileInformation(tile, grf_version8, mask);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -178,7 +180,7 @@ static uint32 GetAirportTileIDAtOffset(TileIndex tile, const Station *st, uint32
|
||||
case 0x44: return GetAnimationFrame(this->tile);
|
||||
|
||||
/* Land info of nearby tiles */
|
||||
case 0x60: return GetNearbyAirportTileInformation(parameter, this->tile, this->st->index, this->ro.grffile->grf_version >= 8);
|
||||
case 0x60: return GetNearbyAirportTileInformation(parameter, this->tile, this->st->index, this->ro.grffile->grf_version >= 8, extra->mask);
|
||||
|
||||
/* Animation stage of nearby tiles */
|
||||
case 0x61: {
|
||||
|
||||
Reference in New Issue
Block a user