diff options
author | frosch <frosch@openttd.org> | 2008-11-22 16:04:11 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2008-11-22 16:04:11 +0000 |
commit | a64298ebb935e520953b46f5b1ab916446c5327f (patch) | |
tree | 3eae77104f99b355105a041898cd4174c1d8031f /src/newgrf_industrytiles.cpp | |
parent | 795569298f4ee4806605c8f024010f24d5ff9033 (diff) | |
download | openttd-a64298ebb935e520953b46f5b1ab916446c5327f.tar.xz |
(svn r14606) -Codechange: Unify usage of PALETTE_MODIFIER_TRANSPARENT and PALETTE_MODIFIER_COLOR in spritelayout drawing.
-Fix [FS#2419]: The modifiers were not applied in all cases.
Diffstat (limited to 'src/newgrf_industrytiles.cpp')
-rw-r--r-- | src/newgrf_industrytiles.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/newgrf_industrytiles.cpp b/src/newgrf_industrytiles.cpp index bab9977f7..97706038c 100644 --- a/src/newgrf_industrytiles.cpp +++ b/src/newgrf_industrytiles.cpp @@ -183,7 +183,7 @@ static void IndustryDrawTileLayout(const TileInfo *ti, const SpriteGroup *group, if (image == SPR_FLAT_WATER_TILE && IsIndustryTileOnWater(ti->tile)) { DrawWaterClassGround(ti); } else { - DrawGroundSprite(image, pal); + DrawGroundSprite(image, GroundSpritePaletteTransform(image, pal, GENERAL_SPRITE_COLOR(rnd_color))); } } @@ -198,13 +198,7 @@ static void IndustryDrawTileLayout(const TileInfo *ti, const SpriteGroup *group, if (IS_CUSTOM_SPRITE(image)) image += stage; - if (HasBit(image, PALETTE_MODIFIER_TRANSPARENT) || HasBit(image, PALETTE_MODIFIER_COLOR)) { - if (pal == 0) { - pal = GENERAL_SPRITE_COLOR(rnd_color); - } - } else { - pal = PAL_NONE; - } + pal = SpriteLayoutPaletteTransform(image, pal, GENERAL_SPRITE_COLOR(rnd_color)); if ((byte)dtss->delta_z != 0x80) { AddSortableSpriteToDraw( |