aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorMax Horn2007-03-08 21:08:23 +0000
committerMax Horn2007-03-08 21:08:23 +0000
commitc09f86fb6a5d2083824b651e132f25163a6bc7e3 (patch)
treea015df181469707c02df682b97ee4361853a01f7 /engines/scumm
parent783a6d7d59f8a96e21d7bed2c5111969a366f1da (diff)
downloadscummvm-rg350-c09f86fb6a5d2083824b651e132f25163a6bc7e3.tar.gz
scummvm-rg350-c09f86fb6a5d2083824b651e132f25163a6bc7e3.tar.bz2
scummvm-rg350-c09f86fb6a5d2083824b651e132f25163a6bc7e3.zip
Clarified some comments
svn-id: r26028
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/saveload.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp
index d123e7bae5..959a892380 100644
--- a/engines/scumm/saveload.cpp
+++ b/engines/scumm/saveload.cpp
@@ -511,7 +511,8 @@ bool ScummEngine::loadInfos(Common::InSaveFile *file, InfoStuff *stuff) {
section.version = file->readUint32BE();
section.size = file->readUint32BE();
- // if we extend this we should add a table for the special sizes at the versions to check it
+ // If we ever extend this we should add a table containing the sizes corresponding to each
+ // version, so that we are able to properly verify their correctness.
if (section.version == INFOSECTION_VERSION && section.size != SaveInfoSectionSize) {
warning("Info section is corrupt");
file->skip(section.size);
@@ -521,11 +522,10 @@ bool ScummEngine::loadInfos(Common::InSaveFile *file, InfoStuff *stuff) {
section.timeTValue = file->readUint32BE();
section.playtime = file->readUint32BE();
- // for compatibility for older version we
- // to load in with our old method
+ // For header version 1, we load the data in with our old method
if (section.version == 1) {
- time_t curTime_ = section.timeTValue;
- tm *curTime = localtime(&curTime_);
+ time_t tmp = section.timeTValue;
+ tm *curTime = localtime(&tmp);
stuff->date = (curTime->tm_mday & 0xFF) << 24 | ((curTime->tm_mon + 1) & 0xFF) << 16 | (curTime->tm_year + 1900) & 0xFFFF;
stuff->time = (curTime->tm_hour & 0xFF) << 8 | (curTime->tm_min) & 0xFF;
}
@@ -540,8 +540,7 @@ bool ScummEngine::loadInfos(Common::InSaveFile *file, InfoStuff *stuff) {
stuff->playtime = section.playtime;
- // skip all newer features, this could make problems if some older version uses more space for
- // saving informations, but this should NOT happen
+ // Skip over the remaining (unsupported) data
if (section.size > SaveInfoSectionSize) {
file->skip(section.size - SaveInfoSectionSize);
}