From a2cec54c9d880243617b16972528e305d743014d Mon Sep 17 00:00:00 2001 From: peter1138 Date: Thu, 5 Apr 2007 07:49:04 +0000 Subject: (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. --- src/viewport.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/viewport.cpp') 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. */ -- cgit v1.2.3-54-g00ecf