summaryrefslogtreecommitdiffstats
path: root/src/core/Stats.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-05-16 22:06:33 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-05-16 22:06:33 +0200
commitb587d835e8d31c1e61b3eadbced099326c156644 (patch)
tree816f2c3f5a435a18a233de931518bca257a12a31 /src/core/Stats.cpp
parentgangs, script and replay fixes (diff)
downloadre3-b587d835e8d31c1e61b3eadbced099326c156644.tar
re3-b587d835e8d31c1e61b3eadbced099326c156644.tar.gz
re3-b587d835e8d31c1e61b3eadbced099326c156644.tar.bz2
re3-b587d835e8d31c1e61b3eadbced099326c156644.tar.lz
re3-b587d835e8d31c1e61b3eadbced099326c156644.tar.xz
re3-b587d835e8d31c1e61b3eadbced099326c156644.tar.zst
re3-b587d835e8d31c1e61b3eadbced099326c156644.zip
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();