2010-07-31 06:23:38 +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.
|
|
|
|
*
|
|
|
|
* 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:25 +01:00
|
|
|
*
|
2010-07-31 06:23:38 +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:25 +01:00
|
|
|
*
|
2010-07-31 06:23:38 +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
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*
|
|
|
|
*/
|
2010-07-29 19:53:02 +00:00
|
|
|
|
2010-08-06 13:13:25 +00:00
|
|
|
/*
|
2010-07-31 09:53:02 +00:00
|
|
|
* This code is based on Broken Sword 2.5 engine
|
|
|
|
*
|
|
|
|
* Copyright (c) Malte Thiesen, Daniel Queteschiner and Michael Elsdoerfer
|
|
|
|
*
|
|
|
|
* Licensed under GNU GPL v2
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2010-08-06 13:13:25 +00:00
|
|
|
#ifndef SWORD25_PERSISTENCESERVICE_H
|
2010-07-30 09:02:39 +00:00
|
|
|
#define SWORD25_PERSISTENCESERVICE_H
|
2010-07-29 19:53:02 +00:00
|
|
|
|
2010-07-30 09:02:39 +00:00
|
|
|
#include "sword25/kernel/common.h"
|
2010-07-31 06:23:38 +00:00
|
|
|
|
|
|
|
namespace Sword25 {
|
2010-07-29 19:53:02 +00:00
|
|
|
|
2010-08-18 12:58:22 +00:00
|
|
|
class PersistenceService {
|
2010-07-29 19:53:02 +00:00
|
|
|
public:
|
2010-08-18 12:58:22 +00:00
|
|
|
PersistenceService();
|
|
|
|
virtual ~PersistenceService();
|
2010-07-29 19:53:02 +00:00
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
2010-07-31 06:23:38 +00:00
|
|
|
// Singleton Method
|
2010-07-29 19:53:02 +00:00
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
2010-10-19 21:03:33 +00:00
|
|
|
static PersistenceService &getInstance();
|
2010-07-29 19:53:02 +00:00
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
// Interface
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
2010-10-19 21:03:33 +00:00
|
|
|
static uint getSlotCount();
|
|
|
|
static Common::String getSavegameDirectory();
|
2010-07-29 19:53:02 +00:00
|
|
|
|
2010-10-19 21:03:33 +00:00
|
|
|
void reloadSlots();
|
|
|
|
bool isSlotOccupied(uint slotID);
|
|
|
|
bool isSavegameCompatible(uint slotID);
|
2011-06-28 22:55:14 +03:00
|
|
|
int getSavegameVersion(uint slotID);
|
2010-10-19 21:03:33 +00:00
|
|
|
Common::String &getSavegameDescription(uint slotID);
|
|
|
|
Common::String &getSavegameFilename(uint slotID);
|
2010-08-06 13:13:25 +00:00
|
|
|
|
2010-10-19 21:03:33 +00:00
|
|
|
bool saveGame(uint slotID, const Common::String &screenshotFilename);
|
|
|
|
bool loadGame(uint slotID);
|
2010-07-29 19:53:02 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
struct Impl;
|
2010-10-19 21:03:33 +00:00
|
|
|
Impl *_impl;
|
2010-07-29 19:53:02 +00:00
|
|
|
};
|
|
|
|
|
2010-10-28 09:51:56 +00:00
|
|
|
void setGameTarget(const char *target);
|
|
|
|
|
2010-07-31 06:23:38 +00:00
|
|
|
} // End of namespace Sword25
|
|
|
|
|
2010-07-29 19:53:02 +00:00
|
|
|
#endif
|