aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorMax Horn2009-10-08 19:41:38 +0000
committerMax Horn2009-10-08 19:41:38 +0000
commit42120ed626c0d18bc1e1738678dbd1fa96481f04 (patch)
tree90715ea5e5bb3f3f24547f484b2355194b9cd93c /engines/scumm
parentf5ccaf7e29183d6e51456d5994eccfd35ff9a117 (diff)
downloadscummvm-rg350-42120ed626c0d18bc1e1738678dbd1fa96481f04.tar.gz
scummvm-rg350-42120ed626c0d18bc1e1738678dbd1fa96481f04.tar.bz2
scummvm-rg350-42120ed626c0d18bc1e1738678dbd1fa96481f04.zip
Introduce a new struct TimeDate, replacing struct tm in client code. May lead to compilation issues in ports, which should be trivial to fix, though
svn-id: r44793
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/saveload.cpp6
-rw-r--r--engines/scumm/script_v6.cpp4
2 files changed, 3 insertions, 7 deletions
diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp
index 9dad8cd054..db56c44daf 100644
--- a/engines/scumm/saveload.cpp
+++ b/engines/scumm/saveload.cpp
@@ -23,8 +23,6 @@
*
*/
-#include <time.h> // for ScummEngine::saveInfos / ScummEngine::loadInfos
-
#include "common/config-manager.h"
#include "common/savefile.h"
#include "common/system.h"
@@ -779,10 +777,10 @@ void ScummEngine::saveInfos(Common::WriteStream* file) {
section.size = SaveInfoSectionSize;
// still save old format for older versions
- section.timeTValue = time(0);
+ section.timeTValue = 0;
section.playtime = _system->getMillis() / 1000 - _engineStartTime;
- tm curTime;
+ TimeDate curTime;
_system->getTimeAndDate(curTime);
section.date = ((curTime.tm_mday & 0xFF) << 24) | (((curTime.tm_mon + 1) & 0xFF) << 16) | ((curTime.tm_year + 1900) & 0xFFFF);
diff --git a/engines/scumm/script_v6.cpp b/engines/scumm/script_v6.cpp
index 6df3c0c494..435cbf50c7 100644
--- a/engines/scumm/script_v6.cpp
+++ b/engines/scumm/script_v6.cpp
@@ -23,8 +23,6 @@
*
*/
-#include <time.h> // for ScummEngine_v6::o6_getDateTime()
-
#include "common/config-manager.h"
#include "common/system.h"
@@ -2940,7 +2938,7 @@ void ScummEngine_v6::o6_pickVarRandom() {
}
void ScummEngine_v6::o6_getDateTime() {
- struct tm t;
+ TimeDate t;
_system->getTimeAndDate(t);
VAR(VAR_TIMEDATE_YEAR) = t.tm_year;