| 159 | } |
| 160 | |
| 161 | static void IndustryDrawTileLayout(const TileInfo *ti, const DrawTileSpriteSpan &dts, Colours rnd_colour, uint8_t stage) |
| 162 | { |
| 163 | SpriteID image = dts.ground.sprite; |
| 164 | PaletteID pal = dts.ground.pal; |
| 165 | |
| 166 | if (HasBit(image, SPRITE_MODIFIER_CUSTOM_SPRITE)) image += stage; |
| 167 | if (HasBit(pal, SPRITE_MODIFIER_CUSTOM_SPRITE)) pal += stage; |
| 168 | |
| 169 | if (GB(image, 0, SPRITE_WIDTH) != 0) { |
| 170 | /* If the ground sprite is the default flat water sprite, draw also canal/river borders |
| 171 | * Do not do this if the tile's WaterClass is 'land'. */ |
| 172 | if (image == SPR_FLAT_WATER_TILE && IsTileOnWater(ti->tile)) { |
| 173 | DrawWaterClassGround(ti); |
| 174 | } else { |
| 175 | DrawGroundSprite(image, GroundSpritePaletteTransform(image, pal, GetColourPalette(rnd_colour))); |
| 176 | } |
| 177 | } |
| 178 | |
| 179 | DrawNewGRFTileSeq(ti, &dts, TO_INDUSTRIES, stage, GetColourPalette(rnd_colour)); |
| 180 | } |
| 181 | |
| 182 | uint16_t GetIndustryTileCallback(CallbackID callback, uint32_t param1, uint32_t param2, IndustryGfx gfx_id, Industry *industry, TileIndex tile, std::span<int32_t> regs100) |
| 183 | { |
no test coverage detected