From 42120ed626c0d18bc1e1738678dbd1fa96481f04 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 8 Oct 2009 19:41:38 +0000 Subject: 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 --- engines/scumm/saveload.cpp | 6 ++---- engines/scumm/script_v6.cpp | 4 +--- 2 files changed, 3 insertions(+), 7 deletions(-) (limited to 'engines/scumm') 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 // 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 // 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; -- cgit v1.2.3