diff options
author | Paul Gilbert | 2017-08-05 18:34:50 -0400 |
---|---|---|
committer | Paul Gilbert | 2017-08-05 18:34:50 -0400 |
commit | 503b9c16d2f52f633988aea986fc8d350f894ead (patch) | |
tree | 46792121ef46a2316365c6cb6c92ec4e3907ab25 /engines/titanic/core | |
parent | 9d2ca34ae4e7ae710e51edb4259006caf211de5b (diff) | |
download | scummvm-rg350-503b9c16d2f52f633988aea986fc8d350f894ead.tar.gz scummvm-rg350-503b9c16d2f52f633988aea986fc8d350f894ead.tar.bz2 scummvm-rg350-503b9c16d2f52f633988aea986fc8d350f894ead.zip |
TITANIC: Don't show invalid meta info for original game saves
Diffstat (limited to 'engines/titanic/core')
-rw-r--r-- | engines/titanic/core/project_item.cpp | 13 | ||||
-rw-r--r-- | engines/titanic/core/project_item.h | 7 |
2 files changed, 20 insertions, 0 deletions
diff --git a/engines/titanic/core/project_item.cpp b/engines/titanic/core/project_item.cpp index b16d076f14..fa902e6ab7 100644 --- a/engines/titanic/core/project_item.cpp +++ b/engines/titanic/core/project_item.cpp @@ -42,6 +42,19 @@ static const char *const SAVEGAME_STR = "TNIC"; EMPTY_MESSAGE_MAP(CProjectItem, CFileItem); +/*------------------------------------------------------------------------*/ + +void TitanicSavegameHeader::clear() { + _version = 0; + _saveName = ""; + _thumbnail = nullptr; + _year = _month = _day = 0; + _hour = _minute = 0; + _totalFrames = 0; +} + +/*------------------------------------------------------------------------*/ + void CFileListItem::save(SimpleFile *file, int indent) { file->writeNumberLine(0, indent); file->writeQuotedLine(_name, indent); diff --git a/engines/titanic/core/project_item.h b/engines/titanic/core/project_item.h index 14ca3fd229..71a84f7e00 100644 --- a/engines/titanic/core/project_item.h +++ b/engines/titanic/core/project_item.h @@ -42,6 +42,13 @@ struct TitanicSavegameHeader { int _year, _month, _day; int _hour, _minute; int _totalFrames; + + TitanicSavegameHeader() { clear(); } + + /** + * Clear the header + */ + void clear(); }; |