From 888f35fe5edb2c9de74651f2ba4be1975470bd0f Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Wed, 11 Dec 2013 22:57:51 -0500 Subject: VOYEUR: Implemented the saveLastInplay method --- engines/voyeur/utils.cpp | 6 +++--- engines/voyeur/voyeur.cpp | 6 +++++- engines/voyeur/voyeur.h | 4 ++++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/engines/voyeur/utils.cpp b/engines/voyeur/utils.cpp index 5c861389d9..74470dc6c7 100644 --- a/engines/voyeur/utils.cpp +++ b/engines/voyeur/utils.cpp @@ -30,7 +30,7 @@ LockTime::LockTime() { } void LockClass::getSysDate() { - + // May not be needed for ScummVM } void LockClass::getThePassword() { @@ -41,11 +41,11 @@ void LockClass::getThePassword() { fieldC = -1; // TODO: Original loaded 'VOYEUR.DAT' here to get most recent game's password. - // We'll want to transform this to proper savegames in ScummVM + // but since we allow seperate savegames in ScummVM, this is somewhat deprecated. } void LockClass::saveThePassword() { - //TODO + // May not be needed for ScummVM } Common::String LockClass::getDateString() { diff --git a/engines/voyeur/voyeur.cpp b/engines/voyeur/voyeur.cpp index 9d5c6a34e1..3b924fe759 100644 --- a/engines/voyeur/voyeur.cpp +++ b/engines/voyeur/voyeur.cpp @@ -595,7 +595,11 @@ void VoyeurEngine::playAVideo(int id) { } void VoyeurEngine::saveLastInplay() { - error("TODO: saveLastInplay"); + LockClass lock; + lock.getThePassword(); + lock.fieldC = _voy._field4380; + lock.getSysDate(); + lock.saveThePassword(); } } // End of namespace Voyeur diff --git a/engines/voyeur/voyeur.h b/engines/voyeur/voyeur.h index 675200ee33..248d150022 100644 --- a/engines/voyeur/voyeur.h +++ b/engines/voyeur/voyeur.h @@ -137,6 +137,10 @@ public: void playRL2Video(const Common::String &filename); void doTransitionCard(const Common::String &time, const Common::String &location); void playAVideo(int id); + + /** + * Saves the last time the game was played + */ void saveLastInplay(); void loadTheApt(); void freeTheApt(); -- cgit v1.2.3