aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2013-12-11 22:57:51 -0500
committerPaul Gilbert2013-12-11 22:57:51 -0500
commit888f35fe5edb2c9de74651f2ba4be1975470bd0f (patch)
tree90e729f70f3c811f05166c7aa5328d9df9421950
parentae7bb13f20889c402b55f7d9ef55223b3437da06 (diff)
downloadscummvm-rg350-888f35fe5edb2c9de74651f2ba4be1975470bd0f.tar.gz
scummvm-rg350-888f35fe5edb2c9de74651f2ba4be1975470bd0f.tar.bz2
scummvm-rg350-888f35fe5edb2c9de74651f2ba4be1975470bd0f.zip
VOYEUR: Implemented the saveLastInplay method
-rw-r--r--engines/voyeur/utils.cpp6
-rw-r--r--engines/voyeur/voyeur.cpp6
-rw-r--r--engines/voyeur/voyeur.h4
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();