diff options
author | rubidium <rubidium@openttd.org> | 2007-07-26 14:07:11 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-07-26 14:07:11 +0000 |
commit | a26ef1ee3aa21ff064d70971a4bb3605b40100db (patch) | |
tree | f9ea4c50fe8ce5b57839ce0b5407aac9a6f2b452 /src/newgrf_industrytiles.cpp | |
parent | e97c2bf6211478399723099ac9e50ba695e536b7 (diff) | |
download | openttd-a26ef1ee3aa21ff064d70971a4bb3605b40100db.tar.xz |
(svn r10696) -Codechange: remove duplication of the "make sprite transparent" code.
Diffstat (limited to 'src/newgrf_industrytiles.cpp')
-rw-r--r-- | src/newgrf_industrytiles.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/newgrf_industrytiles.cpp b/src/newgrf_industrytiles.cpp index ec7b269c5..ede452290 100644 --- a/src/newgrf_industrytiles.cpp +++ b/src/newgrf_industrytiles.cpp @@ -166,10 +166,7 @@ void IndustryDrawTileLayout(const TileInfo *ti, const SpriteGroup *group, byte r image = dtss->image + stage; pal = dtss->pal; - if (!HASBIT(image, SPRITE_MODIFIER_OPAQUE) && HASBIT(_transparent_opt, TO_INDUSTRIES)) { - SETBIT(image, PALETTE_MODIFIER_TRANSPARENT); - pal = PALETTE_TO_TRANSPARENT; - } else if (HASBIT(image, PALETTE_MODIFIER_COLOR)) { + if (HASBIT(image, PALETTE_MODIFIER_COLOR)) { pal = GENERAL_SPRITE_COLOR(rnd_color); } else { pal = PAL_NONE; @@ -180,7 +177,8 @@ void IndustryDrawTileLayout(const TileInfo *ti, const SpriteGroup *group, byte r image, pal, ti->x + dtss->delta_x, ti->y + dtss->delta_y, dtss->size_x, dtss->size_y, - dtss->size_z, ti->z + dtss->delta_z + dtss->size_z, ti->z + dtss->delta_z, + !HASBIT(image, SPRITE_MODIFIER_OPAQUE) && HASBIT(_transparent_opt, TO_INDUSTRIES) ); } else { AddChildSpriteScreen(image, pal, dtss->delta_x, dtss->delta_y); |