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.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/core/Stats.cpp b/src/core/Stats.cpp
index d50be0d5..a4bf409e 100644
--- a/src/core/Stats.cpp
+++ b/src/core/Stats.cpp
@@ -61,6 +61,7 @@ int32 CStats::HighestScores[CStats::TOTAL_HIGHEST_SCORES];
int32 CStats::Sprayings;
float CStats::AutoPaintingBudget;
int32 CStats::NoMoreHurricanes;
+float CStats::FashionBudget;
void CStats::Init()
{
@@ -208,6 +209,19 @@ void CStats::SetTotalNumberMissions(int32 total)
TotalNumberMissions = total;
}
+float CStats::GetPercentageProgress()
+{
+ float p;
+ if (TotalProgressInGame == 0.0f)
+ p = 0.0f;
+ else if (CGame::nastyGame)
+ p = 100.0f * ProgressMade / TotalProgressInGame;
+ else
+ p = 100.0f * ProgressMade / (TotalProgressInGame - 1);
+
+ return Min(100.0f, p);
+}
+
wchar *CStats::FindCriminalRatingString()
{
int rating = FindCriminalRatingNumber();
@@ -249,6 +263,11 @@ int32 CStats::FindCriminalRatingNumber()
return rating;
}
+void CStats::MoneySpentOnFashion(int32 money)
+{
+ FashionBudget += money;
+}
+
void CStats::SaveStats(uint8 *buf, uint32 *size)
{
CheckPointReachedSuccessfully();