Permalink
Browse files

WINTERMUTE: Add getter for _savedTimestamp & use it

  • Loading branch information...
lolbot-iichan committed Aug 28, 2018
1 parent b32cff2 commit b6acee52e46d3e7a31bcece69e89055c060d0493
Showing with 3 additions and 3 deletions.
  1. +2 −1 engines/wintermute/base/base_persistence_manager.h
  2. +1 −2 engines/wintermute/base/saveload.cpp
@@ -45,7 +45,6 @@ class BaseGame;
class BasePersistenceManager {
public:
char *_savedDescription;
TimeDate _savedTimestamp;
Common::String _savePrefix;
Common::String _savedName;
bool saveFile(const Common::String &filename);
@@ -70,6 +69,7 @@ class BasePersistenceManager {
uint32 _offset;

bool getIsSaving() { return _saving; }
TimeDate getSavedTimestamp() { return _savedTimestamp; }

uint32 _richBufferSize;
byte *_richBuffer;
@@ -103,6 +103,7 @@ class BasePersistenceManager {
bool putTimeDate(const TimeDate &t);
Common::WriteStream *_saveStream;
Common::SeekableReadStream *_loadStream;
TimeDate _savedTimestamp;
uint32 _savedPlayTime;
byte _savedVerMajor;
byte _savedVerMinor;
@@ -188,8 +188,7 @@ void SaveLoad::getSaveSlotTimestamp(int slot, TimeDate *time) {
BasePersistenceManager *pm = new BasePersistenceManager();
if (pm) {
if ((pm->initLoad(filename))) {
const TimeDate *timestamp = &(pm->_savedTimestamp);
memcpy(time, timestamp, sizeof(TimeDate));
*time = pm->getSavedTimestamp();
}
delete pm;
}

0 comments on commit b6acee5

Please sign in to comment.