1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-15 08:22:34 +01:00

Codechange: Replace macros GENERAL_SPRITE_COLOUR and COMPANY_SPRITE_COLOUR with functions GetColourPalette and GetCompanyPalette.

This commit is contained in:
frosch
2025-04-17 17:36:22 +02:00
committed by frosch
parent c2c5dae760
commit cde350dc01
20 changed files with 52 additions and 36 deletions

View File

@@ -363,7 +363,7 @@ static void DrawTile_Industry(TileInfo *ti)
if (image == SPR_FLAT_WATER_TILE && IsTileOnWater(ti->tile)) {
DrawWaterClassGround(ti);
} else {
DrawGroundSprite(image, GroundSpritePaletteTransform(image, dits->ground.pal, GENERAL_SPRITE_COLOUR(ind->random_colour)));
DrawGroundSprite(image, GroundSpritePaletteTransform(image, dits->ground.pal, GetColourPalette(ind->random_colour)));
}
/* If industries are transparent and invisible, do not draw the upper part */
@@ -372,7 +372,7 @@ static void DrawTile_Industry(TileInfo *ti)
/* Add industry on top of the ground? */
image = dits->building.sprite;
if (image != 0) {
AddSortableSpriteToDraw(image, SpriteLayoutPaletteTransform(image, dits->building.pal, GENERAL_SPRITE_COLOUR(ind->random_colour)),
AddSortableSpriteToDraw(image, SpriteLayoutPaletteTransform(image, dits->building.pal, GetColourPalette(ind->random_colour)),
ti->x + dits->subtile_x,
ti->y + dits->subtile_y,
dits->width,