summaryrefslogtreecommitdiff
path: root/src/viewport.cpp
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2007-04-05 07:49:04 +0000
committerpeter1138 <peter1138@openttd.org>2007-04-05 07:49:04 +0000
commita2cec54c9d880243617b16972528e305d743014d (patch)
tree56e95f5fe598d9097484013307aecd3c2c9821d0 /src/viewport.cpp
parentabf88b687ccbc7e344b3eacf8a84c1f71cac73a3 (diff)
downloadopenttd-a2cec54c9d880243617b16972528e305d743014d.tar.xz
(svn r9563) -Feature: Add more finer control to transparency options, including a new toolbar, accessible from the map menu or Ctrl X. Patch by Wolf01.
Diffstat (limited to 'src/viewport.cpp')
-rw-r--r--src/viewport.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/viewport.cpp b/src/viewport.cpp
index 5c7a166c9..6986cc534 100644
--- a/src/viewport.cpp
+++ b/src/viewport.cpp
@@ -1193,11 +1193,12 @@ static void ViewportDrawStrings(DrawPixelInfo *dpi, const StringSpriteToDraw *ss
/* Draw the rectangle if 'tranparent station signs' is off,
* or if we are drawing a general text sign (STR_2806) */
- if (!(_display_opt & DO_TRANS_SIGNS) || ss->string == STR_2806)
+ if (!HASBIT(_transparent_opt, TO_SIGNS) || ss->string == STR_2806) {
DrawFrameRect(
x, y, x + w, bottom, ss->color,
- (_display_opt & DO_TRANS_BUILDINGS) ? FR_TRANSPARENT : FR_NONE
+ HASBIT(_transparent_opt, TO_SIGNS) ? FR_TRANSPARENT : FR_NONE
);
+ }
}
SetDParam(0, ss->params[0]);
@@ -1205,8 +1206,8 @@ static void ViewportDrawStrings(DrawPixelInfo *dpi, const StringSpriteToDraw *ss
/* if we didn't draw a rectangle, or if transparant building is on,
* draw the text in the color the rectangle would have */
if ((
- (_display_opt & DO_TRANS_BUILDINGS) ||
- (_display_opt & DO_TRANS_SIGNS && ss->string != STR_2806)
+ HASBIT(_transparent_opt, TO_BUILDINGS) ||
+ (HASBIT(_transparent_opt, TO_SIGNS) && ss->string != STR_2806)
) && ss->width != 0) {
/* Real colors need the IS_PALETTE_COLOR flag
* otherwise colors from _string_colormap are assumed. */