aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/detection.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2008-09-16 14:56:02 +0000
committerJohannes Schickel2008-09-16 14:56:02 +0000
commit3739662b75dbd04715731071e3b89d1d06a50a8e (patch)
treee956544a64820b95556cd2e58c230f4f7751b986 /engines/scumm/detection.cpp
parent2e9e661d5feaec6d1cb1b61d40cbce4165122edd (diff)
downloadscummvm-rg350-3739662b75dbd04715731071e3b89d1d06a50a8e.tar.gz
scummvm-rg350-3739662b75dbd04715731071e3b89d1d06a50a8e.tar.bz2
scummvm-rg350-3739662b75dbd04715731071e3b89d1d06a50a8e.zip
Added support for SCUMM savestates date/time and playtime info in the launcher load dialog.
svn-id: r34583
Diffstat (limited to 'engines/scumm/detection.cpp')
-rw-r--r--engines/scumm/detection.cpp25
1 files changed, 24 insertions, 1 deletions
diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp
index 34775ab575..d3397fe208 100644
--- a/engines/scumm/detection.cpp
+++ b/engines/scumm/detection.cpp
@@ -693,7 +693,9 @@ bool ScummMetaEngine::hasFeature(MetaEngineFeature f) const {
(f == kSupportsDirectLoad) ||
(f == kSupportsDeleteSave) ||
(f == kSupportsMetaInfos) ||
- (f == kSupportsThumbnails);
+ (f == kSupportsThumbnails) ||
+ (f == kSupportsSaveDate) ||
+ (f == kSupportsSavePlayTime);
}
GameList ScummMetaEngine::getSupportedGames() const {
@@ -1002,6 +1004,27 @@ SaveStateDescriptor ScummMetaEngine::querySaveMetaInfos(const char *target, int
desc.setDeletableFlag(true);
desc.setThumbnail(thumbnail);
+ InfoStuff infos;
+ memset(&infos, 0, sizeof(infos));
+ if (ScummEngine::loadInfosFromSlot(target, slot, &infos)) {
+ int day = (infos.date >> 24) & 0xFF;
+ int month = (infos.date >> 16) & 0xFF;
+ int year = infos.date & 0xFFFF;
+
+ desc.setSaveDate(year, month, day);
+
+ int hour = (infos.time >> 8) & 0xFF;
+ int minutes = infos.time & 0xFF;
+
+ desc.setSaveTime(hour, minutes);
+
+ minutes = infos.playtime / 60;
+ hour = minutes / 60;
+ minutes %= 60;
+
+ desc.setPlayTime(hour, minutes);
+ }
+
return desc;
}