(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.
This commit is contained in:
@@ -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(
|
||||
|
Reference in New Issue
Block a user