diff options
author | peter1138 <peter1138@openttd.org> | 2007-04-05 07:49:04 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2007-04-05 07:49:04 +0000 |
commit | 51d72c11c81059aa0d41db26c7158e2786893ae0 (patch) | |
tree | 56e95f5fe598d9097484013307aecd3c2c9821d0 /src/viewport.cpp | |
parent | 0340291888f6646f842cd27936032bf1e066b7ac (diff) | |
download | openttd-51d72c11c81059aa0d41db26c7158e2786893ae0.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.cpp | 9 |
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. */ |