summaryrefslogtreecommitdiff
path: root/src/rail_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-07-26 14:07:11 +0000
committerrubidium <rubidium@openttd.org>2007-07-26 14:07:11 +0000
commita26ef1ee3aa21ff064d70971a4bb3605b40100db (patch)
treef9ea4c50fe8ce5b57839ce0b5407aac9a6f2b452 /src/rail_cmd.cpp
parente97c2bf6211478399723099ac9e50ba695e536b7 (diff)
downloadopenttd-a26ef1ee3aa21ff064d70971a4bb3605b40100db.tar.xz
(svn r10696) -Codechange: remove duplication of the "make sprite transparent" code.
Diffstat (limited to 'src/rail_cmd.cpp')
-rw-r--r--src/rail_cmd.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp
index e2f3eb6d1..c3aebcaa6 100644
--- a/src/rail_cmd.cpp
+++ b/src/rail_cmd.cpp
@@ -1526,10 +1526,7 @@ default_waypoint:
image += relocation;
}
- if (HASBIT(_transparent_opt, TO_BUILDINGS)) {
- SETBIT(image, PALETTE_MODIFIER_TRANSPARENT);
- pal = PALETTE_TO_TRANSPARENT;
- } else if (HASBIT(image, PALETTE_MODIFIER_COLOR)) {
+ if (!HASBIT(_transparent_opt, TO_BUILDINGS) && HASBIT(image, PALETTE_MODIFIER_COLOR)) {
pal = _drawtile_track_palette;
} else {
pal = dtss->pal;
@@ -1540,7 +1537,8 @@ default_waypoint:
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(_transparent_opt, TO_BUILDINGS)
);
} else {
AddChildSpriteScreen(image, pal, dtss->delta_x, dtss->delta_y);