diff src/town_cmd.cpp @ 13034:6eb3f749890a draft

(svn r17532) -Codechange: Rename several Invalidate functions to SetDirty for more consistency and distinguishability.
author frosch <frosch@openttd.org>
date Sun, 13 Sep 2009 19:15:59 +0000
parents 07a634b14de8
children 0ea9c5ed1b7a
line wrap: on
line diff
--- a/src/town_cmd.cpp
+++ b/src/town_cmd.cpp
@@ -339,7 +339,7 @@
 	this->sign.UpdatePosition(pt.x, pt.y - 24,
 		_settings_client.gui.population_in_label ? STR_VIEWPORT_TOWN_POP : STR_VIEWPORT_TOWN);
 
-	InvalidateWindow(WC_TOWN_VIEW, this->index);
+	SetWindowDirty(WC_TOWN_VIEW, this->index);
 }
 
 /** Update the virtual coords needed to draw the town sign for all towns. */
@@ -360,7 +360,7 @@
 static void ChangePopulation(Town *t, int mod)
 {
 	t->population += mod;
-	InvalidateWindow(WC_TOWN_VIEW, t->index);
+	SetWindowDirty(WC_TOWN_VIEW, t->index);
 	t->UpdateVirtCoord();
 
 	InvalidateWindowData(WC_TOWN_DIRECTORY, 0, 1);
@@ -2471,7 +2471,7 @@
 		 */
 		if (t->ratings[_current_company] > RATING_BRIBE_DOWN_TO) {
 			t->ratings[_current_company] = RATING_BRIBE_DOWN_TO;
-			InvalidateWindow(WC_TOWN_AUTHORITY, t->index);
+			SetWindowDirty(WC_TOWN_AUTHORITY, t->index);
 		}
 	} else {
 		ChangeTownRating(t, RATING_BRIBE_UP_STEP, RATING_BRIBE_MAXIMUM, DC_EXEC);
@@ -2575,7 +2575,7 @@
 
 	if (flags & DC_EXEC) {
 		_town_action_proc[p2](t);
-		InvalidateWindow(WC_TOWN_AUTHORITY, p1);
+		SetWindowDirty(WC_TOWN_AUTHORITY, p1);
 	}
 
 	return cost;
@@ -2616,7 +2616,7 @@
 		t->ratings[i] = Clamp(t->ratings[i], RATING_MINIMUM, RATING_MAXIMUM);
 	}
 
-	InvalidateWindow(WC_TOWN_AUTHORITY, t->index);
+	SetWindowDirty(WC_TOWN_AUTHORITY, t->index);
 
 	ClrBit(t->flags, TOWN_IS_FUNDED);
 	if (_settings_game.economy.town_growth_rate == 0 && t->fund_buildings_months == 0) return;
@@ -2675,7 +2675,7 @@
 	t->max_mail = t->new_max_mail; t->new_max_mail = 0;
 	t->act_mail = t->new_act_mail; t->new_act_mail = 0;
 
-	InvalidateWindow(WC_TOWN_VIEW, t->index);
+	SetWindowDirty(WC_TOWN_VIEW, t->index);
 }
 
 static void UpdateTownUnwanted(Town *t)
@@ -2821,7 +2821,7 @@
 	} else {
 		SetBit(t->have_ratings, _current_company);
 		t->ratings[_current_company] = rating;
-		InvalidateWindow(WC_TOWN_AUTHORITY, t->index);
+		SetWindowDirty(WC_TOWN_AUTHORITY, t->index);
 	}
 }