mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-22 20:21:06 +00:00
Defined some MetaEngineFeatures for the engines, the launcher uses these features to allow/disallow loading and deleting saves
svn-id: r33909
This commit is contained in:
parent
5bc5855ae9
commit
9d3cdcb2da
@ -2122,11 +2122,21 @@ public:
|
|||||||
return "Sierra AGI Engine (C) Sierra On-Line Software";
|
return "Sierra AGI Engine (C) Sierra On-Line Software";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual bool hasFeature(MetaEngineFeature f) const;
|
||||||
virtual bool createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const;
|
virtual bool createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const;
|
||||||
virtual SaveStateList listSaves(const char *target) const;
|
virtual SaveStateList listSaves(const char *target) const;
|
||||||
|
|
||||||
const Common::ADGameDescription *fallbackDetect(const FSList *fslist) const;
|
const Common::ADGameDescription *fallbackDetect(const FSList *fslist) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
bool AgiMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
|
return
|
||||||
|
(f == kSupportsListSaves) ||
|
||||||
|
(f == kSupportsDirectLoad) ||
|
||||||
|
(f == kSupportsDeleteSave);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool AgiMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const {
|
bool AgiMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const {
|
||||||
const Agi::AGIGameDescription *gd = (const Agi::AGIGameDescription *)desc;
|
const Agi::AGIGameDescription *gd = (const Agi::AGIGameDescription *)desc;
|
||||||
bool res = true;
|
bool res = true;
|
||||||
|
@ -533,9 +533,16 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
virtual bool createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const;
|
virtual bool createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const;
|
||||||
|
virtual bool hasFeature(MetaEngineFeature f) const;
|
||||||
virtual SaveStateList listSaves(const char *target) const;
|
virtual SaveStateList listSaves(const char *target) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
bool CineMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
|
return
|
||||||
|
(f == kSupportsListSaves) ||
|
||||||
|
(f == kSupportsDirectLoad);
|
||||||
|
}
|
||||||
|
|
||||||
bool CineMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const {
|
bool CineMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const {
|
||||||
const Cine::CINEGameDescription *gd = (const Cine::CINEGameDescription *)desc;
|
const Cine::CINEGameDescription *gd = (const Cine::CINEGameDescription *)desc;
|
||||||
if (gd) {
|
if (gd) {
|
||||||
|
@ -931,11 +931,18 @@ public:
|
|||||||
return "The Legend of Kyrandia (C) Westwood Studios";
|
return "The Legend of Kyrandia (C) Westwood Studios";
|
||||||
}
|
}
|
||||||
|
|
||||||
bool createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const;
|
virtual bool hasFeature(MetaEngineFeature f) const;
|
||||||
|
virtual bool createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const;
|
||||||
SaveStateList listSaves(const char *target) const;
|
virtual SaveStateList listSaves(const char *target) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
bool KyraMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
|
return
|
||||||
|
(f == kSupportsListSaves) ||
|
||||||
|
(f == kSupportsDirectLoad) ||
|
||||||
|
(f == kSupportsDeleteSave);
|
||||||
|
}
|
||||||
|
|
||||||
bool KyraMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const {
|
bool KyraMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const {
|
||||||
const KYRAGameDescription *gd = (const KYRAGameDescription *)desc;
|
const KYRAGameDescription *gd = (const KYRAGameDescription *)desc;
|
||||||
bool res = true;
|
bool res = true;
|
||||||
|
@ -185,10 +185,18 @@ public:
|
|||||||
return "Lure of the Temptress (C) Revolution";
|
return "Lure of the Temptress (C) Revolution";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual bool hasFeature(MetaEngineFeature f) const;
|
||||||
virtual bool createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const;
|
virtual bool createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const;
|
||||||
virtual SaveStateList listSaves(const char *target) const;
|
virtual SaveStateList listSaves(const char *target) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
bool LureMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
|
return
|
||||||
|
(f == kSupportsListSaves) ||
|
||||||
|
(f == kSupportsDirectLoad) ||
|
||||||
|
(f == kSupportsDeleteSave);
|
||||||
|
}
|
||||||
|
|
||||||
bool LureMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const {
|
bool LureMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const {
|
||||||
const Lure::LureGameDescription *gd = (const Lure::LureGameDescription *)desc;
|
const Lure::LureGameDescription *gd = (const Lure::LureGameDescription *)desc;
|
||||||
if (gd) {
|
if (gd) {
|
||||||
|
@ -126,7 +126,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
* Determine whether the engine supports the specified feature
|
* Determine whether the engine supports the specified feature
|
||||||
*/
|
*/
|
||||||
virtual bool hasFeature(MetaEngineFeature f) { return false; };
|
virtual bool hasFeature(MetaEngineFeature f) const { return false; };
|
||||||
|
|
||||||
//@}
|
//@}
|
||||||
};
|
};
|
||||||
|
@ -243,10 +243,18 @@ public:
|
|||||||
return "Nippon Safes Inc. (C) Dynabyte";
|
return "Nippon Safes Inc. (C) Dynabyte";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual bool hasFeature(MetaEngineFeature f) const;
|
||||||
virtual bool createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const;
|
virtual bool createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const;
|
||||||
virtual SaveStateList listSaves(const char *target) const;
|
virtual SaveStateList listSaves(const char *target) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
bool ParallactionMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
|
return
|
||||||
|
(f == kSupportsListSaves) ||
|
||||||
|
(f == kSupportsDirectLoad) ||
|
||||||
|
(f == kSupportsDeleteSave);
|
||||||
|
}
|
||||||
|
|
||||||
bool ParallactionMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const {
|
bool ParallactionMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const {
|
||||||
const Parallaction::PARALLACTIONGameDescription *gd = (const Parallaction::PARALLACTIONGameDescription *)desc;
|
const Parallaction::PARALLACTIONGameDescription *gd = (const Parallaction::PARALLACTIONGameDescription *)desc;
|
||||||
bool res = true;
|
bool res = true;
|
||||||
|
@ -60,6 +60,7 @@ public:
|
|||||||
virtual const char *getName() const;
|
virtual const char *getName() const;
|
||||||
virtual const char *getCopyright() const;
|
virtual const char *getCopyright() const;
|
||||||
|
|
||||||
|
virtual bool hasFeature(MetaEngineFeature f) const;
|
||||||
virtual GameList getSupportedGames() const;
|
virtual GameList getSupportedGames() const;
|
||||||
virtual GameDescriptor findGame(const char *gameid) const;
|
virtual GameDescriptor findGame(const char *gameid) const;
|
||||||
virtual GameList detectGames(const FSList &fslist) const;
|
virtual GameList detectGames(const FSList &fslist) const;
|
||||||
@ -76,6 +77,13 @@ const char *QueenMetaEngine::getCopyright() const {
|
|||||||
return "Flight of the Amazon Queen (C) John Passfield and Steve Stamatiadis";
|
return "Flight of the Amazon Queen (C) John Passfield and Steve Stamatiadis";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool QueenMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
|
return
|
||||||
|
(f == kSupportsListSaves) ||
|
||||||
|
(f == kSupportsDirectLoad) ||
|
||||||
|
(f == kSupportsDeleteSave);
|
||||||
|
}
|
||||||
|
|
||||||
GameList QueenMetaEngine::getSupportedGames() const {
|
GameList QueenMetaEngine::getSupportedGames() const {
|
||||||
GameList games;
|
GameList games;
|
||||||
games.push_back(queenGameDescriptor);
|
games.push_back(queenGameDescriptor);
|
||||||
|
@ -147,10 +147,18 @@ public:
|
|||||||
return "Inherit the Earth (C) Wyrmkeep Entertainment";
|
return "Inherit the Earth (C) Wyrmkeep Entertainment";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual bool hasFeature(MetaEngineFeature f) const;
|
||||||
virtual bool createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const;
|
virtual bool createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const;
|
||||||
virtual SaveStateList listSaves(const char *target) const;
|
virtual SaveStateList listSaves(const char *target) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
bool SagaMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
|
return
|
||||||
|
(f == kSupportsListSaves) ||
|
||||||
|
(f == kSupportsDirectLoad) ||
|
||||||
|
(f == kSupportsDeleteSave);
|
||||||
|
}
|
||||||
|
|
||||||
bool SagaMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const {
|
bool SagaMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const {
|
||||||
const Saga::SAGAGameDescription *gd = (const Saga::SAGAGameDescription *)desc;
|
const Saga::SAGAGameDescription *gd = (const Saga::SAGAGameDescription *)desc;
|
||||||
if (gd) {
|
if (gd) {
|
||||||
|
@ -674,16 +674,23 @@ public:
|
|||||||
virtual const char *getName() const;
|
virtual const char *getName() const;
|
||||||
virtual const char *getCopyright() const;
|
virtual const char *getCopyright() const;
|
||||||
|
|
||||||
|
virtual bool hasFeature(MetaEngineFeature f) const;
|
||||||
virtual GameList getSupportedGames() const;
|
virtual GameList getSupportedGames() const;
|
||||||
virtual GameDescriptor findGame(const char *gameid) const;
|
virtual GameDescriptor findGame(const char *gameid) const;
|
||||||
virtual GameList detectGames(const FSList &fslist) const;
|
virtual GameList detectGames(const FSList &fslist) const;
|
||||||
virtual bool hasFeature(MetaEngineFeature f);
|
|
||||||
|
|
||||||
virtual PluginError createInstance(OSystem *syst, Engine **engine) const;
|
virtual PluginError createInstance(OSystem *syst, Engine **engine) const;
|
||||||
|
|
||||||
virtual SaveStateList listSaves(const char *target) const;
|
virtual SaveStateList listSaves(const char *target) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
bool ScummMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
|
return
|
||||||
|
(f == kSupportsListSaves) ||
|
||||||
|
(f == kSupportsDirectLoad) ||
|
||||||
|
(f == kSupportsDeleteSave);
|
||||||
|
}
|
||||||
|
|
||||||
GameList ScummMetaEngine::getSupportedGames() const {
|
GameList ScummMetaEngine::getSupportedGames() const {
|
||||||
return GameList(gameDescriptions);
|
return GameList(gameDescriptions);
|
||||||
}
|
}
|
||||||
@ -692,13 +699,6 @@ GameDescriptor ScummMetaEngine::findGame(const char *gameid) const {
|
|||||||
return Common::AdvancedDetector::findGameID(gameid, gameDescriptions, obsoleteGameIDsTable);
|
return Common::AdvancedDetector::findGameID(gameid, gameDescriptions, obsoleteGameIDsTable);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ScummMetaEngine::hasFeature(MetaEngineFeature f) {
|
|
||||||
return
|
|
||||||
(f == kSupportsListSaves) ||
|
|
||||||
(f == kSupportsDirectLoad) ||
|
|
||||||
(f == kSupportsDeleteSave);
|
|
||||||
}
|
|
||||||
|
|
||||||
GameList ScummMetaEngine::detectGames(const FSList &fslist) const {
|
GameList ScummMetaEngine::detectGames(const FSList &fslist) const {
|
||||||
GameList detectedGames;
|
GameList detectedGames;
|
||||||
Common::List<DetectorResult> results;
|
Common::List<DetectorResult> results;
|
||||||
|
@ -110,9 +110,10 @@ public:
|
|||||||
virtual const char *getName() const;
|
virtual const char *getName() const;
|
||||||
virtual const char *getCopyright() const;
|
virtual const char *getCopyright() const;
|
||||||
|
|
||||||
|
virtual bool hasFeature(MetaEngineFeature f) const;
|
||||||
virtual GameList getSupportedGames() const;
|
virtual GameList getSupportedGames() const;
|
||||||
virtual GameDescriptor findGame(const char *gameid) const;
|
virtual GameDescriptor findGame(const char *gameid) const;
|
||||||
virtual GameList detectGames(const FSList &fslist) const;
|
virtual GameList detectGames(const FSList &fslist) const;
|
||||||
|
|
||||||
virtual PluginError createInstance(OSystem *syst, Engine **engine) const;
|
virtual PluginError createInstance(OSystem *syst, Engine **engine) const;
|
||||||
|
|
||||||
@ -127,6 +128,12 @@ const char *SkyMetaEngine::getCopyright() const {
|
|||||||
return "Beneath a Steel Sky (C) Revolution";
|
return "Beneath a Steel Sky (C) Revolution";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool SkyMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
|
return
|
||||||
|
(f == kSupportsListSaves) ||
|
||||||
|
(f == kSupportsDirectLoad);
|
||||||
|
}
|
||||||
|
|
||||||
GameList SkyMetaEngine::getSupportedGames() const {
|
GameList SkyMetaEngine::getSupportedGames() const {
|
||||||
GameList games;
|
GameList games;
|
||||||
games.push_back(skySetting);
|
games.push_back(skySetting);
|
||||||
|
@ -95,6 +95,7 @@ public:
|
|||||||
return "Broken Sword Games (C) Revolution";
|
return "Broken Sword Games (C) Revolution";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual bool hasFeature(MetaEngineFeature f) const;
|
||||||
virtual GameList getSupportedGames() const;
|
virtual GameList getSupportedGames() const;
|
||||||
virtual GameDescriptor findGame(const char *gameid) const;
|
virtual GameDescriptor findGame(const char *gameid) const;
|
||||||
virtual GameList detectGames(const FSList &fslist) const;
|
virtual GameList detectGames(const FSList &fslist) const;
|
||||||
@ -103,6 +104,12 @@ public:
|
|||||||
virtual PluginError createInstance(OSystem *syst, Engine **engine) const;
|
virtual PluginError createInstance(OSystem *syst, Engine **engine) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
bool SwordMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
|
return
|
||||||
|
(f == kSupportsListSaves) ||
|
||||||
|
(f == kSupportsDirectLoad);
|
||||||
|
}
|
||||||
|
|
||||||
GameList SwordMetaEngine::getSupportedGames() const {
|
GameList SwordMetaEngine::getSupportedGames() const {
|
||||||
GameList games;
|
GameList games;
|
||||||
games.push_back(sword1FullSettings);
|
games.push_back(sword1FullSettings);
|
||||||
|
@ -80,6 +80,7 @@ public:
|
|||||||
return "Broken Sword Games (C) Revolution";
|
return "Broken Sword Games (C) Revolution";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual bool hasFeature(MetaEngineFeature f) const;
|
||||||
virtual GameList getSupportedGames() const;
|
virtual GameList getSupportedGames() const;
|
||||||
virtual GameDescriptor findGame(const char *gameid) const;
|
virtual GameDescriptor findGame(const char *gameid) const;
|
||||||
virtual GameList detectGames(const FSList &fslist) const;
|
virtual GameList detectGames(const FSList &fslist) const;
|
||||||
@ -88,6 +89,13 @@ public:
|
|||||||
virtual PluginError createInstance(OSystem *syst, Engine **engine) const;
|
virtual PluginError createInstance(OSystem *syst, Engine **engine) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
bool Sword2MetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
|
return
|
||||||
|
(f == kSupportsListSaves) ||
|
||||||
|
(f == kSupportsDirectLoad) ||
|
||||||
|
(f == kSupportsDeleteSave);
|
||||||
|
}
|
||||||
|
|
||||||
GameList Sword2MetaEngine::getSupportedGames() const {
|
GameList Sword2MetaEngine::getSupportedGames() const {
|
||||||
const Sword2::GameSettings *g = Sword2::sword2_settings;
|
const Sword2::GameSettings *g = Sword2::sword2_settings;
|
||||||
GameList games;
|
GameList games;
|
||||||
|
@ -136,10 +136,18 @@ public:
|
|||||||
return "Touche: The Adventures of the 5th Musketeer (C) Clipper Software";
|
return "Touche: The Adventures of the 5th Musketeer (C) Clipper Software";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual bool hasFeature(MetaEngineFeature f) const;
|
||||||
virtual bool createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const;
|
virtual bool createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const;
|
||||||
virtual SaveStateList listSaves(const char *target) const;
|
virtual SaveStateList listSaves(const char *target) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
bool ToucheMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
|
return
|
||||||
|
(f == kSupportsListSaves) ||
|
||||||
|
(f == kSupportsDirectLoad) ||
|
||||||
|
(f == kSupportsDeleteSave);
|
||||||
|
}
|
||||||
|
|
||||||
bool ToucheMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const {
|
bool ToucheMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const {
|
||||||
const Common::ADGameDescription *gd = desc;
|
const Common::ADGameDescription *gd = desc;
|
||||||
if (gd) {
|
if (gd) {
|
||||||
|
@ -477,6 +477,7 @@ class SaveLoadChooser : public GUI::Dialog {
|
|||||||
typedef Common::StringList StringList;
|
typedef Common::StringList StringList;
|
||||||
protected:
|
protected:
|
||||||
bool _delSave;
|
bool _delSave;
|
||||||
|
bool _delSupport;
|
||||||
GUI::ListWidget *_list;
|
GUI::ListWidget *_list;
|
||||||
GUI::ButtonWidget *_chooseButton;
|
GUI::ButtonWidget *_chooseButton;
|
||||||
GUI::ButtonWidget *_deleteButton;
|
GUI::ButtonWidget *_deleteButton;
|
||||||
@ -493,7 +494,7 @@ public:
|
|||||||
virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data);
|
virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data);
|
||||||
const String &getResultString() const;
|
const String &getResultString() const;
|
||||||
void setList(const StringList& list);
|
void setList(const StringList& list);
|
||||||
int runModal();
|
int runModal(bool delSupport);
|
||||||
|
|
||||||
virtual void reflowLayout();
|
virtual void reflowLayout();
|
||||||
|
|
||||||
@ -501,7 +502,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
SaveLoadChooser::SaveLoadChooser(const String &title, const String &buttonLabel)
|
SaveLoadChooser::SaveLoadChooser(const String &title, const String &buttonLabel)
|
||||||
: Dialog("scummsaveload"), _delSave(0), _list(0), _chooseButton(0), _deleteButton(0), _gfxWidget(0) {
|
: Dialog("scummsaveload"), _delSave(0), _delSupport(0), _list(0), _chooseButton(0), _deleteButton(0), _gfxWidget(0) {
|
||||||
|
|
||||||
_drawingHints |= GUI::THEME_HINT_SPECIAL_COLOR;
|
_drawingHints |= GUI::THEME_HINT_SPECIAL_COLOR;
|
||||||
|
|
||||||
@ -536,10 +537,11 @@ void SaveLoadChooser::setList(const StringList& list) {
|
|||||||
_list->setList(list);
|
_list->setList(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
int SaveLoadChooser::runModal() {
|
int SaveLoadChooser::runModal(bool delSupport) {
|
||||||
if (_gfxWidget)
|
if (_gfxWidget)
|
||||||
_gfxWidget->setGfx(0);
|
_gfxWidget->setGfx(0);
|
||||||
_delSave = false;
|
_delSave = false;
|
||||||
|
_delSupport = delSupport;
|
||||||
int ret = Dialog::runModal();
|
int ret = Dialog::runModal();
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -571,7 +573,8 @@ void SaveLoadChooser::handleCommand(CommandSender *sender, uint32 cmd, uint32 da
|
|||||||
// list item is selected.
|
// list item is selected.
|
||||||
_chooseButton->setEnabled(selItem >= 0 && (!getResultString().empty()));
|
_chooseButton->setEnabled(selItem >= 0 && (!getResultString().empty()));
|
||||||
_chooseButton->draw();
|
_chooseButton->draw();
|
||||||
_deleteButton->setEnabled(selItem >= 0 && (!getResultString().empty()));
|
// Delete will always be disabled if the engine doesn't support it.
|
||||||
|
_deleteButton->setEnabled(_delSupport && (selItem >= 0) && (!getResultString().empty()));
|
||||||
_deleteButton->draw();
|
_deleteButton->draw();
|
||||||
} break;
|
} break;
|
||||||
case kDelCmd:
|
case kDelCmd:
|
||||||
@ -950,29 +953,37 @@ void LauncherDialog::loadGame(int item) {
|
|||||||
|
|
||||||
int idx;
|
int idx;
|
||||||
if (plugin) {
|
if (plugin) {
|
||||||
do {
|
bool delSupport = (*plugin)->hasFeature(MetaEngine::kSupportsDeleteSave);
|
||||||
Common::StringList saveNames = generateSavegameList(item, plugin);
|
|
||||||
_loadDialog->setList(saveNames);
|
if ((*plugin)->hasFeature(MetaEngine::kSupportsListSaves)) {
|
||||||
SaveStateList saveList = (*plugin)->listSaves(description.c_str());
|
do {
|
||||||
idx = _loadDialog->runModal();
|
Common::StringList saveNames = generateSavegameList(item, plugin);
|
||||||
if (idx >= 0) {
|
_loadDialog->setList(saveNames);
|
||||||
// Delete the savegame
|
SaveStateList saveList = (*plugin)->listSaves(description.c_str());
|
||||||
if (_loadDialog->delSave()) {
|
idx = _loadDialog->runModal(delSupport);
|
||||||
String filename = saveList[idx].filename();
|
if (idx >= 0) {
|
||||||
printf("Deleting file: %s\n", filename.c_str());
|
// Delete the savegame
|
||||||
//saveFileMan->removeSavefile(filename.c_str());
|
if (_loadDialog->delSave()) {
|
||||||
}
|
String filename = saveList[idx].filename();
|
||||||
// Load the savegame
|
printf("Deleting file: %s\n", filename.c_str());
|
||||||
else {
|
//saveFileMan->removeSavefile(filename.c_str());
|
||||||
int slot = atoi(saveList[idx].save_slot().c_str());
|
}
|
||||||
printf("Loading slot: %d\n", slot);
|
// Load the savegame
|
||||||
ConfMan.setInt("save_slot", slot);
|
else {
|
||||||
ConfMan.setActiveDomain(_domains[item]);
|
int slot = atoi(saveList[idx].save_slot().c_str());
|
||||||
close();
|
printf("Loading slot: %d\n", slot);
|
||||||
|
ConfMan.setInt("save_slot", slot);
|
||||||
|
ConfMan.setActiveDomain(_domains[item]);
|
||||||
|
close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
while (_loadDialog->delSave());
|
||||||
|
} else {
|
||||||
|
MessageDialog dialog
|
||||||
|
("Sorry, this game does not yet support loading games from the launcher.", "OK");
|
||||||
|
dialog.runModal();
|
||||||
}
|
}
|
||||||
while (_loadDialog->delSave());
|
|
||||||
} else {
|
} else {
|
||||||
MessageDialog dialog("ScummVM could not find any engine capable of running the selected game!", "OK");
|
MessageDialog dialog("ScummVM could not find any engine capable of running the selected game!", "OK");
|
||||||
dialog.runModal();
|
dialog.runModal();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user