2007-05-30 21:56:52 +00:00
|
|
|
/* ScummVM - Graphic Adventure Engine
|
|
|
|
*
|
|
|
|
* ScummVM is the legal property of its developers, whose names
|
|
|
|
* are too numerous to list here. Please refer to the COPYRIGHT
|
|
|
|
* file distributed with this source distribution.
|
2002-07-02 20:57:27 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
2014-02-18 02:34:24 +01:00
|
|
|
*
|
2002-07-02 20:57:27 +00:00
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
2014-02-18 02:34:24 +01:00
|
|
|
*
|
2002-07-02 20:57:27 +00:00
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
2005-10-18 01:30:26 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2002-07-02 20:57:27 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2007-02-19 17:48:19 +00:00
|
|
|
#ifndef SCUMM_SAVELOAD_H
|
|
|
|
#define SCUMM_SAVELOAD_H
|
2002-07-02 20:57:27 +00:00
|
|
|
|
2003-08-01 12:21:04 +00:00
|
|
|
#include "common/scummsys.h"
|
2017-11-29 00:06:12 -06:00
|
|
|
#include "common/serializer.h"
|
2003-10-03 18:33:57 +00:00
|
|
|
|
|
|
|
namespace Scumm {
|
|
|
|
|
2005-04-26 11:10:27 +00:00
|
|
|
/**
|
|
|
|
* The current savegame format version.
|
2005-07-30 21:11:48 +00:00
|
|
|
* Our save/load system uses an elaborate scheme to allow us to modify the
|
2005-04-26 11:10:27 +00:00
|
|
|
* savegame while keeping full backward compatibility, in the sense that newer
|
|
|
|
* ScummVM versions always are able to load old savegames.
|
|
|
|
* In order to achieve that, we store a version in the savegame files, and whenever
|
|
|
|
* the savegame layout is modified, the version is incremented.
|
|
|
|
*
|
|
|
|
* This roughly works by marking each savegame entry with a range of versions
|
|
|
|
* for which it is valid; the save/load code iterates over all entries, but
|
|
|
|
* only saves/loads those which are valid for the version of the savegame
|
|
|
|
* which is being loaded/saved currently.
|
|
|
|
*/
|
2016-07-16 17:18:11 +10:00
|
|
|
#define CURRENT_VER 98
|
2002-12-08 16:14:29 +00:00
|
|
|
|
2005-04-26 11:10:27 +00:00
|
|
|
/**
|
|
|
|
* An auxillary macro, used to specify savegame versions. We use this instead
|
|
|
|
* of just writing the raw version, because this way they stand out more to
|
|
|
|
* the reading eye, making it a bit easier to navigate through the code.
|
|
|
|
*/
|
2017-11-29 00:06:12 -06:00
|
|
|
#define VER(x) Common::Serializer::Version(x)
|
2005-10-21 23:01:13 +00:00
|
|
|
|
2003-10-03 18:33:57 +00:00
|
|
|
} // End of namespace Scumm
|
|
|
|
|
2002-07-02 20:57:27 +00:00
|
|
|
#endif
|