Changeset - r11441:f09f750a926b
[Not reviewed]
master
0 1 0
rubidium - 15 years ago 2009-03-22 09:43:00
rubidium@openttd.org
(svn r15804) -Fix (r15796): viewport strings weren't properly 'rendered'.
-Codechange: use the new string drawing API for the viewport.
1 file changed with 6 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/viewport.cpp
Show inline comments
 
@@ -1457,8 +1457,13 @@ static void ViewportDrawStrings(DrawPixe
 
		} else {
 
			colour = TC_BLACK;
 
		}
 

	
 
		/* The maximum width of the string */
 
		int w = GB(ss->width, 0, 15);
 
		if (w == 0) w = UINT16_MAX;
 

	
 
		DrawString(
 
			UnScaleByZoom(ss->x, zoom), UnScaleByZoom(ss->y, zoom) - (ss->width & 0x8000 ? 2 : 0),
 
			UnScaleByZoom(ss->x, zoom), UnScaleByZoom(ss->x, zoom) + w, UnScaleByZoom(ss->y, zoom) - (ss->width & 0x8000 ? 2 : 0),
 
			ss->string, colour
 
		);
 
	}
0 comments (0 inline, 0 general)