2007-05-30 21:56:52 +00:00
|
|
|
/* ScummVM - Graphic Adventure Engine
|
2004-04-12 21:40:49 +00:00
|
|
|
*
|
2007-05-30 21:56:52 +00:00
|
|
|
* 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.
|
2004-04-12 21:40:49 +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 01:34:24 +00:00
|
|
|
*
|
2004-04-12 21:40:49 +00:00
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2008-01-05 12:45:14 +00:00
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
2004-04-12 21:40:49 +00:00
|
|
|
* GNU General Public License for more details.
|
2014-02-18 01:34:24 +00:00
|
|
|
*
|
2004-04-12 21:40:49 +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.
|
2004-04-12 21:40:49 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2004-05-01 09:07:31 +00:00
|
|
|
// Game detection, general game parameters
|
2004-04-12 21:40:49 +00:00
|
|
|
|
2004-08-02 16:20:35 +00:00
|
|
|
#include "saga/saga.h"
|
2004-12-22 19:34:41 +00:00
|
|
|
|
2008-02-02 00:54:52 +00:00
|
|
|
#include "base/plugins.h"
|
|
|
|
|
2005-10-14 04:28:20 +00:00
|
|
|
#include "common/config-manager.h"
|
2009-01-29 22:13:01 +00:00
|
|
|
#include "engines/advancedDetector.h"
|
2011-06-14 13:25:33 +00:00
|
|
|
#include "engines/obsolete.h"
|
2008-10-06 12:48:52 +00:00
|
|
|
#include "common/system.h"
|
2008-11-10 14:11:30 +00:00
|
|
|
#include "graphics/thumbnail.h"
|
2004-04-12 21:40:49 +00:00
|
|
|
|
2008-11-03 18:32:16 +00:00
|
|
|
#include "saga/animation.h"
|
2007-04-27 23:11:12 +00:00
|
|
|
#include "saga/displayinfo.h"
|
2008-11-03 18:32:16 +00:00
|
|
|
#include "saga/events.h"
|
2008-12-22 14:13:15 +00:00
|
|
|
#include "saga/resource.h"
|
2004-08-06 01:39:17 +00:00
|
|
|
#include "saga/interface.h"
|
2004-08-11 23:42:02 +00:00
|
|
|
#include "saga/scene.h"
|
2004-04-12 21:40:49 +00:00
|
|
|
|
2006-03-09 14:33:07 +00:00
|
|
|
namespace Saga {
|
2007-01-21 20:24:38 +00:00
|
|
|
struct SAGAGameDescription {
|
2009-01-29 22:13:01 +00:00
|
|
|
ADGameDescription desc;
|
2007-01-21 20:24:38 +00:00
|
|
|
|
|
|
|
int gameId;
|
|
|
|
uint32 features;
|
|
|
|
int startSceneNumber;
|
|
|
|
const GameResourceDescription *resourceDescription;
|
|
|
|
int fontsCount;
|
|
|
|
const GameFontDescription *fontDescriptions;
|
|
|
|
const GamePatchDescription *patchDescriptions;
|
|
|
|
};
|
|
|
|
|
2008-12-29 17:30:29 +00:00
|
|
|
bool SagaEngine::isBigEndian() const { return isMacResources() && getGameId() == GID_ITE; }
|
2008-06-04 17:20:25 +00:00
|
|
|
bool SagaEngine::isMacResources() const { return (getPlatform() == Common::kPlatformMacintosh); }
|
2010-10-23 15:45:22 +00:00
|
|
|
const GameResourceDescription *SagaEngine::getResourceDescription() const { return _gameDescription->resourceDescription; }
|
2007-01-21 20:24:38 +00:00
|
|
|
|
2010-10-23 15:45:22 +00:00
|
|
|
const GameFontDescription *SagaEngine::getFontDescription(int index) const {
|
2007-01-21 20:24:38 +00:00
|
|
|
assert(index < _gameDescription->fontsCount);
|
|
|
|
return &_gameDescription->fontDescriptions[index];
|
|
|
|
}
|
|
|
|
int SagaEngine::getFontsCount() const { return _gameDescription->fontsCount; }
|
|
|
|
|
|
|
|
int SagaEngine::getGameId() const { return _gameDescription->gameId; }
|
2007-07-13 16:37:37 +00:00
|
|
|
|
|
|
|
uint32 SagaEngine::getFeatures() const {
|
|
|
|
uint32 result = _gameDescription->features;
|
|
|
|
|
2008-01-27 19:47:41 +00:00
|
|
|
return result;
|
2007-07-13 16:37:37 +00:00
|
|
|
}
|
|
|
|
|
2007-01-21 20:24:38 +00:00
|
|
|
Common::Language SagaEngine::getLanguage() const { return _gameDescription->desc.language; }
|
|
|
|
Common::Platform SagaEngine::getPlatform() const { return _gameDescription->desc.platform; }
|
|
|
|
int SagaEngine::getGameNumber() const { return _gameNumber; }
|
|
|
|
int SagaEngine::getStartSceneNumber() const { return _gameDescription->startSceneNumber; }
|
|
|
|
|
|
|
|
const GamePatchDescription *SagaEngine::getPatchDescriptions() const { return _gameDescription->patchDescriptions; }
|
2009-01-29 22:13:01 +00:00
|
|
|
const ADGameFileDescription *SagaEngine::getFilesDescriptions() const { return _gameDescription->desc.filesDescriptions; }
|
2007-01-21 20:24:38 +00:00
|
|
|
|
2006-03-09 14:33:07 +00:00
|
|
|
}
|
|
|
|
|
2007-01-24 23:13:00 +00:00
|
|
|
static const PlainGameDescriptor sagaGames[] = {
|
2007-01-29 23:25:51 +00:00
|
|
|
{"saga", "SAGA Engine game"},
|
2006-03-09 14:33:07 +00:00
|
|
|
{"ite", "Inherit the Earth: Quest for the Orb"},
|
|
|
|
{"ihnm", "I Have No Mouth and I Must Scream"},
|
2008-12-21 22:52:44 +00:00
|
|
|
{"dino", "Dinotopia"},
|
|
|
|
{"fta2", "Faery Tale Adventure II: Halls of the Dead"},
|
2006-03-09 14:33:07 +00:00
|
|
|
{0, 0}
|
|
|
|
};
|
|
|
|
|
2011-06-14 13:25:33 +00:00
|
|
|
static const Engines::ObsoleteGameID obsoleteGameIDsTable[] = {
|
2007-01-29 23:25:51 +00:00
|
|
|
{"ite", "saga", Common::kPlatformUnknown},
|
|
|
|
{"ihnm", "saga", Common::kPlatformUnknown},
|
2008-12-21 22:52:44 +00:00
|
|
|
{"dino", "saga", Common::kPlatformUnknown},
|
|
|
|
{"fta2", "saga", Common::kPlatformUnknown},
|
2007-01-29 23:25:51 +00:00
|
|
|
{0, 0, Common::kPlatformUnknown}
|
|
|
|
};
|
|
|
|
|
2007-04-27 22:39:31 +00:00
|
|
|
#include "saga/detection_tables.h"
|
2006-08-26 11:33:15 +00:00
|
|
|
|
2009-01-29 22:13:01 +00:00
|
|
|
class SagaMetaEngine : public AdvancedMetaEngine {
|
2008-02-02 02:35:13 +00:00
|
|
|
public:
|
2011-06-10 13:53:55 +00:00
|
|
|
SagaMetaEngine() : AdvancedMetaEngine(Saga::gameDescriptions, sizeof(Saga::SAGAGameDescription), sagaGames) {
|
2011-06-11 15:52:32 +00:00
|
|
|
_singleid = "saga";
|
2011-06-10 13:53:55 +00:00
|
|
|
}
|
2008-02-02 02:35:13 +00:00
|
|
|
|
2011-06-14 13:25:33 +00:00
|
|
|
virtual GameDescriptor findGame(const char *gameid) const {
|
|
|
|
return Engines::findGameID(gameid, _gameids, obsoleteGameIDsTable);
|
|
|
|
}
|
|
|
|
|
2008-02-02 02:35:13 +00:00
|
|
|
virtual const char *getName() const {
|
2011-05-15 14:50:09 +00:00
|
|
|
return "SAGA ["
|
2009-01-02 18:20:15 +00:00
|
|
|
|
|
|
|
#if defined(ENABLE_IHNM) && defined(ENABLE_SAGA2)
|
|
|
|
"all games"
|
|
|
|
#else
|
|
|
|
"ITE"
|
|
|
|
|
|
|
|
#if defined(ENABLE_IHNM)
|
|
|
|
", IHNM"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(ENABLE_SAGA2)
|
|
|
|
", SAGA2 games"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|
|
|
|
"]";
|
|
|
|
|
|
|
|
;
|
2008-02-02 02:35:13 +00:00
|
|
|
}
|
|
|
|
|
2009-03-05 12:04:58 +00:00
|
|
|
virtual const char *getOriginalCopyright() const {
|
2008-02-02 02:35:13 +00:00
|
|
|
return "Inherit the Earth (C) Wyrmkeep Entertainment";
|
|
|
|
}
|
|
|
|
|
2008-08-15 18:15:14 +00:00
|
|
|
virtual bool hasFeature(MetaEngineFeature f) const;
|
2011-06-14 13:25:33 +00:00
|
|
|
|
|
|
|
virtual Common::Error createInstance(OSystem *syst, Engine **engine) const {
|
|
|
|
Engines::upgradeTargetIfNecessary(obsoleteGameIDsTable);
|
|
|
|
return AdvancedMetaEngine::createInstance(syst, engine);
|
|
|
|
}
|
2009-01-29 22:13:01 +00:00
|
|
|
virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const;
|
2011-06-14 13:25:33 +00:00
|
|
|
|
2008-07-29 02:12:07 +00:00
|
|
|
virtual SaveStateList listSaves(const char *target) const;
|
2008-11-09 16:13:34 +00:00
|
|
|
virtual int getMaximumSaveSlot() const;
|
2008-09-11 19:47:45 +00:00
|
|
|
virtual void removeSaveState(const char *target, int slot) const;
|
2008-11-10 14:11:30 +00:00
|
|
|
SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const;
|
2008-02-02 02:35:13 +00:00
|
|
|
};
|
|
|
|
|
2008-08-15 18:15:14 +00:00
|
|
|
bool SagaMetaEngine::hasFeature(MetaEngineFeature f) const {
|
|
|
|
return
|
|
|
|
(f == kSupportsListSaves) ||
|
2008-10-26 16:42:08 +00:00
|
|
|
(f == kSupportsLoadingDuringStartup) ||
|
2008-11-10 14:11:30 +00:00
|
|
|
(f == kSupportsDeleteSave) ||
|
|
|
|
(f == kSavesSupportMetaInfo) ||
|
|
|
|
(f == kSavesSupportThumbnail) ||
|
2012-11-11 21:32:07 +00:00
|
|
|
(f == kSavesSupportCreationDate) ||
|
|
|
|
(f == kSavesSupportPlayTime);
|
2008-11-04 16:11:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool Saga::SagaEngine::hasFeature(EngineFeature f) const {
|
|
|
|
return
|
|
|
|
(f == kSupportsRTL) ||
|
2008-11-03 18:32:16 +00:00
|
|
|
(f == kSupportsLoadingDuringRuntime) ||
|
|
|
|
(f == kSupportsSavingDuringRuntime);
|
2008-08-15 18:15:14 +00:00
|
|
|
}
|
|
|
|
|
2009-01-29 22:13:01 +00:00
|
|
|
bool SagaMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
2008-03-14 17:31:04 +00:00
|
|
|
const Saga::SAGAGameDescription *gd = (const Saga::SAGAGameDescription *)desc;
|
2007-11-03 21:06:58 +00:00
|
|
|
if (gd) {
|
|
|
|
*engine = new Saga::SagaEngine(syst, gd);
|
|
|
|
}
|
|
|
|
return gd != 0;
|
|
|
|
}
|
|
|
|
|
2008-07-29 02:12:07 +00:00
|
|
|
SaveStateList SagaMetaEngine::listSaves(const char *target) const {
|
|
|
|
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
2010-03-18 15:54:40 +00:00
|
|
|
Common::StringArray filenames;
|
2008-07-29 02:12:07 +00:00
|
|
|
char saveDesc[SAVE_TITLE_SIZE];
|
|
|
|
Common::String pattern = target;
|
|
|
|
pattern += ".s??";
|
|
|
|
|
2009-05-29 14:38:22 +00:00
|
|
|
filenames = saveFileMan->listSavefiles(pattern);
|
2008-07-29 02:12:07 +00:00
|
|
|
sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..)
|
|
|
|
|
|
|
|
SaveStateList saveList;
|
2008-11-07 19:43:01 +00:00
|
|
|
int slotNum = 0;
|
2010-03-18 15:54:40 +00:00
|
|
|
for (Common::StringArray::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
|
2008-07-29 02:12:07 +00:00
|
|
|
// Obtain the last 2 digits of the filename, since they correspond to the save slot
|
2008-11-07 19:43:01 +00:00
|
|
|
slotNum = atoi(file->c_str() + file->size() - 2);
|
2009-01-01 15:06:43 +00:00
|
|
|
|
2009-07-27 17:48:40 +00:00
|
|
|
if (slotNum >= 0 && slotNum < MAX_SAVES) {
|
2009-05-29 14:38:22 +00:00
|
|
|
Common::InSaveFile *in = saveFileMan->openForLoading(*file);
|
2008-07-29 02:12:07 +00:00
|
|
|
if (in) {
|
|
|
|
for (int i = 0; i < 3; i++)
|
|
|
|
in->readUint32BE();
|
|
|
|
in->read(saveDesc, SAVE_TITLE_SIZE);
|
2008-11-05 15:41:12 +00:00
|
|
|
saveList.push_back(SaveStateDescriptor(slotNum, saveDesc));
|
2008-07-29 02:12:07 +00:00
|
|
|
delete in;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return saveList;
|
|
|
|
}
|
|
|
|
|
2009-07-27 17:48:40 +00:00
|
|
|
int SagaMetaEngine::getMaximumSaveSlot() const { return MAX_SAVES - 1; }
|
2008-11-09 16:13:34 +00:00
|
|
|
|
2008-09-11 19:47:45 +00:00
|
|
|
void SagaMetaEngine::removeSaveState(const char *target, int slot) const {
|
|
|
|
Common::String filename = target;
|
2011-10-29 09:23:44 +00:00
|
|
|
filename += Common::String::format(".s%02d", slot);
|
2008-09-11 19:47:45 +00:00
|
|
|
|
2009-05-29 14:38:22 +00:00
|
|
|
g_system->getSavefileManager()->removeSavefile(filename);
|
2008-09-11 19:47:45 +00:00
|
|
|
}
|
|
|
|
|
2008-11-10 14:11:30 +00:00
|
|
|
SaveStateDescriptor SagaMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
|
|
|
|
static char fileName[MAX_FILE_NAME];
|
|
|
|
sprintf(fileName, "%s.s%02d", target, slot);
|
|
|
|
char title[TITLESIZE];
|
|
|
|
|
|
|
|
Common::InSaveFile *in = g_system->getSavefileManager()->openForLoading(fileName);
|
|
|
|
|
|
|
|
if (in) {
|
|
|
|
uint32 type = in->readUint32BE();
|
|
|
|
in->readUint32LE(); // size
|
|
|
|
uint32 version = in->readUint32LE();
|
|
|
|
char name[SAVE_TITLE_SIZE];
|
|
|
|
in->read(name, sizeof(name));
|
|
|
|
|
|
|
|
SaveStateDescriptor desc(slot, name);
|
|
|
|
|
|
|
|
// Some older saves were not written in an endian safe fashion.
|
|
|
|
// We try to detect this here by checking for extremly high version values.
|
|
|
|
// If found, we retry with the data swapped.
|
|
|
|
if (version > 0xFFFFFF) {
|
|
|
|
warning("This savegame is not endian safe, retrying with the data swapped");
|
|
|
|
version = SWAP_BYTES_32(version);
|
|
|
|
}
|
|
|
|
|
2010-10-22 23:13:17 +00:00
|
|
|
debug(2, "Save version: 0x%X", version);
|
2008-11-10 14:11:30 +00:00
|
|
|
|
|
|
|
if (version < 4)
|
|
|
|
warning("This savegame is not endian-safe. There may be problems");
|
|
|
|
|
2011-04-12 14:53:15 +00:00
|
|
|
if (type != MKTAG('S','A','G','A')) {
|
2008-11-10 14:11:30 +00:00
|
|
|
error("SagaEngine::load wrong save game format");
|
|
|
|
}
|
|
|
|
|
|
|
|
if (version > 4) {
|
|
|
|
in->read(title, TITLESIZE);
|
|
|
|
debug(0, "Save is for: %s", title);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (version >= 6) {
|
2011-08-07 12:35:01 +00:00
|
|
|
Graphics::Surface *const thumbnail = Graphics::loadThumbnail(*in);
|
2008-11-10 14:11:30 +00:00
|
|
|
desc.setThumbnail(thumbnail);
|
|
|
|
|
|
|
|
uint32 saveDate = in->readUint32BE();
|
|
|
|
uint16 saveTime = in->readUint16BE();
|
|
|
|
|
|
|
|
int day = (saveDate >> 24) & 0xFF;
|
|
|
|
int month = (saveDate >> 16) & 0xFF;
|
|
|
|
int year = saveDate & 0xFFFF;
|
|
|
|
|
|
|
|
desc.setSaveDate(year, month, day);
|
2009-01-01 15:06:43 +00:00
|
|
|
|
2008-11-10 14:11:30 +00:00
|
|
|
int hour = (saveTime >> 8) & 0xFF;
|
|
|
|
int minutes = saveTime & 0xFF;
|
|
|
|
|
|
|
|
desc.setSaveTime(hour, minutes);
|
|
|
|
|
2012-11-11 21:32:07 +00:00
|
|
|
if (version >= 8) {
|
|
|
|
uint32 playTime = in->readUint32BE();
|
|
|
|
desc.setPlayTime(playTime * 1000);
|
|
|
|
}
|
2008-11-10 14:11:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
delete in;
|
|
|
|
|
|
|
|
return desc;
|
|
|
|
}
|
2009-01-01 15:06:43 +00:00
|
|
|
|
2008-11-10 14:11:30 +00:00
|
|
|
return SaveStateDescriptor();
|
|
|
|
}
|
|
|
|
|
2008-05-06 03:00:26 +00:00
|
|
|
#if PLUGIN_ENABLED_DYNAMIC(SAGA)
|
|
|
|
REGISTER_PLUGIN_DYNAMIC(SAGA, PLUGIN_TYPE_ENGINE, SagaMetaEngine);
|
|
|
|
#else
|
|
|
|
REGISTER_PLUGIN_STATIC(SAGA, PLUGIN_TYPE_ENGINE, SagaMetaEngine);
|
|
|
|
#endif
|
2006-03-09 14:33:07 +00:00
|
|
|
|
2004-04-12 21:40:49 +00:00
|
|
|
namespace Saga {
|
2006-10-02 22:21:57 +00:00
|
|
|
|
2006-11-12 03:23:29 +00:00
|
|
|
bool SagaEngine::initGame() {
|
2008-12-22 14:36:58 +00:00
|
|
|
_displayClip.right = getDisplayInfo().width;
|
|
|
|
_displayClip.bottom = getDisplayInfo().height;
|
2006-12-19 13:50:34 +00:00
|
|
|
|
|
|
|
return _resource->createContexts();
|
2006-11-12 03:23:29 +00:00
|
|
|
}
|
2006-10-02 22:21:57 +00:00
|
|
|
|
2007-04-27 23:11:12 +00:00
|
|
|
const GameDisplayInfo &SagaEngine::getDisplayInfo() {
|
2008-12-21 22:52:44 +00:00
|
|
|
switch (_gameDescription->gameId) {
|
|
|
|
case GID_ITE:
|
|
|
|
return ITE_DisplayInfo;
|
2009-01-02 16:52:38 +00:00
|
|
|
#ifdef ENABLE_IHNM
|
2008-12-21 22:52:44 +00:00
|
|
|
case GID_IHNM:
|
|
|
|
return IHNM_DisplayInfo;
|
2009-01-02 16:52:38 +00:00
|
|
|
#endif
|
2009-01-02 19:10:51 +00:00
|
|
|
#ifdef ENABLE_SAGA2
|
2008-12-21 22:52:44 +00:00
|
|
|
case GID_DINO:
|
2009-01-02 16:52:38 +00:00
|
|
|
return FTA2_DisplayInfo; // TODO
|
2008-12-21 22:52:44 +00:00
|
|
|
case GID_FTA2:
|
|
|
|
return FTA2_DisplayInfo;
|
2009-01-02 19:10:51 +00:00
|
|
|
#endif
|
2008-12-21 22:52:44 +00:00
|
|
|
default:
|
|
|
|
error("getDisplayInfo: Unknown game ID");
|
2009-09-24 17:52:53 +00:00
|
|
|
return ITE_DisplayInfo; // for compilers that don't support NORETURN
|
2008-12-21 22:52:44 +00:00
|
|
|
}
|
2007-04-27 23:11:12 +00:00
|
|
|
}
|
|
|
|
|
2008-11-06 17:05:54 +00:00
|
|
|
Common::Error SagaEngine::loadGameState(int slot) {
|
2008-11-03 18:32:16 +00:00
|
|
|
// Init the current chapter to 8 (character selection) for IHNM
|
2008-12-21 15:59:05 +00:00
|
|
|
if (getGameId() == GID_IHNM)
|
2008-11-03 18:32:16 +00:00
|
|
|
_scene->changeScene(-2, 0, kTransitionFade, 8);
|
|
|
|
|
|
|
|
// First scene sets up palette
|
|
|
|
_scene->changeScene(getStartSceneNumber(), 0, kTransitionNoFade);
|
|
|
|
_events->handleEvents(0); // Process immediate events
|
|
|
|
|
2008-12-21 15:59:05 +00:00
|
|
|
if (getGameId() == GID_ITE)
|
2008-11-03 18:32:16 +00:00
|
|
|
_interface->setMode(kPanelMain);
|
|
|
|
else
|
|
|
|
_interface->setMode(kPanelChapterSelection);
|
|
|
|
|
|
|
|
load(calcSaveFileName((uint)slot));
|
|
|
|
syncSoundSettings();
|
|
|
|
|
2008-11-06 17:05:54 +00:00
|
|
|
return Common::kNoError; // TODO: return success/failure
|
2008-11-03 18:32:16 +00:00
|
|
|
}
|
|
|
|
|
2011-06-02 12:11:38 +00:00
|
|
|
Common::Error SagaEngine::saveGameState(int slot, const Common::String &desc) {
|
|
|
|
save(calcSaveFileName((uint)slot), desc.c_str());
|
2008-11-07 19:43:01 +00:00
|
|
|
return Common::kNoError; // TODO: return success/failure
|
|
|
|
}
|
|
|
|
|
2009-01-01 15:06:43 +00:00
|
|
|
bool SagaEngine::canLoadGameStateCurrently() {
|
2011-04-06 06:48:55 +00:00
|
|
|
return !_scene->isInIntro() &&
|
|
|
|
(_interface->getMode() == kPanelMain || _interface->getMode() == kPanelChapterSelection);
|
2008-11-10 18:51:51 +00:00
|
|
|
}
|
|
|
|
|
2009-01-01 15:06:43 +00:00
|
|
|
bool SagaEngine::canSaveGameStateCurrently() {
|
|
|
|
return !_scene->isInIntro() &&
|
2011-04-06 06:48:55 +00:00
|
|
|
(_interface->getMode() == kPanelMain || _interface->getMode() == kPanelChapterSelection);
|
2008-11-10 18:51:51 +00:00
|
|
|
}
|
|
|
|
|
2004-04-12 21:40:49 +00:00
|
|
|
} // End of namespace Saga
|