diff options
author | Paul Gilbert | 2012-02-12 12:34:51 +1100 |
---|---|---|
committer | Strangerke | 2012-04-06 08:20:55 +0200 |
commit | bae25fc2aab4fe0438b59dba4ac507ce6462a0e1 (patch) | |
tree | 796ef3c5a39563b2f1494efab9c7389d917a0c8e /engines/mortevielle/saveload.h | |
parent | 80302552e830c043f16b1860573ee8cc47232385 (diff) | |
download | scummvm-rg350-bae25fc2aab4fe0438b59dba4ac507ce6462a0e1.tar.gz scummvm-rg350-bae25fc2aab4fe0438b59dba4ac507ce6462a0e1.tar.bz2 scummvm-rg350-bae25fc2aab4fe0438b59dba4ac507ce6462a0e1.zip |
MORTEVIELLE: Implemented ScummVM savegame functionality with metadata
Diffstat (limited to 'engines/mortevielle/saveload.h')
-rw-r--r-- | engines/mortevielle/saveload.h | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/engines/mortevielle/saveload.h b/engines/mortevielle/saveload.h new file mode 100644 index 0000000000..7f2edd8b53 --- /dev/null +++ b/engines/mortevielle/saveload.h @@ -0,0 +1,66 @@ +/* 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. + * + * 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. + + * 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. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +/* + * This code is based on original Mortville Manor DOS source code + * Copyright (c) 1988-1989 Lankhor + */ + +#ifndef MORTEVIELLE_SAVELOAD_H +#define MORTEVIELLE_SAVELOAD_H + +#include "common/savefile.h" +#include "common/serializer.h" +#include "graphics/palette.h" +#include "graphics/scaler.h" +#include "graphics/thumbnail.h" + +#define SAVEGAME_VERSION 1 + +namespace Mortevielle { + +struct SavegameHeader { + uint8 version; + Common::String saveName; + Graphics::Surface *thumbnail; + int saveYear, saveMonth, saveDay; + int saveHour, saveMinutes; + int totalFrames; +}; + +class SavegameManager { +private: + void sync_save(Common::Serializer &sz); +public: + void takesav(int n); + Common::Error loadGame(int n); + Common::Error saveGame(int n, const Common::String &saveName); + + static void writeSavegameHeader(Common::OutSaveFile *out, const Common::String &saveName); + static bool readSavegameHeader(Common::InSaveFile *in, SavegameHeader &header); + static Common::String generateSaveName(int slotNumber); + static SaveStateList listSaves(const char *target); + static SaveStateDescriptor querySaveMetaInfos(int slot); +}; + +} // End of namespace Mortevielle +#endif |