summaryrefslogtreecommitdiffstats
path: root/src/core/Stats.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/Stats.cpp')
-rw-r--r--src/core/Stats.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/core/Stats.cpp b/src/core/Stats.cpp
index 99274e04..32148476 100644
--- a/src/core/Stats.cpp
+++ b/src/core/Stats.cpp
@@ -58,6 +58,11 @@ int32 CStats::CarsCrushed;
int32 CStats::FastestTimes[CStats::TOTAL_FASTEST_TIMES];
int32 CStats::HighestScores[CStats::TOTAL_HIGHEST_SCORES];
+int32 CStats::Sprayings;
+float CStats::AutoPaintingBudget;
+int32 CStats::NoMoreHurricanes;
+float CStats::FashionBudget;
+
void CStats::Init()
{
PeopleKilledByOthers = 0;
@@ -113,6 +118,10 @@ void CStats::Init()
IndustrialPassed = 0;
CommercialPassed = 0;
SuburbanPassed = 0;
+
+ Sprayings = 0;
+ AutoPaintingBudget = 0.0f;
+ NoMoreHurricanes = 0;
}
void CStats::RegisterFastestTime(int32 index, int32 time)
@@ -241,6 +250,19 @@ int32 CStats::FindCriminalRatingNumber()
return rating;
}
+float CStats::GetPercentageProgress()
+{
+ float percentCompleted = (CStats::TotalProgressInGame == 0 ? 0 :
+ CStats::ProgressMade * 100.0f / (CGame::nastyGame ? CStats::TotalProgressInGame : CStats::TotalProgressInGame - 1.0f));
+
+ return Min(percentCompleted, 100.0f);
+}
+
+void CStats::MoneySpentOnFashion(int32 money)
+{
+ FashionBudget += money;
+}
+
void CStats::SaveStats(uint8 *buf, uint32 *size)
{
CheckPointReachedSuccessfully();