From 1622973ffa457faebb61b9cde233018255f071b7 Mon Sep 17 00:00:00 2001 From: PerikiyoXD Date: Tue, 24 Mar 2020 19:50:08 +0100 Subject: Implement Init for Stats --- src/core/Stats.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'src/core/Stats.h') diff --git a/src/core/Stats.h b/src/core/Stats.h index 0a750d5e..826dcd73 100644 --- a/src/core/Stats.h +++ b/src/core/Stats.h @@ -1,5 +1,7 @@ #pragma once +#include "PedType.h" + class CStats { public: @@ -8,14 +10,14 @@ public: TOTAL_HIGHEST_SCORES = 16 }; static int32 &DaysPassed; - static int32 &HeadsPopped; + static int32 &HeadsPopped; static bool& CommercialPassed; static bool& IndustrialPassed; static bool& SuburbanPassed; static int32 &NumberKillFrenziesPassed; static int32 &PeopleKilledByOthers; static int32 &HelisDestroyed; - static int32 *PedsKilledOfThisType; //[NUM_PEDTYPES] + static int32(&PedsKilledOfThisType)[ePedType::NUM_PEDTYPES]; static int32 &TimesDied; static int32 &TimesArrested; static int32 &KillsSinceLastCheckpoint; @@ -50,7 +52,14 @@ public: static int32 &LongestFlightInDodo; static int32 &TimeTakenDefuseMission; static int32 &TotalNumberKillFrenzies; - static int32 &TotalNumberMissions; + static int32 &TotalNumberMissions; + static int32 &ShotsMade; + static int32 &KgsOfExplosivesUsed; + static int32 &InstantHitsFiredByPlayer; + static int32 &InstantHitsHitByPlayer; + static int32 &BestTimeBombDefusal; + static int32 &mmRain; + static int32 &CarsCrushed; static int32(&FastestTimes)[TOTAL_FASTEST_TIMES]; static int32(&HighestScores)[TOTAL_HIGHEST_SCORES]; -- cgit v1.2.3 From 4f1d6123dd939f87a1798a3ebb447106a8c1ff73 Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Mon, 6 Apr 2020 19:31:08 +0300 Subject: stats fix --- src/core/Stats.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/core/Stats.h') diff --git a/src/core/Stats.h b/src/core/Stats.h index 41d926e6..029b2307 100644 --- a/src/core/Stats.h +++ b/src/core/Stats.h @@ -62,8 +62,6 @@ public: static int32 &CarsCrushed; static int32(&FastestTimes)[TOTAL_FASTEST_TIMES]; static int32(&HighestScores)[TOTAL_HIGHEST_SCORES]; - static int32 &KgOfExplosivesUsed; - static int32 &CarsCrushed; public: static void RegisterFastestTime(int32, int32); @@ -85,6 +83,5 @@ public: static void CheckPointReachedSuccessfully() { TotalLegitimateKills += KillsSinceLastCheckpoint; KillsSinceLastCheckpoint = 0; }; static void RegisterElBurroTime(int32); static void SaveStats(uint8 *buf, uint32 *size); - static void Init(void); }; -- cgit v1.2.3 From 6cfc31510dcc57edb0cc02d09073d84052c26ed4 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Thu, 9 Apr 2020 13:14:37 +0300 Subject: CStats finished --- src/core/Stats.h | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'src/core/Stats.h') diff --git a/src/core/Stats.h b/src/core/Stats.h index 029b2307..ac3259f9 100644 --- a/src/core/Stats.h +++ b/src/core/Stats.h @@ -11,9 +11,9 @@ public: }; static int32 &DaysPassed; static int32 &HeadsPopped; - static bool& CommercialPassed; - static bool& IndustrialPassed; - static bool& SuburbanPassed; + static int32& CommercialPassed; + static int32& IndustrialPassed; + static int32& SuburbanPassed; static int32 &NumberKillFrenziesPassed; static int32 &PeopleKilledByOthers; static int32 &HelisDestroyed; @@ -53,7 +53,7 @@ public: static int32 &TimeTakenDefuseMission; static int32 &TotalNumberKillFrenzies; static int32 &TotalNumberMissions; - static int32 &ShotsMade; + static int32 &RoundsFiredByPlayer; static int32 &KgsOfExplosivesUsed; static int32 &InstantHitsFiredByPlayer; static int32 &InstantHitsHitByPlayer; @@ -64,24 +64,27 @@ public: static int32(&HighestScores)[TOTAL_HIGHEST_SCORES]; public: + static void Init(void); static void RegisterFastestTime(int32, int32); static void RegisterHighestScore(int32, int32); - static void AnotherKillFrenzyPassed(); - static void AnotherLifeSavedWithAmbulance(); - static void AnotherCriminalCaught(); - static void RegisterLevelAmbulanceMission(int32); - static void AnotherFireExtinguished(); + static void RegisterElBurroTime(int32); static void Register4x4OneTime(int32); static void Register4x4TwoTime(int32); static void Register4x4ThreeTime(int32); static void Register4x4MayhemTime(int32); + static void AnotherLifeSavedWithAmbulance(); + static void AnotherCriminalCaught(); + static void RegisterLevelAmbulanceMission(int32); + static void AnotherFireExtinguished(); + static wchar *FindCriminalRatingString(); static void RegisterLongestFlightInDodo(int32); static void RegisterTimeTakenDefuseMission(int32); + static void AnotherKillFrenzyPassed(); static void SetTotalNumberKillFrenzies(int32); static void SetTotalNumberMissions(int32); - static void CheckPointReachedUnsuccessfully() { KillsSinceLastCheckpoint = 0; }; static void CheckPointReachedSuccessfully() { TotalLegitimateKills += KillsSinceLastCheckpoint; KillsSinceLastCheckpoint = 0; }; - static void RegisterElBurroTime(int32); + static void CheckPointReachedUnsuccessfully() { KillsSinceLastCheckpoint = 0; }; + static int32 FindCriminalRatingNumber(); static void SaveStats(uint8 *buf, uint32 *size); - static void Init(void); + static void LoadStats(uint8 *buf, uint32 size); }; -- cgit v1.2.3