diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/Stats.cpp | 3 | ||||
-rw-r--r-- | src/core/Stats.h | 1 | ||||
-rw-r--r-- | src/core/common.h | 8 | ||||
-rw-r--r-- | src/core/re3.cpp | 2 |
4 files changed, 9 insertions, 5 deletions
diff --git a/src/core/Stats.cpp b/src/core/Stats.cpp index 2c27ba70..1d088e04 100644 --- a/src/core/Stats.cpp +++ b/src/core/Stats.cpp @@ -1,6 +1,9 @@ #include "common.h" +#include "patcher.h" #include "Stats.h" +WRAPPER void CStats::SaveStats(uint8 *buf, uint32 *size) { EAXJMP(0x4ab3e0); } + int32 &CStats::DaysPassed = *(int32*)0x8F2BB8; int32 &CStats::HeadsPopped = *(int32*)0x8F647C; bool& CStats::CommercialPassed = *(bool*)0x8F4334; diff --git a/src/core/Stats.h b/src/core/Stats.h index 4b558c32..7ee4aed0 100644 --- a/src/core/Stats.h +++ b/src/core/Stats.h @@ -73,4 +73,5 @@ public: static void CheckPointReachedUnsuccessfully() { KillsSinceLastCheckpoint = 0; }; static void CheckPointReachedSuccessfully() { TotalLegitimateKills += KillsSinceLastCheckpoint; KillsSinceLastCheckpoint = 0; }; static void RegisterElBurroTime(int32); + static void SaveStats(uint8 *buf, uint32 *size); };
\ No newline at end of file diff --git a/src/core/common.h b/src/core/common.h index cadcac1d..9a5cdb38 100644 --- a/src/core/common.h +++ b/src/core/common.h @@ -321,9 +321,9 @@ _TWEEKCLASS(CTweakFloat, float); #undef _TWEEKCLASS #ifdef VALIDATE_SAVE_SIZE -extern int32 _bufBytesRead; -#define INITSAVEBUF _bufBytesRead = 0; -#define VALIDATESAVEBUF(b) assert(_bufBytesRead == b); +extern int32 _saveBufCount; +#define INITSAVEBUF _saveBufCount = 0; +#define VALIDATESAVEBUF(b) assert(_saveBufCount == b); #else #define INITSAVEBUF #define VALIDATESAVEBUF(b) @@ -333,7 +333,7 @@ inline void SkipSaveBuf(uint8 *&buf, int32 skip) { buf += skip; #ifdef VALIDATE_SAVE_SIZE - _bufBytesRead += skip; + _saveBufCount += skip; #endif } diff --git a/src/core/re3.cpp b/src/core/re3.cpp index 989a05b5..ed32632f 100644 --- a/src/core/re3.cpp +++ b/src/core/re3.cpp @@ -449,7 +449,7 @@ void re3_trace(const char *filename, unsigned int lineno, const char *func, cons } #ifdef VALIDATE_SAVE_SIZE -int32 _bufBytesRead; +int32 _saveBufCount; #endif void |