diff options
Diffstat (limited to 'engines/agi/detection.cpp')
-rw-r--r-- | engines/agi/detection.cpp | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/engines/agi/detection.cpp b/engines/agi/detection.cpp index 910f6e0e55..553e42f88e 100644 --- a/engines/agi/detection.cpp +++ b/engines/agi/detection.cpp @@ -1290,20 +1290,6 @@ const ADGameDescription *AgiMetaEngine::fallbackDetect(const Common::FSList &fsl namespace Agi { -Common::Error AgiBase::loadGameState(int slot) { - static char saveLoadSlot[12]; - sprintf(saveLoadSlot, "%s.%.3d", _targetName.c_str(), slot); - loadGame(saveLoadSlot); - return Common::kNoError; // TODO: return success/failure -} - -Common::Error AgiBase::saveGameState(int slot, const char *desc) { - static char saveLoadSlot[12]; - sprintf(saveLoadSlot, "%s.%.3d", _targetName.c_str(), slot); - saveGame(saveLoadSlot, desc); - return Common::kNoError; // TODO: return success/failure -} - bool AgiBase::canLoadGameStateCurrently() { return (!(getGameType() == GType_PreAGI) && getflag(fMenusWork) && !_noSaveLoadAllowed); } @@ -1312,4 +1298,19 @@ bool AgiBase::canSaveGameStateCurrently() { return (!(getGameType() == GType_PreAGI) && getflag(fMenusWork) && !_noSaveLoadAllowed && _game.inputEnabled); } +int AgiEngine::agiDetectGame() { + int ec = errOK; + + assert(_gameDescription != NULL); + + if (getVersion() <= 0x2999) { + _loader = new AgiLoader_v2(this); + } else { + _loader = new AgiLoader_v3(this); + } + ec = _loader->detectGame(); + + return ec; +} + } // End of namespace Agi |