summaryrefslogtreecommitdiff
path: root/src/economy.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2009-09-13 19:15:59 +0000
committerfrosch <frosch@openttd.org>2009-09-13 19:15:59 +0000
commitebd916be3def20902cf19ffd16555074728eb9c3 (patch)
treec7748d7612a61b9558ffd10ffb176e34584f2376 /src/economy.cpp
parent5de9cc46b50b8e677395543c10b26b59c860212b (diff)
downloadopenttd-ebd916be3def20902cf19ffd16555074728eb9c3.tar.xz
(svn r17532) -Codechange: Rename several Invalidate functions to SetDirty for more consistency and distinguishability.
Diffstat (limited to 'src/economy.cpp')
-rw-r--r--src/economy.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/economy.cpp b/src/economy.cpp
index a31595a7e..680727735 100644
--- a/src/economy.cpp
+++ b/src/economy.cpp
@@ -281,7 +281,7 @@ int UpdateCompanyRatingAndValue(Company *c, bool update)
c->old_economy[0].company_value = CalculateCompanyValue(c);
}
- InvalidateWindow(WC_PERFORMANCE_DETAIL, 0);
+ SetWindowDirty(WC_PERFORMANCE_DETAIL, 0);
return score;
}
@@ -576,12 +576,12 @@ static void CompaniesGenStatistics()
CompanyCheckBankrupt(c);
}
- InvalidateWindow(WC_INCOME_GRAPH, 0);
- InvalidateWindow(WC_OPERATING_PROFIT, 0);
- InvalidateWindow(WC_DELIVERED_CARGO, 0);
- InvalidateWindow(WC_PERFORMANCE_HISTORY, 0);
- InvalidateWindow(WC_COMPANY_VALUE, 0);
- InvalidateWindow(WC_COMPANY_LEAGUE, 0);
+ SetWindowDirty(WC_INCOME_GRAPH, 0);
+ SetWindowDirty(WC_OPERATING_PROFIT, 0);
+ SetWindowDirty(WC_DELIVERED_CARGO, 0);
+ SetWindowDirty(WC_PERFORMANCE_HISTORY, 0);
+ SetWindowDirty(WC_COMPANY_VALUE, 0);
+ SetWindowDirty(WC_COMPANY_LEAGUE, 0);
}
/**
@@ -670,10 +670,10 @@ void RecomputePrices()
cs->current_payment = ((int64)cs->initial_payment * _economy.inflation_payment) >> 16;
}
- InvalidateWindowClasses(WC_BUILD_VEHICLE);
- InvalidateWindowClasses(WC_REPLACE_VEHICLE);
- InvalidateWindowClasses(WC_VEHICLE_DETAILS);
- InvalidateWindow(WC_PAYMENT_RATES, 0);
+ SetWindowClassesDirty(WC_BUILD_VEHICLE);
+ SetWindowClassesDirty(WC_REPLACE_VEHICLE);
+ SetWindowClassesDirty(WC_VEHICLE_DETAILS);
+ SetWindowDirty(WC_PAYMENT_RATES, 0);
}
static void CompaniesPayInterest()
@@ -966,7 +966,7 @@ static void TriggerIndustryProduction(Industry *i)
if (HasBit(callback, CBM_IND_PRODUCTION_CARGO_ARRIVAL)) {
IndustryProductionCallback(i, 0);
} else {
- InvalidateWindow(WC_INDUSTRY_VIEW, i->index);
+ SetWindowDirty(WC_INDUSTRY_VIEW, i->index);
}
} else {
for (uint cargo_index = 0; cargo_index < lengthof(i->incoming_cargo_waiting); cargo_index++) {
@@ -1354,13 +1354,13 @@ static void LoadUnloadVehicle(Vehicle *v, int *cargo_left)
}
if (result != 0) {
- InvalidateWindow(GetWindowClassForVehicleType(v->type), v->owner);
- InvalidateWindow(WC_VEHICLE_DETAILS, v->index);
+ SetWindowDirty(GetWindowClassForVehicleType(v->type), v->owner);
+ SetWindowDirty(WC_VEHICLE_DETAILS, v->index);
st->MarkTilesDirty(true);
v->MarkDirty();
- if (result & 2) InvalidateWindow(WC_STATION_VIEW, last_visited);
+ if (result & 2) SetWindowDirty(WC_STATION_VIEW, last_visited);
}
}
@@ -1495,7 +1495,7 @@ CommandCost CmdBuyShareInCompany(TileIndex tile, DoCommandFlag flags, uint32 p1,
break;
}
}
- InvalidateWindow(WC_COMPANY, p1);
+ SetWindowDirty(WC_COMPANY, p1);
}
return cost;
}
@@ -1525,7 +1525,7 @@ CommandCost CmdSellShareInCompany(TileIndex tile, DoCommandFlag flags, uint32 p1
OwnerByte *b = c->share_owners;
while (*b != _current_company) b++; // share owners is guaranteed to contain company
*b = COMPANY_SPECTATOR;
- InvalidateWindow(WC_COMPANY, p1);
+ SetWindowDirty(WC_COMPANY, p1);
}
return CommandCost(EXPENSES_OTHER, cost);
}