diff options
author | belugas <belugas@openttd.org> | 2007-11-10 01:17:15 +0000 |
---|---|---|
committer | belugas <belugas@openttd.org> | 2007-11-10 01:17:15 +0000 |
commit | f55fdfb7c42b2e2e39b165fd17f7671e14516303 (patch) | |
tree | 07b6a8f97a15f768d33fc0b7a3405373f3745b3b /src/rail_cmd.cpp | |
parent | 3a84801f5563ca73c47c56f9682582abe990abb7 (diff) | |
download | openttd-f55fdfb7c42b2e2e39b165fd17f7671e14516303.tar.xz |
(svn r11399) -Feature(ette): transparency settings can now be saved and thus remembered.
-Codechange: Wrap all transparency settings in accessors, hiding the implementation
-Change: Clicking "transparent building" menu will toggle Houses And Trees only. The other options can be used in the transparency gui.
Initial patch by Smatz (FS#1349), with some rework by BigBB and your humble servant.
Diffstat (limited to 'src/rail_cmd.cpp')
-rw-r--r-- | src/rail_cmd.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp index f0e16edf5..957c37b07 100644 --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -40,6 +40,7 @@ #include "train.h" #include "misc/autoptr.hpp" #include "autoslope.h" +#include "transparency.h" const byte _track_sloped_sprites[14] = { 14, 15, 22, 13, @@ -1755,7 +1756,7 @@ default_waypoint: image += relocation; } - if (!HASBIT(_transparent_opt, TO_BUILDINGS) && HASBIT(image, PALETTE_MODIFIER_COLOR)) { + if (!IsTransparencySet(TO_BUILDINGS) && HASBIT(image, PALETTE_MODIFIER_COLOR)) { pal = _drawtile_track_palette; } else { pal = dtss->pal; @@ -1767,7 +1768,7 @@ default_waypoint: ti->x + dtss->delta_x, ti->y + dtss->delta_y, dtss->size_x, dtss->size_y, dtss->size_z, ti->z + dtss->delta_z, - HASBIT(_transparent_opt, TO_BUILDINGS) + IsTransparencySet(TO_BUILDINGS) ); } else { AddChildSpriteScreen(image, pal, dtss->delta_x, dtss->delta_y); |