mirror of
https://github.com/halpz/re3.git
synced 2025-07-04 14:40:45 +00:00
GenericSave complete, still needs some testing
This commit is contained in:
@ -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;
|
||||
|
@ -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);
|
||||
};
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user