From f55fdfb7c42b2e2e39b165fd17f7671e14516303 Mon Sep 17 00:00:00 2001 From: belugas Date: Sat, 10 Nov 2007 01:17:15 +0000 Subject: (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. --- src/station_cmd.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/station_cmd.cpp') diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 9bc18c759..dcf3f1f53 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -43,6 +43,7 @@ #include "cargotype.h" #include "strings.h" #include "autoslope.h" +#include "transparency.h" DEFINE_OLD_POOL_GENERIC(Station, Station) DEFINE_OLD_POOL_GENERIC(RoadStop, RoadStop) @@ -2138,7 +2139,7 @@ static void DrawTile_Station(TileInfo *ti) } SpriteID pal; - if (!HASBIT(_transparent_opt, TO_BUILDINGS) && HASBIT(image, PALETTE_MODIFIER_COLOR)) { + if (!IsTransparencySet(TO_BUILDINGS) && HASBIT(image, PALETTE_MODIFIER_COLOR)) { pal = palette; } else { pal = dtss->pal; @@ -2150,10 +2151,10 @@ static void DrawTile_Station(TileInfo *ti) 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, HASBIT(_transparent_opt, TO_BUILDINGS)); + AddChildSpriteScreen(image, pal, dtss->delta_x, dtss->delta_y, IsTransparencySet(TO_BUILDINGS)); } } } -- cgit v1.2.3-54-g00ecf