Changeset - r27633:0683ff891bec
[Not reviewed]
master
0 1 0
Rubidium - 15 months ago 2023-06-22 18:08:06
rubidium@openttd.org
Codechange: move sign invisibility check out of loop
1 file changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/viewport.cpp
Show inline comments
 
@@ -1417,6 +1417,9 @@ static void ViewportAddKdtreeSigns(DrawP
 
			t->index, t->cache.population);
 
	}
 

	
 
	/* Do not draw signs nor station names if they are set invisible */
 
	if (IsInvisibilitySet(TO_SIGNS)) return;
 

	
 
	for (const auto *si : signs) {
 
		ViewportAddString(dpi, ZOOM_LVL_OUT_16X, &si->sign,
 
			STR_WHITE_SIGN,
 
@@ -1701,9 +1704,6 @@ static void ViewportDrawStrings(ZoomLeve
 
		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 (IsTransparencySet(TO_SIGNS) && ss.string != STR_WHITE_SIGN) {
 
				/* Don't draw the rectangle.
 
				 * Real colours need the TC_IS_PALETTE_COLOUR flag.
0 comments (0 inline, 0 general)