File diff r20778:e581b1841afb → r20779:4ee2620daab0
src/viewport.cpp
Show inline comments
 
@@ -1414,35 +1414,32 @@ static void ViewportDrawStrings(ZoomLeve
 
		int w = GB(ss->width, 0, 15);
 
		int x = UnScaleByZoom(ss->x, zoom);
 
		int y = UnScaleByZoom(ss->y, zoom);
 
		int h = VPSM_TOP + (small ? FONT_HEIGHT_SMALL : FONT_HEIGHT_NORMAL) + VPSM_BOTTOM;
 

	
 
		SetDParam(0, ss->params[0]);
 
		SetDParam(1, ss->params[1]);
 

	
 
		if (ss->colour != INVALID_COLOUR) {
 
			/* Do not draw signs nor station names if they are set invisible */
 
			if (IsInvisibilitySet(TO_SIGNS) && ss->string != STR_WHITE_SIGN) continue;
 

	
 
			/* if we didn't draw a rectangle, or if transperant building is on,
 
			 * draw the text in the colour the rectangle would have */
 
			if (IsTransparencySet(TO_SIGNS) && ss->string != STR_WHITE_SIGN) {
 
				/* Real colours need the TC_IS_PALETTE_COLOUR flag
 
				 * otherwise colours from _string_colourmap are assumed. */
 
				/* Don't draw the rectangle.
 
				 * Real colours need the TC_IS_PALETTE_COLOUR flag.
 
				 * Otherwise colours from _string_colourmap are assumed. */
 
				colour = (TextColour)_colour_gradient[ss->colour][6] | TC_IS_PALETTE_COLOUR;
 
			}
 

	
 
			/* Draw the rectangle if 'transparent station signs' is off,
 
			 * or if we are drawing a general text sign (STR_WHITE_SIGN) */
 
			if (!IsTransparencySet(TO_SIGNS) || ss->string == STR_WHITE_SIGN) {
 
			} else {
 
				/* Draw the rectangle if 'transparent station signs' is off,
 
				 * or if we are drawing a general text sign (STR_WHITE_SIGN). */
 
				DrawFrameRect(
 
					x, y, x + w, y + h, ss->colour,
 
					IsTransparencySet(TO_SIGNS) ? FR_TRANSPARENT : FR_NONE
 
				);
 
			}
 
		}
 

	
 
		DrawString(x + VPSM_LEFT, x + w - 1 - VPSM_RIGHT, y + VPSM_TOP, ss->string, colour, SA_HOR_CENTER);
 
	}
 
}
 

	
 
void ViewportDoDraw(const ViewPort *vp, int left, int top, int right, int bottom)