* This is the position of the tile relative to the northernmost tile of the industry. * Format: 00yxYYXX * Variable Content * x the x offset from the northernmost tile * XX same, but stored in a byte instead of a nibble * y the y offset from the northernmost tile * YY same, but stored in a byte instead of a nibble * @param tile TileIndex of the tile to evaluat
| 52 | * @param ind_tile northernmost tile of the industry |
| 53 | */ |
| 54 | uint32_t GetRelativePosition(TileIndex tile, TileIndex ind_tile) |
| 55 | { |
| 56 | uint8_t x = TileX(tile) - TileX(ind_tile); |
| 57 | uint8_t y = TileY(tile) - TileY(ind_tile); |
| 58 | |
| 59 | return ((y & 0xF) << 20) | ((x & 0xF) << 16) | (y << 8) | x; |
| 60 | } |
| 61 | |
| 62 | /* virtual */ uint32_t IndustryTileScopeResolver::GetVariable(uint8_t variable, [[maybe_unused]] uint32_t parameter, bool &available) const |
| 63 | { |
no test coverage detected