ENGINES: ALL: Finish renaming ME & AME classes
- ME -> MetaEngineStatic (static parts) - MEC -> MetaEngine (dynamic parts)
This commit is contained in:
parent
71a820caff
commit
d26bbe521c
166 changed files with 935 additions and 935 deletions
|
@ -32,9 +32,9 @@ static const PlainGameDescriptor AccessGames[] = {
|
||||||
|
|
||||||
#include "access/detection_tables.h"
|
#include "access/detection_tables.h"
|
||||||
|
|
||||||
class AccessMetaEngine : public AdvancedMetaEngine {
|
class AccessMetaEngineStatic : public AdvancedMetaEngineStatic {
|
||||||
public:
|
public:
|
||||||
AccessMetaEngine() : AdvancedMetaEngine(Access::gameDescriptions, sizeof(Access::AccessGameDescription), AccessGames) {
|
AccessMetaEngineStatic() : AdvancedMetaEngineStatic(Access::gameDescriptions, sizeof(Access::AccessGameDescription), AccessGames) {
|
||||||
_maxScanDepth = 3;
|
_maxScanDepth = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,4 +52,4 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
REGISTER_PLUGIN_STATIC(ACCESS_DETECTION, PLUGIN_TYPE_METAENGINE, AccessMetaEngine);
|
REGISTER_PLUGIN_STATIC(ACCESS_DETECTION, PLUGIN_TYPE_METAENGINE, AccessMetaEngineStatic);
|
||||||
|
|
|
@ -68,7 +68,7 @@ Common::Platform AccessEngine::getPlatform() const {
|
||||||
|
|
||||||
} // End of namespace Access
|
} // End of namespace Access
|
||||||
|
|
||||||
class AccessMetaEngineConnect : public AdvancedMetaEngineConnect {
|
class AccessMetaEngine : public AdvancedMetaEngine {
|
||||||
public:
|
public:
|
||||||
const char *getName() const override {
|
const char *getName() const override {
|
||||||
return "access";
|
return "access";
|
||||||
|
@ -84,7 +84,7 @@ public:
|
||||||
SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const override;
|
SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool AccessMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
bool AccessMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
return
|
return
|
||||||
(f == kSupportsListSaves) ||
|
(f == kSupportsListSaves) ||
|
||||||
(f == kSupportsLoadingDuringStartup) ||
|
(f == kSupportsLoadingDuringStartup) ||
|
||||||
|
@ -101,7 +101,7 @@ bool Access::AccessEngine::hasFeature(EngineFeature f) const {
|
||||||
(f == kSupportsSavingDuringRuntime);
|
(f == kSupportsSavingDuringRuntime);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AccessMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
bool AccessMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
||||||
const Access::AccessGameDescription *gd = (const Access::AccessGameDescription *)desc;
|
const Access::AccessGameDescription *gd = (const Access::AccessGameDescription *)desc;
|
||||||
if (gd) {
|
if (gd) {
|
||||||
switch (gd->gameID) {
|
switch (gd->gameID) {
|
||||||
|
@ -118,7 +118,7 @@ bool AccessMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, con
|
||||||
return gd != 0;
|
return gd != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateList AccessMetaEngineConnect::listSaves(const char *target) const {
|
SaveStateList AccessMetaEngine::listSaves(const char *target) const {
|
||||||
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
||||||
Common::StringArray filenames;
|
Common::StringArray filenames;
|
||||||
Common::String saveDesc;
|
Common::String saveDesc;
|
||||||
|
@ -149,16 +149,16 @@ SaveStateList AccessMetaEngineConnect::listSaves(const char *target) const {
|
||||||
return saveList;
|
return saveList;
|
||||||
}
|
}
|
||||||
|
|
||||||
int AccessMetaEngineConnect::getMaximumSaveSlot() const {
|
int AccessMetaEngine::getMaximumSaveSlot() const {
|
||||||
return MAX_SAVES;
|
return MAX_SAVES;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AccessMetaEngineConnect::removeSaveState(const char *target, int slot) const {
|
void AccessMetaEngine::removeSaveState(const char *target, int slot) const {
|
||||||
Common::String filename = Common::String::format("%s.%03d", target, slot);
|
Common::String filename = Common::String::format("%s.%03d", target, slot);
|
||||||
g_system->getSavefileManager()->removeSavefile(filename);
|
g_system->getSavefileManager()->removeSavefile(filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateDescriptor AccessMetaEngineConnect::querySaveMetaInfos(const char *target, int slot) const {
|
SaveStateDescriptor AccessMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
|
||||||
Common::String filename = Common::String::format("%s.%03d", target, slot);
|
Common::String filename = Common::String::format("%s.%03d", target, slot);
|
||||||
Common::InSaveFile *f = g_system->getSavefileManager()->openForLoading(filename);
|
Common::InSaveFile *f = g_system->getSavefileManager()->openForLoading(filename);
|
||||||
|
|
||||||
|
@ -185,7 +185,7 @@ SaveStateDescriptor AccessMetaEngineConnect::querySaveMetaInfos(const char *targ
|
||||||
}
|
}
|
||||||
|
|
||||||
#if PLUGIN_ENABLED_DYNAMIC(ACCESS)
|
#if PLUGIN_ENABLED_DYNAMIC(ACCESS)
|
||||||
REGISTER_PLUGIN_DYNAMIC(ACCESS, PLUGIN_TYPE_ENGINE, AccessMetaEngineConnect);
|
REGISTER_PLUGIN_DYNAMIC(ACCESS, PLUGIN_TYPE_ENGINE, AccessMetaEngine);
|
||||||
#else
|
#else
|
||||||
REGISTER_PLUGIN_STATIC(ACCESS, PLUGIN_TYPE_ENGINE, AccessMetaEngineConnect);
|
REGISTER_PLUGIN_STATIC(ACCESS, PLUGIN_TYPE_ENGINE, AccessMetaEngine);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -337,9 +337,9 @@ static const AdlGameDescription gameDiskDescriptions[] = {
|
||||||
{ AD_TABLE_END_MARKER, GAME_TYPE_NONE, GAME_VER_NONE }
|
{ AD_TABLE_END_MARKER, GAME_TYPE_NONE, GAME_VER_NONE }
|
||||||
};
|
};
|
||||||
|
|
||||||
class AdlMetaEngine : public AdvancedMetaEngine {
|
class AdlMetaEngineStatic : public AdvancedMetaEngineStatic {
|
||||||
public:
|
public:
|
||||||
AdlMetaEngine() : AdvancedMetaEngine(gameFileDescriptions, sizeof(AdlGameDescription), adlGames, optionsList) { }
|
AdlMetaEngineStatic() : AdvancedMetaEngineStatic(gameFileDescriptions, sizeof(AdlGameDescription), adlGames, optionsList) { }
|
||||||
|
|
||||||
const char *getName() const override {
|
const char *getName() const override {
|
||||||
return "ADL";
|
return "ADL";
|
||||||
|
@ -358,7 +358,7 @@ public:
|
||||||
bool addFileProps(const FileMap &allFiles, Common::String fname, FilePropertiesMap &filePropsMap) const;
|
bool addFileProps(const FileMap &allFiles, Common::String fname, FilePropertiesMap &filePropsMap) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool AdlMetaEngine::addFileProps(const FileMap &allFiles, Common::String fname, FilePropertiesMap &filePropsMap) const {
|
bool AdlMetaEngineStatic::addFileProps(const FileMap &allFiles, Common::String fname, FilePropertiesMap &filePropsMap) const {
|
||||||
if (filePropsMap.contains(fname))
|
if (filePropsMap.contains(fname))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
@ -377,9 +377,9 @@ bool AdlMetaEngine::addFileProps(const FileMap &allFiles, Common::String fname,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Based on AdvancedMetaEngine::detectGame
|
// Based on AdvancedMetaEngine::detectGame
|
||||||
ADDetectedGames AdlMetaEngine::detectGame(const Common::FSNode &parent, const FileMap &allFiles, Common::Language language, Common::Platform platform, const Common::String &extra) const {
|
ADDetectedGames AdlMetaEngineStatic::detectGame(const Common::FSNode &parent, const FileMap &allFiles, Common::Language language, Common::Platform platform, const Common::String &extra) const {
|
||||||
// We run the file-based detector first, if it finds a match we do not search for disk images
|
// We run the file-based detector first, if it finds a match we do not search for disk images
|
||||||
ADDetectedGames matched = AdvancedMetaEngine::detectGame(parent, allFiles, language, platform, extra);
|
ADDetectedGames matched = AdvancedMetaEngineStatic::detectGame(parent, allFiles, language, platform, extra);
|
||||||
|
|
||||||
if (!matched.empty())
|
if (!matched.empty())
|
||||||
return matched;
|
return matched;
|
||||||
|
@ -474,4 +474,4 @@ ADDetectedGames AdlMetaEngine::detectGame(const Common::FSNode &parent, const Fi
|
||||||
|
|
||||||
} // End of namespace Adl
|
} // End of namespace Adl
|
||||||
|
|
||||||
REGISTER_PLUGIN_STATIC(ADL_DETECTION, PLUGIN_TYPE_METAENGINE, Adl::AdlMetaEngine);
|
REGISTER_PLUGIN_STATIC(ADL_DETECTION, PLUGIN_TYPE_METAENGINE, Adl::AdlMetaEngineStatic);
|
||||||
|
|
|
@ -67,7 +67,7 @@ Common::Platform getPlatform(const AdlGameDescription &adlDesc) {
|
||||||
return adlDesc.desc.platform;
|
return adlDesc.desc.platform;
|
||||||
}
|
}
|
||||||
|
|
||||||
class AdlMetaEngineConnect : public AdvancedMetaEngineConnect {
|
class AdlMetaEngine : public AdvancedMetaEngine {
|
||||||
public:
|
public:
|
||||||
const char *getName() const override {
|
const char *getName() const override {
|
||||||
return "adl";
|
return "adl";
|
||||||
|
@ -82,7 +82,7 @@ public:
|
||||||
bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *gd) const override;
|
bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *gd) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool AdlMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
bool AdlMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
switch(f) {
|
switch(f) {
|
||||||
case kSupportsListSaves:
|
case kSupportsListSaves:
|
||||||
case kSupportsLoadingDuringStartup:
|
case kSupportsLoadingDuringStartup:
|
||||||
|
@ -98,7 +98,7 @@ bool AdlMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateDescriptor AdlMetaEngineConnect::querySaveMetaInfos(const char *target, int slot) const {
|
SaveStateDescriptor AdlMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
|
||||||
Common::String fileName = Common::String::format("%s.s%02d", target, slot);
|
Common::String fileName = Common::String::format("%s.s%02d", target, slot);
|
||||||
Common::InSaveFile *inFile = g_system->getSavefileManager()->openForLoading(fileName);
|
Common::InSaveFile *inFile = g_system->getSavefileManager()->openForLoading(fileName);
|
||||||
|
|
||||||
|
@ -155,7 +155,7 @@ SaveStateDescriptor AdlMetaEngineConnect::querySaveMetaInfos(const char *target,
|
||||||
return sd;
|
return sd;
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateList AdlMetaEngineConnect::listSaves(const char *target) const {
|
SaveStateList AdlMetaEngine::listSaves(const char *target) const {
|
||||||
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
||||||
Common::StringArray files = saveFileMan->listSavefiles(Common::String(target) + ".s##");
|
Common::StringArray files = saveFileMan->listSavefiles(Common::String(target) + ".s##");
|
||||||
|
|
||||||
|
@ -196,7 +196,7 @@ SaveStateList AdlMetaEngineConnect::listSaves(const char *target) const {
|
||||||
return saveList;
|
return saveList;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AdlMetaEngineConnect::removeSaveState(const char *target, int slot) const {
|
void AdlMetaEngine::removeSaveState(const char *target, int slot) const {
|
||||||
Common::String fileName = Common::String::format("%s.s%02d", target, slot);
|
Common::String fileName = Common::String::format("%s.s%02d", target, slot);
|
||||||
g_system->getSavefileManager()->removeSavefile(fileName);
|
g_system->getSavefileManager()->removeSavefile(fileName);
|
||||||
}
|
}
|
||||||
|
@ -209,7 +209,7 @@ Engine *HiRes4Engine_create(OSystem *syst, const AdlGameDescription *gd);
|
||||||
Engine *HiRes5Engine_create(OSystem *syst, const AdlGameDescription *gd);
|
Engine *HiRes5Engine_create(OSystem *syst, const AdlGameDescription *gd);
|
||||||
Engine *HiRes6Engine_create(OSystem *syst, const AdlGameDescription *gd);
|
Engine *HiRes6Engine_create(OSystem *syst, const AdlGameDescription *gd);
|
||||||
|
|
||||||
bool AdlMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *gd) const {
|
bool AdlMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *gd) const {
|
||||||
if (!gd)
|
if (!gd)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -247,8 +247,8 @@ bool AdlMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const
|
||||||
} // End of namespace Adl
|
} // End of namespace Adl
|
||||||
|
|
||||||
#if PLUGIN_ENABLED_DYNAMIC(ADL)
|
#if PLUGIN_ENABLED_DYNAMIC(ADL)
|
||||||
REGISTER_PLUGIN_DYNAMIC(ADL, PLUGIN_TYPE_ENGINE, Adl::AdlMetaEngineConnect);
|
REGISTER_PLUGIN_DYNAMIC(ADL, PLUGIN_TYPE_ENGINE, Adl::AdlMetaEngine);
|
||||||
#else
|
#else
|
||||||
REGISTER_PLUGIN_STATIC(ADL, PLUGIN_TYPE_ENGINE, Adl::AdlMetaEngineConnect);
|
REGISTER_PLUGIN_STATIC(ADL, PLUGIN_TYPE_ENGINE, Adl::AdlMetaEngine);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -131,12 +131,12 @@ static const ADExtraGuiOptionsMap optionsList[] = {
|
||||||
|
|
||||||
using namespace Agi;
|
using namespace Agi;
|
||||||
|
|
||||||
class AgiMetaEngine : public AdvancedMetaEngine {
|
class AgiMetaEngineStatic : public AdvancedMetaEngineStatic {
|
||||||
mutable Common::String _gameid;
|
mutable Common::String _gameid;
|
||||||
mutable Common::String _extra;
|
mutable Common::String _extra;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AgiMetaEngine() : AdvancedMetaEngine(Agi::gameDescriptions, sizeof(Agi::AGIGameDescription), agiGames, optionsList) {
|
AgiMetaEngineStatic() : AdvancedMetaEngineStatic(Agi::gameDescriptions, sizeof(Agi::AGIGameDescription), agiGames, optionsList) {
|
||||||
_guiOptions = GUIO1(GUIO_NOSPEECH);
|
_guiOptions = GUIO1(GUIO_NOSPEECH);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -155,7 +155,7 @@ public:
|
||||||
ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const override;
|
ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
ADDetectedGame AgiMetaEngine::fallbackDetect(const FileMap &allFilesXXX, const Common::FSList &fslist) const {
|
ADDetectedGame AgiMetaEngineStatic::fallbackDetect(const FileMap &allFilesXXX, const Common::FSList &fslist) const {
|
||||||
typedef Common::HashMap<Common::String, int32> IntMap;
|
typedef Common::HashMap<Common::String, int32> IntMap;
|
||||||
IntMap allFiles;
|
IntMap allFiles;
|
||||||
bool matchedUsingFilenames = false;
|
bool matchedUsingFilenames = false;
|
||||||
|
@ -323,4 +323,4 @@ ADDetectedGame AgiMetaEngine::fallbackDetect(const FileMap &allFilesXXX, const C
|
||||||
return ADDetectedGame();
|
return ADDetectedGame();
|
||||||
}
|
}
|
||||||
|
|
||||||
REGISTER_PLUGIN_STATIC(AGI_DETECTION, PLUGIN_TYPE_METAENGINE, AgiMetaEngine);
|
REGISTER_PLUGIN_STATIC(AGI_DETECTION, PLUGIN_TYPE_METAENGINE, AgiMetaEngineStatic);
|
||||||
|
|
|
@ -106,7 +106,7 @@ bool AgiBase::hasFeature(EngineFeature f) const {
|
||||||
|
|
||||||
using namespace Agi;
|
using namespace Agi;
|
||||||
|
|
||||||
class AgiMetaEngineConnect : public AdvancedMetaEngineConnect {
|
class AgiMetaEngine : public AdvancedMetaEngine {
|
||||||
public:
|
public:
|
||||||
const char *getName() const override {
|
const char *getName() const override {
|
||||||
return "agi";
|
return "agi";
|
||||||
|
@ -122,7 +122,7 @@ public:
|
||||||
bool hasFeature(MetaEngineFeature f) const override;
|
bool hasFeature(MetaEngineFeature f) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool AgiMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
bool AgiMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
return
|
return
|
||||||
(f == kSupportsListSaves) ||
|
(f == kSupportsListSaves) ||
|
||||||
(f == kSupportsLoadingDuringStartup) ||
|
(f == kSupportsLoadingDuringStartup) ||
|
||||||
|
@ -134,7 +134,7 @@ bool AgiMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
||||||
(f == kSimpleSavesNames);
|
(f == kSimpleSavesNames);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AgiMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
bool AgiMetaEngine::createInstance(OSystem *syst, Engine **engine, const 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;
|
||||||
|
|
||||||
|
@ -169,7 +169,7 @@ bool AgiMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateList AgiMetaEngineConnect::listSaves(const char *target) const {
|
SaveStateList AgiMetaEngine::listSaves(const char *target) const {
|
||||||
const uint32 AGIflag = MKTAG('A', 'G', 'I', ':');
|
const uint32 AGIflag = MKTAG('A', 'G', 'I', ':');
|
||||||
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
||||||
Common::StringArray filenames;
|
Common::StringArray filenames;
|
||||||
|
@ -219,14 +219,14 @@ SaveStateList AgiMetaEngineConnect::listSaves(const char *target) const {
|
||||||
return saveList;
|
return saveList;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AgiMetaEngineConnect::removeSaveState(const char *target, int slot) const {
|
void AgiMetaEngine::removeSaveState(const char *target, int slot) const {
|
||||||
Common::String fileName = Common::String::format("%s.%03d", target, slot);
|
Common::String fileName = Common::String::format("%s.%03d", target, slot);
|
||||||
g_system->getSavefileManager()->removeSavefile(fileName);
|
g_system->getSavefileManager()->removeSavefile(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
int AgiMetaEngineConnect::getMaximumSaveSlot() const { return 999; }
|
int AgiMetaEngine::getMaximumSaveSlot() const { return 999; }
|
||||||
|
|
||||||
SaveStateDescriptor AgiMetaEngineConnect::querySaveMetaInfos(const char *target, int slotNr) const {
|
SaveStateDescriptor AgiMetaEngine::querySaveMetaInfos(const char *target, int slotNr) const {
|
||||||
const uint32 AGIflag = MKTAG('A', 'G', 'I', ':');
|
const uint32 AGIflag = MKTAG('A', 'G', 'I', ':');
|
||||||
Common::String fileName = Common::String::format("%s.%03d", target, slotNr);
|
Common::String fileName = Common::String::format("%s.%03d", target, slotNr);
|
||||||
|
|
||||||
|
@ -317,9 +317,9 @@ SaveStateDescriptor AgiMetaEngineConnect::querySaveMetaInfos(const char *target,
|
||||||
}
|
}
|
||||||
|
|
||||||
#if PLUGIN_ENABLED_DYNAMIC(AGI)
|
#if PLUGIN_ENABLED_DYNAMIC(AGI)
|
||||||
REGISTER_PLUGIN_DYNAMIC(AGI, PLUGIN_TYPE_ENGINE, AgiMetaEngineConnect);
|
REGISTER_PLUGIN_DYNAMIC(AGI, PLUGIN_TYPE_ENGINE, AgiMetaEngine);
|
||||||
#else
|
#else
|
||||||
REGISTER_PLUGIN_STATIC(AGI, PLUGIN_TYPE_ENGINE, AgiMetaEngineConnect);
|
REGISTER_PLUGIN_STATIC(AGI, PLUGIN_TYPE_ENGINE, AgiMetaEngine);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace Agi {
|
namespace Agi {
|
||||||
|
|
|
@ -65,9 +65,9 @@ static const char *const directoryGlobs[] = {
|
||||||
|
|
||||||
using namespace AGOS;
|
using namespace AGOS;
|
||||||
|
|
||||||
class AgosMetaEngine : public AdvancedMetaEngine {
|
class AgosMetaEngineStatic : public AdvancedMetaEngineStatic {
|
||||||
public:
|
public:
|
||||||
AgosMetaEngine() : AdvancedMetaEngine(AGOS::gameDescriptions, sizeof(AGOS::AGOSGameDescription), agosGames) {
|
AgosMetaEngineStatic() : AdvancedMetaEngineStatic(AGOS::gameDescriptions, sizeof(AGOS::AGOSGameDescription), agosGames) {
|
||||||
_guiOptions = GUIO1(GUIO_NOLAUNCHLOAD);
|
_guiOptions = GUIO1(GUIO_NOLAUNCHLOAD);
|
||||||
_maxScanDepth = 2;
|
_maxScanDepth = 2;
|
||||||
_directoryGlobs = directoryGlobs;
|
_directoryGlobs = directoryGlobs;
|
||||||
|
@ -90,4 +90,4 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
REGISTER_PLUGIN_STATIC(AGOS_DETECTION, PLUGIN_TYPE_METAENGINE, AgosMetaEngine);
|
REGISTER_PLUGIN_STATIC(AGOS_DETECTION, PLUGIN_TYPE_METAENGINE, AgosMetaEngineStatic);
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
#include "agos/detection.h"
|
#include "agos/detection.h"
|
||||||
#include "agos/obsolete.h"
|
#include "agos/obsolete.h"
|
||||||
|
|
||||||
class AgosMetaEngineConnect : public AdvancedMetaEngineConnect {
|
class AgosMetaEngine : public AdvancedMetaEngine {
|
||||||
public:
|
public:
|
||||||
const char *getName() const override {
|
const char *getName() const override {
|
||||||
return "agos";
|
return "agos";
|
||||||
|
@ -43,7 +43,7 @@ public:
|
||||||
|
|
||||||
Common::Error createInstance(OSystem *syst, Engine **engine) const override {
|
Common::Error createInstance(OSystem *syst, Engine **engine) const override {
|
||||||
Engines::upgradeTargetIfNecessary(obsoleteGameIDsTable);
|
Engines::upgradeTargetIfNecessary(obsoleteGameIDsTable);
|
||||||
return AdvancedMetaEngineConnect::createInstance(syst, engine);
|
return AdvancedMetaEngine::createInstance(syst, engine);
|
||||||
}
|
}
|
||||||
bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
|
bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ public:
|
||||||
int getMaximumSaveSlot() const override;
|
int getMaximumSaveSlot() const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool AgosMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
bool AgosMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
return
|
return
|
||||||
(f == kSupportsListSaves) ||
|
(f == kSupportsListSaves) ||
|
||||||
(f == kSimpleSavesNames);
|
(f == kSimpleSavesNames);
|
||||||
|
@ -62,7 +62,7 @@ bool AGOS::AGOSEngine::hasFeature(EngineFeature f) const {
|
||||||
(f == kSupportsReturnToLauncher);
|
(f == kSupportsReturnToLauncher);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AgosMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
bool AgosMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
||||||
const AGOS::AGOSGameDescription *gd = (const AGOS::AGOSGameDescription *)desc;
|
const AGOS::AGOSGameDescription *gd = (const AGOS::AGOSGameDescription *)desc;
|
||||||
bool res = true;
|
bool res = true;
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ bool AgosMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateList AgosMetaEngineConnect::listSaves(const char *target) const {
|
SaveStateList AgosMetaEngine::listSaves(const char *target) const {
|
||||||
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
||||||
Common::StringArray filenames;
|
Common::StringArray filenames;
|
||||||
Common::String saveDesc;
|
Common::String saveDesc;
|
||||||
|
@ -136,12 +136,12 @@ SaveStateList AgosMetaEngineConnect::listSaves(const char *target) const {
|
||||||
return saveList;
|
return saveList;
|
||||||
}
|
}
|
||||||
|
|
||||||
int AgosMetaEngineConnect::getMaximumSaveSlot() const { return 999; }
|
int AgosMetaEngine::getMaximumSaveSlot() const { return 999; }
|
||||||
|
|
||||||
#if PLUGIN_ENABLED_DYNAMIC(AGOS)
|
#if PLUGIN_ENABLED_DYNAMIC(AGOS)
|
||||||
REGISTER_PLUGIN_DYNAMIC(AGOS, PLUGIN_TYPE_ENGINE, AgosMetaEngineConnect);
|
REGISTER_PLUGIN_DYNAMIC(AGOS, PLUGIN_TYPE_ENGINE, AgosMetaEngine);
|
||||||
#else
|
#else
|
||||||
REGISTER_PLUGIN_STATIC(AGOS, PLUGIN_TYPE_ENGINE, AgosMetaEngineConnect);
|
REGISTER_PLUGIN_STATIC(AGOS, PLUGIN_TYPE_ENGINE, AgosMetaEngine);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace AGOS {
|
namespace AGOS {
|
||||||
|
|
|
@ -56,9 +56,9 @@ static const ADGameDescription gameDescriptions[] = {
|
||||||
AD_TABLE_END_MARKER
|
AD_TABLE_END_MARKER
|
||||||
};
|
};
|
||||||
|
|
||||||
class AvalancheMetaEngine : public AdvancedMetaEngine {
|
class AvalancheMetaEngineStatic : public AdvancedMetaEngineStatic {
|
||||||
public:
|
public:
|
||||||
AvalancheMetaEngine() : AdvancedMetaEngine(gameDescriptions, sizeof(AvalancheGameDescription), avalancheGames) {
|
AvalancheMetaEngineStatic() : AdvancedMetaEngineStatic(gameDescriptions, sizeof(AvalancheGameDescription), avalancheGames) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *getEngineId() const override {
|
const char *getEngineId() const override {
|
||||||
|
@ -76,4 +76,4 @@ public:
|
||||||
|
|
||||||
} // End of namespace Avalanche
|
} // End of namespace Avalanche
|
||||||
|
|
||||||
REGISTER_PLUGIN_STATIC(AVALANCHE_DETECTION, PLUGIN_TYPE_METAENGINE, Avalanche::AvalancheMetaEngine);
|
REGISTER_PLUGIN_STATIC(AVALANCHE_DETECTION, PLUGIN_TYPE_METAENGINE, Avalanche::AvalancheMetaEngineStatic);
|
||||||
|
|
|
@ -54,7 +54,7 @@ Common::Platform AvalancheEngine::getPlatform() const {
|
||||||
|
|
||||||
namespace Avalanche {
|
namespace Avalanche {
|
||||||
|
|
||||||
class AvalancheMetaEngineConnect : public AdvancedMetaEngineConnect {
|
class AvalancheMetaEngine : public AdvancedMetaEngine {
|
||||||
public:
|
public:
|
||||||
const char *getName() const override {
|
const char *getName() const override {
|
||||||
return "avalanche";
|
return "avalanche";
|
||||||
|
@ -69,13 +69,13 @@ public:
|
||||||
SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const override;
|
SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool AvalancheMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *gd) const {
|
bool AvalancheMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *gd) const {
|
||||||
if (gd)
|
if (gd)
|
||||||
*engine = new AvalancheEngine(syst, (const AvalancheGameDescription *)gd);
|
*engine = new AvalancheEngine(syst, (const AvalancheGameDescription *)gd);
|
||||||
return gd != 0;
|
return gd != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AvalancheMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
bool AvalancheMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
return
|
return
|
||||||
(f == kSupportsListSaves) ||
|
(f == kSupportsListSaves) ||
|
||||||
(f == kSupportsDeleteSave) ||
|
(f == kSupportsDeleteSave) ||
|
||||||
|
@ -85,7 +85,7 @@ bool AvalancheMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
||||||
(f == kSimpleSavesNames);
|
(f == kSimpleSavesNames);
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateList AvalancheMetaEngineConnect::listSaves(const char *target) const {
|
SaveStateList AvalancheMetaEngine::listSaves(const char *target) const {
|
||||||
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
||||||
Common::StringArray filenames;
|
Common::StringArray filenames;
|
||||||
Common::String pattern = target;
|
Common::String pattern = target;
|
||||||
|
@ -139,12 +139,12 @@ SaveStateList AvalancheMetaEngineConnect::listSaves(const char *target) const {
|
||||||
return saveList;
|
return saveList;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AvalancheMetaEngineConnect::removeSaveState(const char *target, int slot) const {
|
void AvalancheMetaEngine::removeSaveState(const char *target, int slot) const {
|
||||||
Common::String fileName = Common::String::format("%s.%03d", target, slot);
|
Common::String fileName = Common::String::format("%s.%03d", target, slot);
|
||||||
g_system->getSavefileManager()->removeSavefile(fileName);
|
g_system->getSavefileManager()->removeSavefile(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateDescriptor AvalancheMetaEngineConnect::querySaveMetaInfos(const char *target, int slot) const {
|
SaveStateDescriptor AvalancheMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
|
||||||
Common::String fileName = Common::String::format("%s.%03d", target, slot);
|
Common::String fileName = Common::String::format("%s.%03d", target, slot);
|
||||||
Common::InSaveFile *f = g_system->getSavefileManager()->openForLoading(fileName);
|
Common::InSaveFile *f = g_system->getSavefileManager()->openForLoading(fileName);
|
||||||
|
|
||||||
|
@ -192,7 +192,7 @@ SaveStateDescriptor AvalancheMetaEngineConnect::querySaveMetaInfos(const char *t
|
||||||
} // End of namespace Avalanche
|
} // End of namespace Avalanche
|
||||||
|
|
||||||
#if PLUGIN_ENABLED_DYNAMIC(AVALANCHE)
|
#if PLUGIN_ENABLED_DYNAMIC(AVALANCHE)
|
||||||
REGISTER_PLUGIN_DYNAMIC(AVALANCHE, PLUGIN_TYPE_ENGINE, Avalanche::AvalancheMetaEngineConnect);
|
REGISTER_PLUGIN_DYNAMIC(AVALANCHE, PLUGIN_TYPE_ENGINE, Avalanche::AvalancheMetaEngine);
|
||||||
#else
|
#else
|
||||||
REGISTER_PLUGIN_STATIC(AVALANCHE, PLUGIN_TYPE_ENGINE, Avalanche::AvalancheMetaEngineConnect);
|
REGISTER_PLUGIN_STATIC(AVALANCHE, PLUGIN_TYPE_ENGINE, Avalanche::AvalancheMetaEngine);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -83,9 +83,9 @@ static const char * const directoryGlobs[] = {
|
||||||
0
|
0
|
||||||
};
|
};
|
||||||
|
|
||||||
class BbvsMetaEngine : public AdvancedMetaEngine {
|
class BbvsMetaEngineStatic : public AdvancedMetaEngineStatic {
|
||||||
public:
|
public:
|
||||||
BbvsMetaEngine() : AdvancedMetaEngine(Bbvs::gameDescriptions, sizeof(ADGameDescription), bbvsGames) {
|
BbvsMetaEngineStatic() : AdvancedMetaEngineStatic(Bbvs::gameDescriptions, sizeof(ADGameDescription), bbvsGames) {
|
||||||
_maxScanDepth = 3;
|
_maxScanDepth = 3;
|
||||||
_directoryGlobs = directoryGlobs;
|
_directoryGlobs = directoryGlobs;
|
||||||
}
|
}
|
||||||
|
@ -103,4 +103,4 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
REGISTER_PLUGIN_STATIC(BBVS_DETECTION, PLUGIN_TYPE_METAENGINE, BbvsMetaEngine);
|
REGISTER_PLUGIN_STATIC(BBVS_DETECTION, PLUGIN_TYPE_METAENGINE, BbvsMetaEngineStatic);
|
||||||
|
|
|
@ -37,7 +37,7 @@ bool BbvsEngine::isLoogieDemo() const {
|
||||||
|
|
||||||
} // End of namespace Bbvs
|
} // End of namespace Bbvs
|
||||||
|
|
||||||
class BbvsMetaEngineConnect : public AdvancedMetaEngineConnect {
|
class BbvsMetaEngine : public AdvancedMetaEngine {
|
||||||
public:
|
public:
|
||||||
const char *getName() const override {
|
const char *getName() const override {
|
||||||
return "bbvs";
|
return "bbvs";
|
||||||
|
@ -52,7 +52,7 @@ public:
|
||||||
void removeSaveState(const char *target, int slot) const override;
|
void removeSaveState(const char *target, int slot) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool BbvsMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
bool BbvsMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
return
|
return
|
||||||
(f == kSupportsListSaves) ||
|
(f == kSupportsListSaves) ||
|
||||||
(f == kSupportsDeleteSave) ||
|
(f == kSupportsDeleteSave) ||
|
||||||
|
@ -63,16 +63,16 @@ bool BbvsMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
||||||
(f == kSimpleSavesNames);
|
(f == kSimpleSavesNames);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BbvsMetaEngineConnect::removeSaveState(const char *target, int slot) const {
|
void BbvsMetaEngine::removeSaveState(const char *target, int slot) const {
|
||||||
Common::String fileName = Common::String::format("%s.%03d", target, slot);
|
Common::String fileName = Common::String::format("%s.%03d", target, slot);
|
||||||
g_system->getSavefileManager()->removeSavefile(fileName);
|
g_system->getSavefileManager()->removeSavefile(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
int BbvsMetaEngineConnect::getMaximumSaveSlot() const {
|
int BbvsMetaEngine::getMaximumSaveSlot() const {
|
||||||
return 999;
|
return 999;
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateList BbvsMetaEngineConnect::listSaves(const char *target) const {
|
SaveStateList BbvsMetaEngine::listSaves(const char *target) const {
|
||||||
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
||||||
Bbvs::BbvsEngine::SaveHeader header;
|
Bbvs::BbvsEngine::SaveHeader header;
|
||||||
Common::String pattern = target;
|
Common::String pattern = target;
|
||||||
|
@ -98,7 +98,7 @@ SaveStateList BbvsMetaEngineConnect::listSaves(const char *target) const {
|
||||||
return saveList;
|
return saveList;
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateDescriptor BbvsMetaEngineConnect::querySaveMetaInfos(const char *target, int slot) const {
|
SaveStateDescriptor BbvsMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
|
||||||
Common::String filename = Bbvs::BbvsEngine::getSavegameFilename(target, slot);
|
Common::String filename = Bbvs::BbvsEngine::getSavegameFilename(target, slot);
|
||||||
Common::InSaveFile *in = g_system->getSavefileManager()->openForLoading(filename.c_str());
|
Common::InSaveFile *in = g_system->getSavefileManager()->openForLoading(filename.c_str());
|
||||||
if (in) {
|
if (in) {
|
||||||
|
@ -121,7 +121,7 @@ SaveStateDescriptor BbvsMetaEngineConnect::querySaveMetaInfos(const char *target
|
||||||
return SaveStateDescriptor();
|
return SaveStateDescriptor();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BbvsMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
bool BbvsMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
||||||
if (desc) {
|
if (desc) {
|
||||||
*engine = new Bbvs::BbvsEngine(syst, desc);
|
*engine = new Bbvs::BbvsEngine(syst, desc);
|
||||||
}
|
}
|
||||||
|
@ -129,7 +129,7 @@ bool BbvsMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const
|
||||||
}
|
}
|
||||||
|
|
||||||
#if PLUGIN_ENABLED_DYNAMIC(BBVS)
|
#if PLUGIN_ENABLED_DYNAMIC(BBVS)
|
||||||
REGISTER_PLUGIN_DYNAMIC(BBVS, PLUGIN_TYPE_ENGINE, BbvsMetaEngineConnect);
|
REGISTER_PLUGIN_DYNAMIC(BBVS, PLUGIN_TYPE_ENGINE, BbvsMetaEngine);
|
||||||
#else
|
#else
|
||||||
REGISTER_PLUGIN_STATIC(BBVS, PLUGIN_TYPE_ENGINE, BbvsMetaEngineConnect);
|
REGISTER_PLUGIN_STATIC(BBVS, PLUGIN_TYPE_ENGINE, BbvsMetaEngine);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -92,32 +92,32 @@ static const ADExtraGuiOptionsMap optionsList[] = {
|
||||||
|
|
||||||
} // End of namespace BladeRunner
|
} // End of namespace BladeRunner
|
||||||
|
|
||||||
class BladeRunnerMetaEngine : public AdvancedMetaEngine {
|
class BladeRunnerMetaEngineStatic : public AdvancedMetaEngineStatic {
|
||||||
public:
|
public:
|
||||||
BladeRunnerMetaEngine();
|
BladeRunnerMetaEngineStatic();
|
||||||
|
|
||||||
const char *getEngineId() const override;
|
const char *getEngineId() const override;
|
||||||
const char *getName() const override;
|
const char *getName() const override;
|
||||||
const char *getOriginalCopyright() const override;
|
const char *getOriginalCopyright() const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
BladeRunnerMetaEngine::BladeRunnerMetaEngine()
|
BladeRunnerMetaEngineStatic::BladeRunnerMetaEngineStatic()
|
||||||
: AdvancedMetaEngine(
|
: AdvancedMetaEngineStatic(
|
||||||
BladeRunner::gameDescriptions,
|
BladeRunner::gameDescriptions,
|
||||||
sizeof(BladeRunner::gameDescriptions[0]),
|
sizeof(BladeRunner::gameDescriptions[0]),
|
||||||
BladeRunner::bladeRunnerGames,
|
BladeRunner::bladeRunnerGames,
|
||||||
BladeRunner::optionsList) {}
|
BladeRunner::optionsList) {}
|
||||||
|
|
||||||
const char *BladeRunnerMetaEngine::getEngineId() const {
|
const char *BladeRunnerMetaEngineStatic::getEngineId() const {
|
||||||
return "bladerunner";
|
return "bladerunner";
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *BladeRunnerMetaEngine::getName() const {
|
const char *BladeRunnerMetaEngineStatic::getName() const {
|
||||||
return "Blade Runner";
|
return "Blade Runner";
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *BladeRunnerMetaEngine::getOriginalCopyright() const {
|
const char *BladeRunnerMetaEngineStatic::getOriginalCopyright() const {
|
||||||
return "Blade Runner (C) 1997 Westwood Studios";
|
return "Blade Runner (C) 1997 Westwood Studios";
|
||||||
}
|
}
|
||||||
|
|
||||||
REGISTER_PLUGIN_STATIC(BLADERUNNER_DETECTION, PLUGIN_TYPE_METAENGINE, BladeRunnerMetaEngine);
|
REGISTER_PLUGIN_STATIC(BLADERUNNER_DETECTION, PLUGIN_TYPE_METAENGINE, BladeRunnerMetaEngineStatic);
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
#include "engines/advancedDetector.h"
|
#include "engines/advancedDetector.h"
|
||||||
|
|
||||||
class BladeRunnerMetaEngineConnect : public AdvancedMetaEngineConnect {
|
class BladeRunnerMetaEngine : public AdvancedMetaEngine {
|
||||||
public:
|
public:
|
||||||
const char *getName() const override;
|
const char *getName() const override;
|
||||||
|
|
||||||
|
@ -45,17 +45,17 @@ public:
|
||||||
SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const override;
|
SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
const char *BladeRunnerMetaEngineConnect::getName() const {
|
const char *BladeRunnerMetaEngine::getName() const {
|
||||||
return "bladerunner";
|
return "bladerunner";
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BladeRunnerMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
bool BladeRunnerMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
||||||
*engine = new BladeRunner::BladeRunnerEngine(syst, desc);
|
*engine = new BladeRunner::BladeRunnerEngine(syst, desc);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BladeRunnerMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
bool BladeRunnerMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
return
|
return
|
||||||
f == kSupportsListSaves ||
|
f == kSupportsListSaves ||
|
||||||
f == kSupportsLoadingDuringStartup ||
|
f == kSupportsLoadingDuringStartup ||
|
||||||
|
@ -67,24 +67,24 @@ bool BladeRunnerMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
||||||
f == kSimpleSavesNames;
|
f == kSimpleSavesNames;
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateList BladeRunnerMetaEngineConnect::listSaves(const char *target) const {
|
SaveStateList BladeRunnerMetaEngine::listSaves(const char *target) const {
|
||||||
return BladeRunner::SaveFileManager::list(target);
|
return BladeRunner::SaveFileManager::list(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
int BladeRunnerMetaEngineConnect::getMaximumSaveSlot() const {
|
int BladeRunnerMetaEngine::getMaximumSaveSlot() const {
|
||||||
return 999;
|
return 999;
|
||||||
}
|
}
|
||||||
|
|
||||||
void BladeRunnerMetaEngineConnect::removeSaveState(const char *target, int slot) const {
|
void BladeRunnerMetaEngine::removeSaveState(const char *target, int slot) const {
|
||||||
BladeRunner::SaveFileManager::remove(target, slot);
|
BladeRunner::SaveFileManager::remove(target, slot);
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateDescriptor BladeRunnerMetaEngineConnect::querySaveMetaInfos(const char *target, int slot) const {
|
SaveStateDescriptor BladeRunnerMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
|
||||||
return BladeRunner::SaveFileManager::queryMetaInfos(target, slot);
|
return BladeRunner::SaveFileManager::queryMetaInfos(target, slot);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if PLUGIN_ENABLED_DYNAMIC(BLADERUNNER)
|
#if PLUGIN_ENABLED_DYNAMIC(BLADERUNNER)
|
||||||
REGISTER_PLUGIN_DYNAMIC(BLADERUNNER, PLUGIN_TYPE_ENGINE, BladeRunnerMetaEngineConnect);
|
REGISTER_PLUGIN_DYNAMIC(BLADERUNNER, PLUGIN_TYPE_ENGINE, BladeRunnerMetaEngine);
|
||||||
#else
|
#else
|
||||||
REGISTER_PLUGIN_STATIC(BLADERUNNER, PLUGIN_TYPE_ENGINE, BladeRunnerMetaEngineConnect);
|
REGISTER_PLUGIN_STATIC(BLADERUNNER, PLUGIN_TYPE_ENGINE, BladeRunnerMetaEngine);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -120,9 +120,9 @@ static const ADExtraGuiOptionsMap optionsList[] = {
|
||||||
AD_EXTRA_GUI_OPTIONS_TERMINATOR
|
AD_EXTRA_GUI_OPTIONS_TERMINATOR
|
||||||
};
|
};
|
||||||
|
|
||||||
class CGEMetaEngine : public AdvancedMetaEngine {
|
class CGEMetaEngineStatic : public AdvancedMetaEngineStatic {
|
||||||
public:
|
public:
|
||||||
CGEMetaEngine() : AdvancedMetaEngine(CGE::gameDescriptions, sizeof(ADGameDescription), CGEGames, optionsList) {
|
CGEMetaEngineStatic() : AdvancedMetaEngineStatic(CGE::gameDescriptions, sizeof(ADGameDescription), CGEGames, optionsList) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *getEngineId() const override {
|
const char *getEngineId() const override {
|
||||||
|
@ -155,19 +155,19 @@ static const ADFileBasedFallback fileBasedFallback[] = {
|
||||||
{ 0, { 0 } }
|
{ 0, { 0 } }
|
||||||
};
|
};
|
||||||
|
|
||||||
ADDetectedGame CGEMetaEngine::fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const {
|
ADDetectedGame CGEMetaEngineStatic::fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const {
|
||||||
ADDetectedGame game = detectGameFilebased(allFiles, CGE::fileBasedFallback);
|
ADDetectedGame game = detectGameFilebased(allFiles, CGE::fileBasedFallback);
|
||||||
|
|
||||||
if (!game.desc)
|
if (!game.desc)
|
||||||
return ADDetectedGame();
|
return ADDetectedGame();
|
||||||
|
|
||||||
SearchMan.addDirectory("CGEMetaEngine::fallbackDetect", fslist.begin()->getParent());
|
SearchMan.addDirectory("CGEMetaEngineStatic::fallbackDetect", fslist.begin()->getParent());
|
||||||
ResourceManager *resman;
|
ResourceManager *resman;
|
||||||
resman = new ResourceManager();
|
resman = new ResourceManager();
|
||||||
bool sayFileFound = resman->exist("CGE.SAY");
|
bool sayFileFound = resman->exist("CGE.SAY");
|
||||||
delete resman;
|
delete resman;
|
||||||
|
|
||||||
SearchMan.remove("CGEMetaEngine::fallbackDetect");
|
SearchMan.remove("CGEMetaEngineStatic::fallbackDetect");
|
||||||
|
|
||||||
if (!sayFileFound)
|
if (!sayFileFound)
|
||||||
return ADDetectedGame();
|
return ADDetectedGame();
|
||||||
|
@ -177,4 +177,4 @@ ADDetectedGame CGEMetaEngine::fallbackDetect(const FileMap &allFiles, const Comm
|
||||||
|
|
||||||
} // End of namespace CGE
|
} // End of namespace CGE
|
||||||
|
|
||||||
REGISTER_PLUGIN_STATIC(CGE_DETECTION, PLUGIN_TYPE_METAENGINE, CGE::CGEMetaEngine);
|
REGISTER_PLUGIN_STATIC(CGE_DETECTION, PLUGIN_TYPE_METAENGINE, CGE::CGEMetaEngineStatic);
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
|
|
||||||
namespace CGE {
|
namespace CGE {
|
||||||
|
|
||||||
class CGEMetaEngineConnect : public AdvancedMetaEngineConnect {
|
class CGEMetaEngine : public AdvancedMetaEngine {
|
||||||
public:
|
public:
|
||||||
const char *getName() const override {
|
const char *getName() const override {
|
||||||
return "cge";
|
return "cge";
|
||||||
|
@ -47,7 +47,7 @@ public:
|
||||||
void removeSaveState(const char *target, int slot) const override;
|
void removeSaveState(const char *target, int slot) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool CGEMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
bool CGEMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
return
|
return
|
||||||
(f == kSupportsListSaves) ||
|
(f == kSupportsListSaves) ||
|
||||||
(f == kSupportsLoadingDuringStartup) ||
|
(f == kSupportsLoadingDuringStartup) ||
|
||||||
|
@ -59,16 +59,16 @@ bool CGEMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
||||||
(f == kSimpleSavesNames);
|
(f == kSimpleSavesNames);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGEMetaEngineConnect::removeSaveState(const char *target, int slot) const {
|
void CGEMetaEngine::removeSaveState(const char *target, int slot) const {
|
||||||
Common::String fileName = Common::String::format("%s.%03d", target, slot);
|
Common::String fileName = Common::String::format("%s.%03d", target, slot);
|
||||||
g_system->getSavefileManager()->removeSavefile(fileName);
|
g_system->getSavefileManager()->removeSavefile(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
int CGEMetaEngineConnect::getMaximumSaveSlot() const {
|
int CGEMetaEngine::getMaximumSaveSlot() const {
|
||||||
return 99;
|
return 99;
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateList CGEMetaEngineConnect::listSaves(const char *target) const {
|
SaveStateList CGEMetaEngine::listSaves(const char *target) const {
|
||||||
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
||||||
Common::StringArray filenames;
|
Common::StringArray filenames;
|
||||||
Common::String pattern = target;
|
Common::String pattern = target;
|
||||||
|
@ -111,7 +111,7 @@ SaveStateList CGEMetaEngineConnect::listSaves(const char *target) const {
|
||||||
return saveList;
|
return saveList;
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateDescriptor CGEMetaEngineConnect::querySaveMetaInfos(const char *target, int slot) const {
|
SaveStateDescriptor CGEMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
|
||||||
Common::String fileName = Common::String::format("%s.%03d", target, slot);
|
Common::String fileName = Common::String::format("%s.%03d", target, slot);
|
||||||
Common::InSaveFile *f = g_system->getSavefileManager()->openForLoading(fileName);
|
Common::InSaveFile *f = g_system->getSavefileManager()->openForLoading(fileName);
|
||||||
|
|
||||||
|
@ -153,7 +153,7 @@ SaveStateDescriptor CGEMetaEngineConnect::querySaveMetaInfos(const char *target,
|
||||||
return SaveStateDescriptor();
|
return SaveStateDescriptor();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CGEMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
bool CGEMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
||||||
if (desc) {
|
if (desc) {
|
||||||
*engine = new CGE::CGEEngine(syst, desc);
|
*engine = new CGE::CGEEngine(syst, desc);
|
||||||
}
|
}
|
||||||
|
@ -163,7 +163,7 @@ bool CGEMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const
|
||||||
} // End of namespace CGE
|
} // End of namespace CGE
|
||||||
|
|
||||||
#if PLUGIN_ENABLED_DYNAMIC(CGE)
|
#if PLUGIN_ENABLED_DYNAMIC(CGE)
|
||||||
REGISTER_PLUGIN_DYNAMIC(CGE, PLUGIN_TYPE_ENGINE, CGE::CGEMetaEngineConnect);
|
REGISTER_PLUGIN_DYNAMIC(CGE, PLUGIN_TYPE_ENGINE, CGE::CGEMetaEngine);
|
||||||
#else
|
#else
|
||||||
REGISTER_PLUGIN_STATIC(CGE, PLUGIN_TYPE_ENGINE, CGE::CGEMetaEngineConnect);
|
REGISTER_PLUGIN_STATIC(CGE, PLUGIN_TYPE_ENGINE, CGE::CGEMetaEngine);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -116,9 +116,9 @@ static const ADExtraGuiOptionsMap optionsList[] = {
|
||||||
AD_EXTRA_GUI_OPTIONS_TERMINATOR
|
AD_EXTRA_GUI_OPTIONS_TERMINATOR
|
||||||
};
|
};
|
||||||
|
|
||||||
class CGE2MetaEngine : public AdvancedMetaEngine {
|
class CGE2MetaEngineStatic : public AdvancedMetaEngineStatic {
|
||||||
public:
|
public:
|
||||||
CGE2MetaEngine() : AdvancedMetaEngine(gameDescriptions, sizeof(ADGameDescription), CGE2Games, optionsList) {
|
CGE2MetaEngineStatic() : AdvancedMetaEngineStatic(gameDescriptions, sizeof(ADGameDescription), CGE2Games, optionsList) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *getEngineId() const override {
|
const char *getEngineId() const override {
|
||||||
|
@ -153,19 +153,19 @@ static const ADFileBasedFallback fileBasedFallback[] = {
|
||||||
|
|
||||||
// This fallback detection looks identical to the one used for CGE. In fact, the difference resides
|
// This fallback detection looks identical to the one used for CGE. In fact, the difference resides
|
||||||
// in the ResourceManager which handles a different archive format. The rest of the detection is identical.
|
// in the ResourceManager which handles a different archive format. The rest of the detection is identical.
|
||||||
ADDetectedGame CGE2MetaEngine::fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const {
|
ADDetectedGame CGE2MetaEngineStatic::fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const {
|
||||||
ADDetectedGame game = detectGameFilebased(allFiles, CGE2::fileBasedFallback);
|
ADDetectedGame game = detectGameFilebased(allFiles, CGE2::fileBasedFallback);
|
||||||
|
|
||||||
if (!game.desc)
|
if (!game.desc)
|
||||||
return ADDetectedGame();
|
return ADDetectedGame();
|
||||||
|
|
||||||
SearchMan.addDirectory("CGE2MetaEngine::fallbackDetect", fslist.begin()->getParent());
|
SearchMan.addDirectory("CGE2MetaEngineStatic::fallbackDetect", fslist.begin()->getParent());
|
||||||
ResourceManager *resman;
|
ResourceManager *resman;
|
||||||
resman = new ResourceManager();
|
resman = new ResourceManager();
|
||||||
bool sayFileFound = resman->exist("CGE.SAY");
|
bool sayFileFound = resman->exist("CGE.SAY");
|
||||||
delete resman;
|
delete resman;
|
||||||
|
|
||||||
SearchMan.remove("CGE2MetaEngine::fallbackDetect");
|
SearchMan.remove("CGE2MetaEngineStatic::fallbackDetect");
|
||||||
|
|
||||||
if (!sayFileFound)
|
if (!sayFileFound)
|
||||||
return ADDetectedGame();
|
return ADDetectedGame();
|
||||||
|
@ -175,4 +175,4 @@ ADDetectedGame CGE2MetaEngine::fallbackDetect(const FileMap &allFiles, const Com
|
||||||
|
|
||||||
} // End of namespace CGE2
|
} // End of namespace CGE2
|
||||||
|
|
||||||
REGISTER_PLUGIN_STATIC(CGE2_DETECTION, PLUGIN_TYPE_METAENGINE, CGE2::CGE2MetaEngine);
|
REGISTER_PLUGIN_STATIC(CGE2_DETECTION, PLUGIN_TYPE_METAENGINE, CGE2::CGE2MetaEngineStatic);
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
|
|
||||||
namespace CGE2 {
|
namespace CGE2 {
|
||||||
|
|
||||||
class CGE2MetaEngineConnect : public AdvancedMetaEngineConnect {
|
class CGE2MetaEngine : public AdvancedMetaEngine {
|
||||||
public:
|
public:
|
||||||
const char *getName() const override {
|
const char *getName() const override {
|
||||||
return "cge2";
|
return "cge2";
|
||||||
|
@ -47,14 +47,14 @@ public:
|
||||||
void removeSaveState(const char *target, int slot) const override;
|
void removeSaveState(const char *target, int slot) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool CGE2MetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
bool CGE2MetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
||||||
if (desc)
|
if (desc)
|
||||||
*engine = new CGE2::CGE2Engine(syst, desc);
|
*engine = new CGE2::CGE2Engine(syst, desc);
|
||||||
|
|
||||||
return desc != 0;
|
return desc != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CGE2MetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
bool CGE2MetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
return
|
return
|
||||||
(f == kSupportsDeleteSave) ||
|
(f == kSupportsDeleteSave) ||
|
||||||
(f == kSavesSupportMetaInfo) ||
|
(f == kSavesSupportMetaInfo) ||
|
||||||
|
@ -66,11 +66,11 @@ bool CGE2MetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
||||||
(f == kSimpleSavesNames);
|
(f == kSimpleSavesNames);
|
||||||
}
|
}
|
||||||
|
|
||||||
int CGE2MetaEngineConnect::getMaximumSaveSlot() const {
|
int CGE2MetaEngine::getMaximumSaveSlot() const {
|
||||||
return 99;
|
return 99;
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateList CGE2MetaEngineConnect::listSaves(const char *target) const {
|
SaveStateList CGE2MetaEngine::listSaves(const char *target) const {
|
||||||
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
||||||
Common::StringArray filenames;
|
Common::StringArray filenames;
|
||||||
Common::String pattern = target;
|
Common::String pattern = target;
|
||||||
|
@ -113,7 +113,7 @@ SaveStateList CGE2MetaEngineConnect::listSaves(const char *target) const {
|
||||||
return saveList;
|
return saveList;
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateDescriptor CGE2MetaEngineConnect::querySaveMetaInfos(const char *target, int slot) const {
|
SaveStateDescriptor CGE2MetaEngine::querySaveMetaInfos(const char *target, int slot) const {
|
||||||
Common::String fileName = Common::String::format("%s.%03d", target, slot);
|
Common::String fileName = Common::String::format("%s.%03d", target, slot);
|
||||||
Common::InSaveFile *f = g_system->getSavefileManager()->openForLoading(fileName);
|
Common::InSaveFile *f = g_system->getSavefileManager()->openForLoading(fileName);
|
||||||
|
|
||||||
|
@ -155,7 +155,7 @@ SaveStateDescriptor CGE2MetaEngineConnect::querySaveMetaInfos(const char *target
|
||||||
return SaveStateDescriptor();
|
return SaveStateDescriptor();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGE2MetaEngineConnect::removeSaveState(const char *target, int slot) const {
|
void CGE2MetaEngine::removeSaveState(const char *target, int slot) const {
|
||||||
Common::String fileName = Common::String::format("%s.%03d", target, slot);
|
Common::String fileName = Common::String::format("%s.%03d", target, slot);
|
||||||
g_system->getSavefileManager()->removeSavefile(fileName);
|
g_system->getSavefileManager()->removeSavefile(fileName);
|
||||||
}
|
}
|
||||||
|
@ -163,7 +163,7 @@ void CGE2MetaEngineConnect::removeSaveState(const char *target, int slot) const
|
||||||
} // End of namespace CGE2
|
} // End of namespace CGE2
|
||||||
|
|
||||||
#if PLUGIN_ENABLED_DYNAMIC(CGE2)
|
#if PLUGIN_ENABLED_DYNAMIC(CGE2)
|
||||||
REGISTER_PLUGIN_DYNAMIC(CGE2, PLUGIN_TYPE_ENGINE, CGE2::CGE2MetaEngineConnect);
|
REGISTER_PLUGIN_DYNAMIC(CGE2, PLUGIN_TYPE_ENGINE, CGE2::CGE2MetaEngine);
|
||||||
#else
|
#else
|
||||||
REGISTER_PLUGIN_STATIC(CGE2, PLUGIN_TYPE_ENGINE, CGE2::CGE2MetaEngineConnect);
|
REGISTER_PLUGIN_STATIC(CGE2, PLUGIN_TYPE_ENGINE, CGE2::CGE2MetaEngine);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -90,9 +90,9 @@ static const ChewyGameDescription gameDescriptions[] = {
|
||||||
|
|
||||||
} // End of namespace Chewy
|
} // End of namespace Chewy
|
||||||
|
|
||||||
class ChewyMetaEngine : public AdvancedMetaEngine {
|
class ChewyMetaEngineStatic : public AdvancedMetaEngineStatic {
|
||||||
public:
|
public:
|
||||||
ChewyMetaEngine() : AdvancedMetaEngine(Chewy::gameDescriptions, sizeof(Chewy::ChewyGameDescription), chewyGames) {
|
ChewyMetaEngineStatic() : AdvancedMetaEngineStatic(Chewy::gameDescriptions, sizeof(Chewy::ChewyGameDescription), chewyGames) {
|
||||||
_maxScanDepth = 2;
|
_maxScanDepth = 2;
|
||||||
_directoryGlobs = directoryGlobs;
|
_directoryGlobs = directoryGlobs;
|
||||||
}
|
}
|
||||||
|
@ -110,4 +110,4 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
REGISTER_PLUGIN_STATIC(CHEWY_DETECTION, PLUGIN_TYPE_METAENGINE, ChewyMetaEngine);
|
REGISTER_PLUGIN_STATIC(CHEWY_DETECTION, PLUGIN_TYPE_METAENGINE, ChewyMetaEngineStatic);
|
||||||
|
|
|
@ -41,7 +41,7 @@ Common::Language ChewyEngine::getLanguage() const {
|
||||||
|
|
||||||
} // End of namespace Chewy
|
} // End of namespace Chewy
|
||||||
|
|
||||||
class ChewyMetaEngineConnect : public AdvancedMetaEngineConnect {
|
class ChewyMetaEngine : public AdvancedMetaEngine {
|
||||||
public:
|
public:
|
||||||
const char *getName() const override {
|
const char *getName() const override {
|
||||||
return "chewy";
|
return "chewy";
|
||||||
|
@ -56,7 +56,7 @@ public:
|
||||||
SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const override;
|
SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool ChewyMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
bool ChewyMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
return
|
return
|
||||||
(f == kSupportsListSaves) ||
|
(f == kSupportsListSaves) ||
|
||||||
(f == kSupportsLoadingDuringStartup) ||
|
(f == kSupportsLoadingDuringStartup) ||
|
||||||
|
@ -74,7 +74,7 @@ bool Chewy::ChewyEngine::hasFeature(EngineFeature f) const {
|
||||||
(f == kSupportsSavingDuringRuntime);
|
(f == kSupportsSavingDuringRuntime);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ChewyMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
bool ChewyMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
||||||
const Chewy::ChewyGameDescription *gd = (const Chewy::ChewyGameDescription *)desc;
|
const Chewy::ChewyGameDescription *gd = (const Chewy::ChewyGameDescription *)desc;
|
||||||
if (gd) {
|
if (gd) {
|
||||||
*engine = new Chewy::ChewyEngine(syst, gd);
|
*engine = new Chewy::ChewyEngine(syst, gd);
|
||||||
|
@ -82,25 +82,25 @@ bool ChewyMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, cons
|
||||||
return gd != 0;
|
return gd != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateList ChewyMetaEngineConnect::listSaves(const char *target) const {
|
SaveStateList ChewyMetaEngine::listSaves(const char *target) const {
|
||||||
SaveStateList saveList;
|
SaveStateList saveList;
|
||||||
|
|
||||||
return saveList;
|
return saveList;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ChewyMetaEngineConnect::getMaximumSaveSlot() const {
|
int ChewyMetaEngine::getMaximumSaveSlot() const {
|
||||||
return 999;
|
return 999;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChewyMetaEngineConnect::removeSaveState(const char *target, int slot) const {
|
void ChewyMetaEngine::removeSaveState(const char *target, int slot) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateDescriptor ChewyMetaEngineConnect::querySaveMetaInfos(const char *target, int slot) const {
|
SaveStateDescriptor ChewyMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
|
||||||
return SaveStateDescriptor();
|
return SaveStateDescriptor();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if PLUGIN_ENABLED_DYNAMIC(CHEWY)
|
#if PLUGIN_ENABLED_DYNAMIC(CHEWY)
|
||||||
REGISTER_PLUGIN_DYNAMIC(CHEWY, PLUGIN_TYPE_ENGINE, ChewyMetaEngineConnect);
|
REGISTER_PLUGIN_DYNAMIC(CHEWY, PLUGIN_TYPE_ENGINE, ChewyMetaEngine);
|
||||||
#else
|
#else
|
||||||
REGISTER_PLUGIN_STATIC(CHEWY, PLUGIN_TYPE_ENGINE, ChewyMetaEngineConnect);
|
REGISTER_PLUGIN_STATIC(CHEWY, PLUGIN_TYPE_ENGINE, ChewyMetaEngine);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -59,9 +59,9 @@ static const ADExtraGuiOptionsMap optionsList[] = {
|
||||||
AD_EXTRA_GUI_OPTIONS_TERMINATOR
|
AD_EXTRA_GUI_OPTIONS_TERMINATOR
|
||||||
};
|
};
|
||||||
|
|
||||||
class CineMetaEngine : public AdvancedMetaEngine {
|
class CineMetaEngineStatic : public AdvancedMetaEngineStatic {
|
||||||
public:
|
public:
|
||||||
CineMetaEngine() : AdvancedMetaEngine(Cine::gameDescriptions, sizeof(Cine::CINEGameDescription), cineGames, optionsList) {
|
CineMetaEngineStatic() : AdvancedMetaEngineStatic(Cine::gameDescriptions, sizeof(Cine::CINEGameDescription), cineGames, optionsList) {
|
||||||
_guiOptions = GUIO3(GUIO_NOSPEECH, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_TRANSPARENT_DIALOG_BOXES);
|
_guiOptions = GUIO3(GUIO_NOSPEECH, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_TRANSPARENT_DIALOG_BOXES);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,4 +78,4 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
REGISTER_PLUGIN_STATIC(CINE_DETECTION, PLUGIN_TYPE_METAENGINE, CineMetaEngine);
|
REGISTER_PLUGIN_STATIC(CINE_DETECTION, PLUGIN_TYPE_METAENGINE, CineMetaEngineStatic);
|
||||||
|
|
|
@ -48,14 +48,14 @@ Common::Platform CineEngine::getPlatform() const { return _gameDescription->desc
|
||||||
|
|
||||||
} // End of namespace Cine
|
} // End of namespace Cine
|
||||||
|
|
||||||
class CineMetaEngineConnect : public AdvancedMetaEngineConnect {
|
class CineMetaEngine : public AdvancedMetaEngine {
|
||||||
public:
|
public:
|
||||||
const char *getName() const override {
|
const char *getName() const override {
|
||||||
return "cine";
|
return "cine";
|
||||||
}
|
}
|
||||||
|
|
||||||
Common::Error createInstance(OSystem *syst, Engine **engine) const override {
|
Common::Error createInstance(OSystem *syst, Engine **engine) const override {
|
||||||
return AdvancedMetaEngineConnect::createInstance(syst, engine);
|
return AdvancedMetaEngine::createInstance(syst, engine);
|
||||||
}
|
}
|
||||||
bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
|
bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ public:
|
||||||
SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const override;
|
SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool CineMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
bool CineMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
return
|
return
|
||||||
(f == kSupportsListSaves) ||
|
(f == kSupportsListSaves) ||
|
||||||
(f == kSupportsLoadingDuringStartup) ||
|
(f == kSupportsLoadingDuringStartup) ||
|
||||||
|
@ -86,7 +86,7 @@ bool Cine::CineEngine::hasFeature(EngineFeature f) const {
|
||||||
(f == kSupportsSavingDuringRuntime);
|
(f == kSupportsSavingDuringRuntime);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CineMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
bool CineMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
||||||
const Cine::CINEGameDescription *gd = (const Cine::CINEGameDescription *)desc;
|
const Cine::CINEGameDescription *gd = (const Cine::CINEGameDescription *)desc;
|
||||||
if (gd) {
|
if (gd) {
|
||||||
*engine = new Cine::CineEngine(syst, gd);
|
*engine = new Cine::CineEngine(syst, gd);
|
||||||
|
@ -94,7 +94,7 @@ bool CineMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const
|
||||||
return gd != 0;
|
return gd != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateList CineMetaEngineConnect::listSaves(const char *target) const {
|
SaveStateList CineMetaEngine::listSaves(const char *target) const {
|
||||||
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
||||||
SaveStateList saveList;
|
SaveStateList saveList;
|
||||||
|
|
||||||
|
@ -170,13 +170,13 @@ SaveStateList CineMetaEngineConnect::listSaves(const char *target) const {
|
||||||
return saveList;
|
return saveList;
|
||||||
}
|
}
|
||||||
|
|
||||||
int CineMetaEngineConnect::getMaximumSaveSlot() const { return MAX_SAVEGAMES - 1; }
|
int CineMetaEngine::getMaximumSaveSlot() const { return MAX_SAVEGAMES - 1; }
|
||||||
|
|
||||||
Common::String CineMetaEngineConnect::getSavegameFile(int saveGameIdx, const char *target) const {
|
Common::String CineMetaEngine::getSavegameFile(int saveGameIdx, const char *target) const {
|
||||||
return Common::String::format("%s.%d", target == nullptr ? getEngineId() : target, saveGameIdx);
|
return Common::String::format("%s.%d", target == nullptr ? getEngineId() : target, saveGameIdx);
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateDescriptor CineMetaEngineConnect::querySaveMetaInfos(const char *target, int slot) const {
|
SaveStateDescriptor CineMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
|
||||||
if (slot < 0 || slot > getMaximumSaveSlot()) {
|
if (slot < 0 || slot > getMaximumSaveSlot()) {
|
||||||
// HACK: Try to make SaveLoadChooserGrid::open() not use save slot
|
// HACK: Try to make SaveLoadChooserGrid::open() not use save slot
|
||||||
// numbers over the maximum save slot number for "New save".
|
// numbers over the maximum save slot number for "New save".
|
||||||
|
@ -239,7 +239,7 @@ SaveStateDescriptor CineMetaEngineConnect::querySaveMetaInfos(const char *target
|
||||||
return SaveStateDescriptor();
|
return SaveStateDescriptor();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CineMetaEngineConnect::removeSaveState(const char *target, int slot) const {
|
void CineMetaEngine::removeSaveState(const char *target, int slot) const {
|
||||||
if (slot < 0 || slot >= MAX_SAVEGAMES) {
|
if (slot < 0 || slot >= MAX_SAVEGAMES) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -285,9 +285,9 @@ void CineMetaEngineConnect::removeSaveState(const char *target, int slot) const
|
||||||
}
|
}
|
||||||
|
|
||||||
#if PLUGIN_ENABLED_DYNAMIC(CINE)
|
#if PLUGIN_ENABLED_DYNAMIC(CINE)
|
||||||
REGISTER_PLUGIN_DYNAMIC(CINE, PLUGIN_TYPE_ENGINE, CineMetaEngineConnect);
|
REGISTER_PLUGIN_DYNAMIC(CINE, PLUGIN_TYPE_ENGINE, CineMetaEngine);
|
||||||
#else
|
#else
|
||||||
REGISTER_PLUGIN_STATIC(CINE, PLUGIN_TYPE_ENGINE, CineMetaEngineConnect);
|
REGISTER_PLUGIN_STATIC(CINE, PLUGIN_TYPE_ENGINE, CineMetaEngine);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace Cine {
|
namespace Cine {
|
||||||
|
|
|
@ -879,7 +879,7 @@ bool CineEngine::makeLoad(const Common::String &saveName) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ExtendedSavegameHeader header;
|
ExtendedSavegameHeader header;
|
||||||
if (MetaEngineConnect::readSavegameHeader(saveFile.get(), &header)) {
|
if (MetaEngine::readSavegameHeader(saveFile.get(), &header)) {
|
||||||
setTotalPlayTime(header.playtime * 1000); // Seconds to milliseconds
|
setTotalPlayTime(header.playtime * 1000); // Seconds to milliseconds
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1030,7 +1030,7 @@ void CineEngine::makeSave(const Common::String &saveFileName, uint32 playtime,
|
||||||
renderer->popSavedBackBuffer(BEFORE_OPENING_MENU);
|
renderer->popSavedBackBuffer(BEFORE_OPENING_MENU);
|
||||||
}
|
}
|
||||||
|
|
||||||
MetaEngineConnect::appendExtendedSave(fHandle.get(), playtime, desc, isAutosave);
|
MetaEngine::appendExtendedSave(fHandle.get(), playtime, desc, isAutosave);
|
||||||
|
|
||||||
renderer->restoreSavedBackBuffer(BEFORE_TAKING_THUMBNAIL);
|
renderer->restoreSavedBackBuffer(BEFORE_TAKING_THUMBNAIL);
|
||||||
|
|
||||||
|
|
|
@ -52,9 +52,9 @@ static const char *directoryGlobs[] = {
|
||||||
0
|
0
|
||||||
};
|
};
|
||||||
|
|
||||||
class ComposerMetaEngine : public AdvancedMetaEngine {
|
class ComposerMetaEngineStatic : public AdvancedMetaEngineStatic {
|
||||||
public:
|
public:
|
||||||
ComposerMetaEngine() : AdvancedMetaEngine(Composer::gameDescriptions, sizeof(Composer::ComposerGameDescription), composerGames) {
|
ComposerMetaEngineStatic() : AdvancedMetaEngineStatic(Composer::gameDescriptions, sizeof(Composer::ComposerGameDescription), composerGames) {
|
||||||
_maxScanDepth = 2;
|
_maxScanDepth = 2;
|
||||||
_directoryGlobs = directoryGlobs;
|
_directoryGlobs = directoryGlobs;
|
||||||
}
|
}
|
||||||
|
@ -72,4 +72,4 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
REGISTER_PLUGIN_STATIC(COMPOSER_DETECTION, PLUGIN_TYPE_METAENGINE, ComposerMetaEngine);
|
REGISTER_PLUGIN_STATIC(COMPOSER_DETECTION, PLUGIN_TYPE_METAENGINE, ComposerMetaEngineStatic);
|
||||||
|
|
|
@ -65,7 +65,7 @@ bool ComposerEngine::loadDetectedConfigFile(Common::INIFile &configFile) const {
|
||||||
|
|
||||||
} // End of namespace Composer
|
} // End of namespace Composer
|
||||||
|
|
||||||
class ComposerMetaEngineConnect : public AdvancedMetaEngineConnect {
|
class ComposerMetaEngine : public AdvancedMetaEngine {
|
||||||
public:
|
public:
|
||||||
const char *getName() const override {
|
const char *getName() const override {
|
||||||
return "composer";
|
return "composer";
|
||||||
|
@ -78,7 +78,7 @@ public:
|
||||||
SaveStateList listSaves(const char* target) const override;
|
SaveStateList listSaves(const char* target) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool ComposerMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
bool ComposerMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
||||||
const Composer::ComposerGameDescription *gd = (const Composer::ComposerGameDescription *)desc;
|
const Composer::ComposerGameDescription *gd = (const Composer::ComposerGameDescription *)desc;
|
||||||
if (gd) {
|
if (gd) {
|
||||||
*engine = new Composer::ComposerEngine(syst, gd);
|
*engine = new Composer::ComposerEngine(syst, gd);
|
||||||
|
@ -86,7 +86,7 @@ bool ComposerMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, c
|
||||||
return gd != 0;
|
return gd != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ComposerMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
bool ComposerMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
return ((f == kSupportsListSaves) || (f == kSupportsLoadingDuringStartup));
|
return ((f == kSupportsListSaves) || (f == kSupportsLoadingDuringStartup));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,10 +99,10 @@ Common::String getSaveName(Common::InSaveFile *in) {
|
||||||
ser.syncString(name);
|
ser.syncString(name);
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
int ComposerMetaEngineConnect::getMaximumSaveSlot() const {
|
int ComposerMetaEngine::getMaximumSaveSlot() const {
|
||||||
return 99;
|
return 99;
|
||||||
}
|
}
|
||||||
SaveStateList ComposerMetaEngineConnect::listSaves(const char *target) const {
|
SaveStateList ComposerMetaEngine::listSaves(const char *target) const {
|
||||||
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
||||||
Common::StringArray filenames;
|
Common::StringArray filenames;
|
||||||
Common::String saveDesc;
|
Common::String saveDesc;
|
||||||
|
@ -136,7 +136,7 @@ bool Composer::ComposerEngine::hasFeature(EngineFeature f) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
#if PLUGIN_ENABLED_DYNAMIC(COMPOSER)
|
#if PLUGIN_ENABLED_DYNAMIC(COMPOSER)
|
||||||
REGISTER_PLUGIN_DYNAMIC(COMPOSER, PLUGIN_TYPE_ENGINE, ComposerMetaEngineConnect);
|
REGISTER_PLUGIN_DYNAMIC(COMPOSER, PLUGIN_TYPE_ENGINE, ComposerMetaEngine);
|
||||||
#else
|
#else
|
||||||
REGISTER_PLUGIN_STATIC(COMPOSER, PLUGIN_TYPE_ENGINE, ComposerMetaEngineConnect);
|
REGISTER_PLUGIN_STATIC(COMPOSER, PLUGIN_TYPE_ENGINE, ComposerMetaEngine);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -170,9 +170,9 @@ static const CRUISEGameDescription gameDescriptions[] = {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class CruiseMetaEngine : public AdvancedMetaEngine {
|
class CruiseMetaEngineStatic : public AdvancedMetaEngineStatic {
|
||||||
public:
|
public:
|
||||||
CruiseMetaEngine() : AdvancedMetaEngine(Cruise::gameDescriptions, sizeof(Cruise::CRUISEGameDescription), cruiseGames) {
|
CruiseMetaEngineStatic() : AdvancedMetaEngineStatic(Cruise::gameDescriptions, sizeof(Cruise::CRUISEGameDescription), cruiseGames) {
|
||||||
_guiOptions = GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI);
|
_guiOptions = GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -189,4 +189,4 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
REGISTER_PLUGIN_STATIC(CRUISE_DETECTION, PLUGIN_TYPE_METAENGINE, CruiseMetaEngine);
|
REGISTER_PLUGIN_STATIC(CRUISE_DETECTION, PLUGIN_TYPE_METAENGINE, CruiseMetaEngineStatic);
|
||||||
|
|
|
@ -44,7 +44,7 @@ Common::Platform CruiseEngine::getPlatform() const {
|
||||||
|
|
||||||
} // End of namespace Cruise
|
} // End of namespace Cruise
|
||||||
|
|
||||||
class CruiseMetaEngineConnect : public AdvancedMetaEngineConnect {
|
class CruiseMetaEngine : public AdvancedMetaEngine {
|
||||||
public:
|
public:
|
||||||
const char *getName() const override {
|
const char *getName() const override {
|
||||||
return "cruise";
|
return "cruise";
|
||||||
|
@ -59,7 +59,7 @@ public:
|
||||||
bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
|
bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool CruiseMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
bool CruiseMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
return
|
return
|
||||||
(f == kSupportsListSaves) ||
|
(f == kSupportsListSaves) ||
|
||||||
(f == kSupportsDeleteSave) ||
|
(f == kSupportsDeleteSave) ||
|
||||||
|
@ -68,7 +68,7 @@ bool CruiseMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
||||||
(f == kSupportsLoadingDuringStartup);
|
(f == kSupportsLoadingDuringStartup);
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateList CruiseMetaEngineConnect::listSaves(const char *target) const {
|
SaveStateList CruiseMetaEngine::listSaves(const char *target) const {
|
||||||
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
||||||
Common::StringArray filenames;
|
Common::StringArray filenames;
|
||||||
Common::String pattern("cruise.s##");
|
Common::String pattern("cruise.s##");
|
||||||
|
@ -96,11 +96,11 @@ SaveStateList CruiseMetaEngineConnect::listSaves(const char *target) const {
|
||||||
return saveList;
|
return saveList;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CruiseMetaEngineConnect::removeSaveState(const char *target, int slot) const {
|
void CruiseMetaEngine::removeSaveState(const char *target, int slot) const {
|
||||||
g_system->getSavefileManager()->removeSavefile(Cruise::CruiseEngine::getSavegameFile(slot));
|
g_system->getSavefileManager()->removeSavefile(Cruise::CruiseEngine::getSavegameFile(slot));
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateDescriptor CruiseMetaEngineConnect::querySaveMetaInfos(const char *target, int slot) const {
|
SaveStateDescriptor CruiseMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
|
||||||
Common::InSaveFile *f = g_system->getSavefileManager()->openForLoading(
|
Common::InSaveFile *f = g_system->getSavefileManager()->openForLoading(
|
||||||
Cruise::CruiseEngine::getSavegameFile(slot));
|
Cruise::CruiseEngine::getSavegameFile(slot));
|
||||||
|
|
||||||
|
@ -123,7 +123,7 @@ SaveStateDescriptor CruiseMetaEngineConnect::querySaveMetaInfos(const char *targ
|
||||||
return SaveStateDescriptor();
|
return SaveStateDescriptor();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CruiseMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
bool CruiseMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
||||||
const Cruise::CRUISEGameDescription *gd = (const Cruise::CRUISEGameDescription *)desc;
|
const Cruise::CRUISEGameDescription *gd = (const Cruise::CRUISEGameDescription *)desc;
|
||||||
if (gd) {
|
if (gd) {
|
||||||
*engine = new Cruise::CruiseEngine(syst, gd);
|
*engine = new Cruise::CruiseEngine(syst, gd);
|
||||||
|
@ -132,7 +132,7 @@ bool CruiseMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, con
|
||||||
}
|
}
|
||||||
|
|
||||||
#if PLUGIN_ENABLED_DYNAMIC(CRUISE)
|
#if PLUGIN_ENABLED_DYNAMIC(CRUISE)
|
||||||
REGISTER_PLUGIN_DYNAMIC(CRUISE, PLUGIN_TYPE_ENGINE, CruiseMetaEngineConnect);
|
REGISTER_PLUGIN_DYNAMIC(CRUISE, PLUGIN_TYPE_ENGINE, CruiseMetaEngine);
|
||||||
#else
|
#else
|
||||||
REGISTER_PLUGIN_STATIC(CRUISE, PLUGIN_TYPE_ENGINE, CruiseMetaEngineConnect);
|
REGISTER_PLUGIN_STATIC(CRUISE, PLUGIN_TYPE_ENGINE, CruiseMetaEngine);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -119,9 +119,9 @@ static const ADGameDescription gameDescriptions[] = {
|
||||||
|
|
||||||
} // End of namespace Cryo
|
} // End of namespace Cryo
|
||||||
|
|
||||||
class CryoMetaEngine : public AdvancedMetaEngine {
|
class CryoMetaEngineStatic : public AdvancedMetaEngineStatic {
|
||||||
public:
|
public:
|
||||||
CryoMetaEngine() : AdvancedMetaEngine(Cryo::gameDescriptions, sizeof(ADGameDescription), cryoGames) {
|
CryoMetaEngineStatic() : AdvancedMetaEngineStatic(Cryo::gameDescriptions, sizeof(ADGameDescription), cryoGames) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *getEngineId() const override {
|
const char *getEngineId() const override {
|
||||||
|
@ -137,4 +137,4 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
REGISTER_PLUGIN_STATIC(CRYO_DETECTION, PLUGIN_TYPE_METAENGINE, CryoMetaEngine);
|
REGISTER_PLUGIN_STATIC(CRYO_DETECTION, PLUGIN_TYPE_METAENGINE, CryoMetaEngineStatic);
|
||||||
|
|
|
@ -35,7 +35,7 @@ Common::Platform CryoEngine::getPlatform() const { return _gameDescription->plat
|
||||||
|
|
||||||
} // End of namespace Cryo
|
} // End of namespace Cryo
|
||||||
|
|
||||||
class CryoMetaEngineConnect : public AdvancedMetaEngineConnect {
|
class CryoMetaEngine : public AdvancedMetaEngine {
|
||||||
public:
|
public:
|
||||||
const char *getName() const override {
|
const char *getName() const override {
|
||||||
return "cryo";
|
return "cryo";
|
||||||
|
@ -45,11 +45,11 @@ public:
|
||||||
bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
|
bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool CryoMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
bool CryoMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CryoMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
bool CryoMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
||||||
if (desc) {
|
if (desc) {
|
||||||
*engine = new Cryo::CryoEngine(syst, desc);
|
*engine = new Cryo::CryoEngine(syst, desc);
|
||||||
}
|
}
|
||||||
|
@ -57,8 +57,8 @@ bool CryoMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const
|
||||||
}
|
}
|
||||||
|
|
||||||
#if PLUGIN_ENABLED_DYNAMIC(CRYO)
|
#if PLUGIN_ENABLED_DYNAMIC(CRYO)
|
||||||
REGISTER_PLUGIN_DYNAMIC(CRYO, PLUGIN_TYPE_ENGINE, CryoMetaEngineConnect);
|
REGISTER_PLUGIN_DYNAMIC(CRYO, PLUGIN_TYPE_ENGINE, CryoMetaEngine);
|
||||||
#else
|
#else
|
||||||
REGISTER_PLUGIN_STATIC(CRYO, PLUGIN_TYPE_ENGINE, CryoMetaEngineConnect);
|
REGISTER_PLUGIN_STATIC(CRYO, PLUGIN_TYPE_ENGINE, CryoMetaEngine);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -46,9 +46,9 @@ static const ADExtraGuiOptionsMap optionsList[] = {
|
||||||
AD_EXTRA_GUI_OPTIONS_TERMINATOR
|
AD_EXTRA_GUI_OPTIONS_TERMINATOR
|
||||||
};
|
};
|
||||||
|
|
||||||
class CryOmni3DMetaEngine : public AdvancedMetaEngine {
|
class CryOmni3DMetaEngineStatic : public AdvancedMetaEngineStatic {
|
||||||
public:
|
public:
|
||||||
CryOmni3DMetaEngine() : AdvancedMetaEngine(CryOmni3D::gameDescriptions,
|
CryOmni3DMetaEngineStatic() : AdvancedMetaEngineStatic(CryOmni3D::gameDescriptions,
|
||||||
sizeof(CryOmni3DGameDescription), cryomni3DGames, optionsList) {
|
sizeof(CryOmni3DGameDescription), cryomni3DGames, optionsList) {
|
||||||
_directoryGlobs = directoryGlobs;
|
_directoryGlobs = directoryGlobs;
|
||||||
_maxScanDepth = 5;
|
_maxScanDepth = 5;
|
||||||
|
@ -74,4 +74,4 @@ public:
|
||||||
|
|
||||||
} // End of Namespace CryOmni3D
|
} // End of Namespace CryOmni3D
|
||||||
|
|
||||||
REGISTER_PLUGIN_STATIC(CRYOMNI3D_DETECTION, PLUGIN_TYPE_METAENGINE, CryOmni3D::CryOmni3DMetaEngine);
|
REGISTER_PLUGIN_STATIC(CRYOMNI3D_DETECTION, PLUGIN_TYPE_METAENGINE, CryOmni3D::CryOmni3DMetaEngineStatic);
|
||||||
|
|
|
@ -67,7 +67,7 @@ bool CryOmni3DEngine::hasFeature(EngineFeature f) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class CryOmni3DMetaEngineConnect : public AdvancedMetaEngineConnect {
|
class CryOmni3DMetaEngine : public AdvancedMetaEngine {
|
||||||
public:
|
public:
|
||||||
const char *getName() const override {
|
const char *getName() const override {
|
||||||
return "cryomni3d";
|
return "cryomni3d";
|
||||||
|
@ -81,7 +81,7 @@ public:
|
||||||
void removeSaveState(const char *target, int slot) const override;
|
void removeSaveState(const char *target, int slot) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool CryOmni3DMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
bool CryOmni3DMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
return
|
return
|
||||||
(f == kSupportsListSaves)
|
(f == kSupportsListSaves)
|
||||||
|| (f == kSupportsLoadingDuringStartup)
|
|| (f == kSupportsLoadingDuringStartup)
|
||||||
|
@ -89,7 +89,7 @@ bool CryOmni3DMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
||||||
|| (f == kSimpleSavesNames);
|
|| (f == kSimpleSavesNames);
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateList CryOmni3DMetaEngineConnect::listSaves(const char *target) const {
|
SaveStateList CryOmni3DMetaEngine::listSaves(const char *target) const {
|
||||||
// Replicate constant here to shorten lines
|
// Replicate constant here to shorten lines
|
||||||
static const uint kSaveDescriptionLen = CryOmni3DEngine::kSaveDescriptionLen;
|
static const uint kSaveDescriptionLen = CryOmni3DEngine::kSaveDescriptionLen;
|
||||||
SaveStateList saveList;
|
SaveStateList saveList;
|
||||||
|
@ -123,13 +123,13 @@ SaveStateList CryOmni3DMetaEngineConnect::listSaves(const char *target) const {
|
||||||
return saveList;
|
return saveList;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CryOmni3DMetaEngineConnect::removeSaveState(const char *target, int slot) const {
|
void CryOmni3DMetaEngine::removeSaveState(const char *target, int slot) const {
|
||||||
Common::String filename = Common::String::format("%s.%04d", target, slot + 1);
|
Common::String filename = Common::String::format("%s.%04d", target, slot + 1);
|
||||||
|
|
||||||
g_system->getSavefileManager()->removeSavefile(filename);
|
g_system->getSavefileManager()->removeSavefile(filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CryOmni3DMetaEngineConnect::createInstance(OSystem *syst, Engine **engine,
|
bool CryOmni3DMetaEngine::createInstance(OSystem *syst, Engine **engine,
|
||||||
const ADGameDescription *desc) const {
|
const ADGameDescription *desc) const {
|
||||||
const CryOmni3DGameDescription *gd = (const CryOmni3DGameDescription *)desc;
|
const CryOmni3DGameDescription *gd = (const CryOmni3DGameDescription *)desc;
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@ bool CryOmni3DMetaEngineConnect::createInstance(OSystem *syst, Engine **engine,
|
||||||
} // End of namespace CryOmni3D
|
} // End of namespace CryOmni3D
|
||||||
|
|
||||||
#if PLUGIN_ENABLED_DYNAMIC(CRYOMNI3D)
|
#if PLUGIN_ENABLED_DYNAMIC(CRYOMNI3D)
|
||||||
REGISTER_PLUGIN_DYNAMIC(CRYOMNI3D, PLUGIN_TYPE_ENGINE, CryOmni3D::CryOmni3DMetaEngineConnect);
|
REGISTER_PLUGIN_DYNAMIC(CRYOMNI3D, PLUGIN_TYPE_ENGINE, CryOmni3D::CryOmni3DMetaEngine);
|
||||||
#else
|
#else
|
||||||
REGISTER_PLUGIN_STATIC(CRYOMNI3D, PLUGIN_TYPE_ENGINE, CryOmni3D::CryOmni3DMetaEngineConnect);
|
REGISTER_PLUGIN_STATIC(CRYOMNI3D, PLUGIN_TYPE_ENGINE, CryOmni3D::CryOmni3DMetaEngine);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -174,9 +174,9 @@ static const char *directoryGlobs[] = {
|
||||||
0
|
0
|
||||||
};
|
};
|
||||||
|
|
||||||
class DirectorMetaEngine : public AdvancedMetaEngine {
|
class DirectorMetaEngineStatic : public AdvancedMetaEngineStatic {
|
||||||
public:
|
public:
|
||||||
DirectorMetaEngine() : AdvancedMetaEngine(Director::gameDescriptions, sizeof(Director::DirectorGameDescription), directorGames) {
|
DirectorMetaEngineStatic() : AdvancedMetaEngineStatic(Director::gameDescriptions, sizeof(Director::DirectorGameDescription), directorGames) {
|
||||||
_maxScanDepth = 2;
|
_maxScanDepth = 2;
|
||||||
_directoryGlobs = directoryGlobs;
|
_directoryGlobs = directoryGlobs;
|
||||||
}
|
}
|
||||||
|
@ -213,7 +213,7 @@ static Director::DirectorGameDescription s_fallbackDesc = {
|
||||||
static char s_fallbackFileNameBuffer[51];
|
static char s_fallbackFileNameBuffer[51];
|
||||||
static char s_fallbackExtraBuf[256];
|
static char s_fallbackExtraBuf[256];
|
||||||
|
|
||||||
ADDetectedGame DirectorMetaEngine::fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const {
|
ADDetectedGame DirectorMetaEngineStatic::fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const {
|
||||||
// TODO: Handle Mac fallback
|
// TODO: Handle Mac fallback
|
||||||
|
|
||||||
// reset fallback description
|
// reset fallback description
|
||||||
|
@ -321,4 +321,4 @@ ADDetectedGame DirectorMetaEngine::fallbackDetect(const FileMap &allFiles, const
|
||||||
return ADDetectedGame();
|
return ADDetectedGame();
|
||||||
}
|
}
|
||||||
|
|
||||||
REGISTER_PLUGIN_STATIC(DIRECTOR_DETECTION, PLUGIN_TYPE_METAENGINE, DirectorMetaEngine);
|
REGISTER_PLUGIN_STATIC(DIRECTOR_DETECTION, PLUGIN_TYPE_METAENGINE, DirectorMetaEngineStatic);
|
||||||
|
|
|
@ -86,7 +86,7 @@ bool DirectorEngine::hasFeature(EngineFeature f) const {
|
||||||
|
|
||||||
} // End of Namespace Director
|
} // End of Namespace Director
|
||||||
|
|
||||||
class DirectorMetaEngineConnect : public AdvancedMetaEngineConnect {
|
class DirectorMetaEngine : public AdvancedMetaEngine {
|
||||||
public:
|
public:
|
||||||
const char *getName() const override {
|
const char *getName() const override {
|
||||||
return "director";
|
return "director";
|
||||||
|
@ -95,7 +95,7 @@ public:
|
||||||
bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
|
bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool DirectorMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
bool DirectorMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
||||||
const Director::DirectorGameDescription *gd = (const Director::DirectorGameDescription *)desc;
|
const Director::DirectorGameDescription *gd = (const Director::DirectorGameDescription *)desc;
|
||||||
|
|
||||||
if (gd)
|
if (gd)
|
||||||
|
@ -105,7 +105,7 @@ bool DirectorMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, c
|
||||||
}
|
}
|
||||||
|
|
||||||
#if PLUGIN_ENABLED_DYNAMIC(DIRECTOR)
|
#if PLUGIN_ENABLED_DYNAMIC(DIRECTOR)
|
||||||
REGISTER_PLUGIN_DYNAMIC(DIRECTOR, PLUGIN_TYPE_ENGINE, DirectorMetaEngineConnect);
|
REGISTER_PLUGIN_DYNAMIC(DIRECTOR, PLUGIN_TYPE_ENGINE, DirectorMetaEngine);
|
||||||
#else
|
#else
|
||||||
REGISTER_PLUGIN_STATIC(DIRECTOR, PLUGIN_TYPE_ENGINE, DirectorMetaEngineConnect);
|
REGISTER_PLUGIN_STATIC(DIRECTOR, PLUGIN_TYPE_ENGINE, DirectorMetaEngine);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -92,9 +92,9 @@ static const ADExtraGuiOptionsMap optionsList[] = {
|
||||||
AD_EXTRA_GUI_OPTIONS_TERMINATOR
|
AD_EXTRA_GUI_OPTIONS_TERMINATOR
|
||||||
};
|
};
|
||||||
|
|
||||||
class DMMetaEngine : public AdvancedMetaEngine {
|
class DMMetaEngineStatic : public AdvancedMetaEngineStatic {
|
||||||
public:
|
public:
|
||||||
DMMetaEngine() : AdvancedMetaEngine(DM::gameDescriptions, sizeof(DMADGameDescription), DMGames, optionsList) {
|
DMMetaEngineStatic() : AdvancedMetaEngineStatic(DM::gameDescriptions, sizeof(DMADGameDescription), DMGames, optionsList) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *getEngineId() const override {
|
const char *getEngineId() const override {
|
||||||
|
@ -114,4 +114,4 @@ public:
|
||||||
|
|
||||||
} // End of namespace DM
|
} // End of namespace DM
|
||||||
|
|
||||||
REGISTER_PLUGIN_STATIC(DM_DETECTION, PLUGIN_TYPE_METAENGINE, DM::DMMetaEngine);
|
REGISTER_PLUGIN_STATIC(DM_DETECTION, PLUGIN_TYPE_METAENGINE, DM::DMMetaEngineStatic);
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
|
|
||||||
namespace DM {
|
namespace DM {
|
||||||
|
|
||||||
class DMMetaEngineConnect : public AdvancedMetaEngineConnect {
|
class DMMetaEngine : public AdvancedMetaEngine {
|
||||||
public:
|
public:
|
||||||
const char *getName() const override {
|
const char *getName() const override {
|
||||||
return "dm";
|
return "dm";
|
||||||
|
@ -116,7 +116,7 @@ public:
|
||||||
} // End of namespace DM
|
} // End of namespace DM
|
||||||
|
|
||||||
#if PLUGIN_ENABLED_DYNAMIC(DM)
|
#if PLUGIN_ENABLED_DYNAMIC(DM)
|
||||||
REGISTER_PLUGIN_DYNAMIC(DM, PLUGIN_TYPE_ENGINE, DM::DMMetaEngineConnect);
|
REGISTER_PLUGIN_DYNAMIC(DM, PLUGIN_TYPE_ENGINE, DM::DMMetaEngine);
|
||||||
#else
|
#else
|
||||||
REGISTER_PLUGIN_STATIC(DM, PLUGIN_TYPE_ENGINE, DM::DMMetaEngineConnect);
|
REGISTER_PLUGIN_STATIC(DM, PLUGIN_TYPE_ENGINE, DM::DMMetaEngine);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -78,9 +78,9 @@ const ADGameDescription gameDescriptions[] = {
|
||||||
|
|
||||||
} // End of namespace Draci
|
} // End of namespace Draci
|
||||||
|
|
||||||
class DraciMetaEngine : public AdvancedMetaEngine {
|
class DraciMetaEngineStatic : public AdvancedMetaEngineStatic {
|
||||||
public:
|
public:
|
||||||
DraciMetaEngine() : AdvancedMetaEngine(Draci::gameDescriptions, sizeof(ADGameDescription), draciGames) {
|
DraciMetaEngineStatic() : AdvancedMetaEngineStatic(Draci::gameDescriptions, sizeof(ADGameDescription), draciGames) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *getEngineId() const override {
|
const char *getEngineId() const override {
|
||||||
|
@ -96,4 +96,4 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
REGISTER_PLUGIN_STATIC(DRACI_DETECTION, PLUGIN_TYPE_METAENGINE, DraciMetaEngine);
|
REGISTER_PLUGIN_STATIC(DRACI_DETECTION, PLUGIN_TYPE_METAENGINE, DraciMetaEngineStatic);
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
#include "engines/advancedDetector.h"
|
#include "engines/advancedDetector.h"
|
||||||
#include "engines/metaengine.h"
|
#include "engines/metaengine.h"
|
||||||
|
|
||||||
class DraciMetaEngineConnect : public AdvancedMetaEngineConnect {
|
class DraciMetaEngine : public AdvancedMetaEngine {
|
||||||
public:
|
public:
|
||||||
const char *getName() const override {
|
const char *getName() const override {
|
||||||
return "draci";
|
return "draci";
|
||||||
|
@ -42,7 +42,7 @@ public:
|
||||||
bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
|
bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool DraciMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
bool DraciMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
return
|
return
|
||||||
(f == kSupportsListSaves) ||
|
(f == kSupportsListSaves) ||
|
||||||
(f == kSupportsDeleteSave) ||
|
(f == kSupportsDeleteSave) ||
|
||||||
|
@ -53,7 +53,7 @@ bool DraciMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
||||||
(f == kSupportsLoadingDuringStartup);
|
(f == kSupportsLoadingDuringStartup);
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateList DraciMetaEngineConnect::listSaves(const char *target) const {
|
SaveStateList DraciMetaEngine::listSaves(const char *target) const {
|
||||||
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
||||||
Common::StringArray filenames;
|
Common::StringArray filenames;
|
||||||
Common::String pattern("draci.s##");
|
Common::String pattern("draci.s##");
|
||||||
|
@ -82,11 +82,11 @@ SaveStateList DraciMetaEngineConnect::listSaves(const char *target) const {
|
||||||
return saveList;
|
return saveList;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DraciMetaEngineConnect::removeSaveState(const char *target, int slot) const {
|
void DraciMetaEngine::removeSaveState(const char *target, int slot) const {
|
||||||
g_system->getSavefileManager()->removeSavefile(Draci::DraciEngine::getSavegameFile(slot));
|
g_system->getSavefileManager()->removeSavefile(Draci::DraciEngine::getSavegameFile(slot));
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateDescriptor DraciMetaEngineConnect::querySaveMetaInfos(const char *target, int slot) const {
|
SaveStateDescriptor DraciMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
|
||||||
Common::InSaveFile *f = g_system->getSavefileManager()->openForLoading(
|
Common::InSaveFile *f = g_system->getSavefileManager()->openForLoading(
|
||||||
Draci::DraciEngine::getSavegameFile(slot));
|
Draci::DraciEngine::getSavegameFile(slot));
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@ SaveStateDescriptor DraciMetaEngineConnect::querySaveMetaInfos(const char *targe
|
||||||
return SaveStateDescriptor();
|
return SaveStateDescriptor();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DraciMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
bool DraciMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
||||||
if (desc) {
|
if (desc) {
|
||||||
*engine = new Draci::DraciEngine(syst, desc);
|
*engine = new Draci::DraciEngine(syst, desc);
|
||||||
}
|
}
|
||||||
|
@ -128,7 +128,7 @@ bool DraciMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, cons
|
||||||
}
|
}
|
||||||
|
|
||||||
#if PLUGIN_ENABLED_DYNAMIC(DRACI)
|
#if PLUGIN_ENABLED_DYNAMIC(DRACI)
|
||||||
REGISTER_PLUGIN_DYNAMIC(DRACI, PLUGIN_TYPE_ENGINE, DraciMetaEngineConnect);
|
REGISTER_PLUGIN_DYNAMIC(DRACI, PLUGIN_TYPE_ENGINE, DraciMetaEngine);
|
||||||
#else
|
#else
|
||||||
REGISTER_PLUGIN_STATIC(DRACI, PLUGIN_TYPE_ENGINE, DraciMetaEngineConnect);
|
REGISTER_PLUGIN_STATIC(DRACI, PLUGIN_TYPE_ENGINE, DraciMetaEngine);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -123,9 +123,9 @@ static const char * const directoryGlobs[] = {
|
||||||
0
|
0
|
||||||
};
|
};
|
||||||
|
|
||||||
class DragonsMetaEngine : public AdvancedMetaEngine {
|
class DragonsMetaEngineStatic : public AdvancedMetaEngineStatic {
|
||||||
public:
|
public:
|
||||||
DragonsMetaEngine() : AdvancedMetaEngine(Dragons::gameDescriptions, sizeof(Dragons::DragonsGameDescription), dragonsGames) {
|
DragonsMetaEngineStatic() : AdvancedMetaEngineStatic(Dragons::gameDescriptions, sizeof(Dragons::DragonsGameDescription), dragonsGames) {
|
||||||
_maxScanDepth = 2;
|
_maxScanDepth = 2;
|
||||||
_directoryGlobs = directoryGlobs;
|
_directoryGlobs = directoryGlobs;
|
||||||
}
|
}
|
||||||
|
@ -143,4 +143,4 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
REGISTER_PLUGIN_STATIC(DRAGONS_DETECTION, PLUGIN_TYPE_METAENGINE, DragonsMetaEngine);
|
REGISTER_PLUGIN_STATIC(DRAGONS_DETECTION, PLUGIN_TYPE_METAENGINE, DragonsMetaEngineStatic);
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
#include "base/plugins.h"
|
#include "base/plugins.h"
|
||||||
#include "graphics/thumbnail.h"
|
#include "graphics/thumbnail.h"
|
||||||
|
|
||||||
class DragonsMetaEngineConnect : public AdvancedMetaEngineConnect {
|
class DragonsMetaEngine : public AdvancedMetaEngine {
|
||||||
public:
|
public:
|
||||||
const char *getName() const {
|
const char *getName() const {
|
||||||
return "dragons";
|
return "dragons";
|
||||||
|
@ -46,7 +46,7 @@ public:
|
||||||
Common::KeymapArray initKeymaps(const char *target) const override;
|
Common::KeymapArray initKeymaps(const char *target) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool DragonsMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
bool DragonsMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
return
|
return
|
||||||
(f == kSupportsListSaves) ||
|
(f == kSupportsListSaves) ||
|
||||||
(f == kSupportsDeleteSave) ||
|
(f == kSupportsDeleteSave) ||
|
||||||
|
@ -56,16 +56,16 @@ bool DragonsMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
||||||
(f == kSavesSupportCreationDate);
|
(f == kSavesSupportCreationDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DragonsMetaEngineConnect::removeSaveState(const char *target, int slot) const {
|
void DragonsMetaEngine::removeSaveState(const char *target, int slot) const {
|
||||||
Common::String fileName = Common::String::format("%s.%03d", target, slot);
|
Common::String fileName = Common::String::format("%s.%03d", target, slot);
|
||||||
g_system->getSavefileManager()->removeSavefile(fileName);
|
g_system->getSavefileManager()->removeSavefile(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
int DragonsMetaEngineConnect::getMaximumSaveSlot() const {
|
int DragonsMetaEngine::getMaximumSaveSlot() const {
|
||||||
return 999;
|
return 999;
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateList DragonsMetaEngineConnect::listSaves(const char *target) const {
|
SaveStateList DragonsMetaEngine::listSaves(const char *target) const {
|
||||||
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
||||||
Dragons::SaveHeader header;
|
Dragons::SaveHeader header;
|
||||||
Common::String pattern = target;
|
Common::String pattern = target;
|
||||||
|
@ -90,7 +90,7 @@ SaveStateList DragonsMetaEngineConnect::listSaves(const char *target) const {
|
||||||
return saveList;
|
return saveList;
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateDescriptor DragonsMetaEngineConnect::querySaveMetaInfos(const char *target, int slot) const {
|
SaveStateDescriptor DragonsMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
|
||||||
Common::String filename = Dragons::DragonsEngine::getSavegameFilename(target, slot);
|
Common::String filename = Dragons::DragonsEngine::getSavegameFilename(target, slot);
|
||||||
Common::InSaveFile *in = g_system->getSavefileManager()->openForLoading(filename.c_str());
|
Common::InSaveFile *in = g_system->getSavefileManager()->openForLoading(filename.c_str());
|
||||||
if (in) {
|
if (in) {
|
||||||
|
@ -113,7 +113,7 @@ SaveStateDescriptor DragonsMetaEngineConnect::querySaveMetaInfos(const char *tar
|
||||||
return SaveStateDescriptor();
|
return SaveStateDescriptor();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DragonsMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
bool DragonsMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
||||||
const Dragons::DragonsGameDescription *gd = (const Dragons::DragonsGameDescription *)desc;
|
const Dragons::DragonsGameDescription *gd = (const Dragons::DragonsGameDescription *)desc;
|
||||||
if (gd) {
|
if (gd) {
|
||||||
switch (gd->gameId) {
|
switch (gd->gameId) {
|
||||||
|
@ -132,7 +132,7 @@ bool DragonsMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, co
|
||||||
return desc != 0;
|
return desc != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
Common::KeymapArray DragonsMetaEngineConnect::initKeymaps(const char *target) const {
|
Common::KeymapArray DragonsMetaEngine::initKeymaps(const char *target) const {
|
||||||
using namespace Common;
|
using namespace Common;
|
||||||
|
|
||||||
Keymap *engineKeyMap = new Keymap(Keymap::kKeymapTypeGame, "dragons", "Blazing Dragons");
|
Keymap *engineKeyMap = new Keymap(Keymap::kKeymapTypeGame, "dragons", "Blazing Dragons");
|
||||||
|
@ -236,7 +236,7 @@ Common::KeymapArray DragonsMetaEngineConnect::initKeymaps(const char *target) co
|
||||||
}
|
}
|
||||||
|
|
||||||
#if PLUGIN_ENABLED_DYNAMIC(DRAGONS)
|
#if PLUGIN_ENABLED_DYNAMIC(DRAGONS)
|
||||||
REGISTER_PLUGIN_DYNAMIC(DRAGONS, PLUGIN_TYPE_ENGINE, DragonsMetaEngineConnect);
|
REGISTER_PLUGIN_DYNAMIC(DRAGONS, PLUGIN_TYPE_ENGINE, DragonsMetaEngine);
|
||||||
#else
|
#else
|
||||||
REGISTER_PLUGIN_STATIC(DRAGONS, PLUGIN_TYPE_ENGINE, DragonsMetaEngineConnect);
|
REGISTER_PLUGIN_STATIC(DRAGONS, PLUGIN_TYPE_ENGINE, DragonsMetaEngine);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -302,9 +302,9 @@ static const ExtraGuiOption drasculaExtraGuiOption = {
|
||||||
false
|
false
|
||||||
};
|
};
|
||||||
|
|
||||||
class DrasculaMetaEngine : public AdvancedMetaEngine {
|
class DrasculaMetaEngineStatic : public AdvancedMetaEngineStatic {
|
||||||
public:
|
public:
|
||||||
DrasculaMetaEngine() : AdvancedMetaEngine(Drascula::gameDescriptions, sizeof(Drascula::DrasculaGameDescription), drasculaGames) {
|
DrasculaMetaEngineStatic() : AdvancedMetaEngineStatic(Drascula::gameDescriptions, sizeof(Drascula::DrasculaGameDescription), drasculaGames) {
|
||||||
_guiOptions = GUIO1(GUIO_NOMIDI);
|
_guiOptions = GUIO1(GUIO_NOMIDI);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -323,7 +323,7 @@ public:
|
||||||
const ExtraGuiOptions getExtraGuiOptions(const Common::String &target) const override;
|
const ExtraGuiOptions getExtraGuiOptions(const Common::String &target) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
const ExtraGuiOptions DrasculaMetaEngine::getExtraGuiOptions(const Common::String &target) const {
|
const ExtraGuiOptions DrasculaMetaEngineStatic::getExtraGuiOptions(const Common::String &target) const {
|
||||||
ExtraGuiOptions options;
|
ExtraGuiOptions options;
|
||||||
options.push_back(drasculaExtraGuiOption);
|
options.push_back(drasculaExtraGuiOption);
|
||||||
return options;
|
return options;
|
||||||
|
@ -331,4 +331,4 @@ const ExtraGuiOptions DrasculaMetaEngine::getExtraGuiOptions(const Common::Strin
|
||||||
|
|
||||||
} // End of namespace Drascula
|
} // End of namespace Drascula
|
||||||
|
|
||||||
REGISTER_PLUGIN_STATIC(DRASCULA_DETECTION, PLUGIN_TYPE_METAENGINE, Drascula::DrasculaMetaEngine);
|
REGISTER_PLUGIN_STATIC(DRASCULA_DETECTION, PLUGIN_TYPE_METAENGINE, Drascula::DrasculaMetaEngineStatic);
|
||||||
|
|
|
@ -58,7 +58,7 @@ namespace Drascula {
|
||||||
|
|
||||||
SaveStateDescriptor loadMetaData(Common::ReadStream *s, int slot, bool setPlayTime);
|
SaveStateDescriptor loadMetaData(Common::ReadStream *s, int slot, bool setPlayTime);
|
||||||
|
|
||||||
class DrasculaMetaEngineConnect : public AdvancedMetaEngineConnect {
|
class DrasculaMetaEngine : public AdvancedMetaEngine {
|
||||||
public:
|
public:
|
||||||
const char *getName() const override {
|
const char *getName() const override {
|
||||||
return "drascula";
|
return "drascula";
|
||||||
|
@ -73,7 +73,7 @@ public:
|
||||||
SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const override;
|
SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool DrasculaMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
bool DrasculaMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
return
|
return
|
||||||
(f == kSupportsListSaves) ||
|
(f == kSupportsListSaves) ||
|
||||||
(f == kSupportsLoadingDuringStartup) ||
|
(f == kSupportsLoadingDuringStartup) ||
|
||||||
|
@ -85,7 +85,7 @@ bool DrasculaMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
||||||
(f == kSimpleSavesNames);
|
(f == kSimpleSavesNames);
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateList DrasculaMetaEngineConnect::listSaves(const char *target) const {
|
SaveStateList DrasculaMetaEngine::listSaves(const char *target) const {
|
||||||
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
||||||
Common::StringArray filenames;
|
Common::StringArray filenames;
|
||||||
Common::String pattern = target;
|
Common::String pattern = target;
|
||||||
|
@ -119,7 +119,7 @@ SaveStateList DrasculaMetaEngineConnect::listSaves(const char *target) const {
|
||||||
return saveList;
|
return saveList;
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateDescriptor DrasculaMetaEngineConnect::querySaveMetaInfos(const char *target, int slot) const {
|
SaveStateDescriptor DrasculaMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
|
||||||
Common::String fileName = Common::String::format("%s.%03d", target, slot);
|
Common::String fileName = Common::String::format("%s.%03d", target, slot);
|
||||||
|
|
||||||
Common::InSaveFile *in = g_system->getSavefileManager()->openForLoading(fileName);
|
Common::InSaveFile *in = g_system->getSavefileManager()->openForLoading(fileName);
|
||||||
|
@ -150,14 +150,14 @@ SaveStateDescriptor DrasculaMetaEngineConnect::querySaveMetaInfos(const char *ta
|
||||||
return desc;
|
return desc;
|
||||||
}
|
}
|
||||||
|
|
||||||
int DrasculaMetaEngineConnect::getMaximumSaveSlot() const { return 999; }
|
int DrasculaMetaEngine::getMaximumSaveSlot() const { return 999; }
|
||||||
|
|
||||||
void DrasculaMetaEngineConnect::removeSaveState(const char *target, int slot) const {
|
void DrasculaMetaEngine::removeSaveState(const char *target, int slot) const {
|
||||||
Common::String fileName = Common::String::format("%s.%03d", target, slot);
|
Common::String fileName = Common::String::format("%s.%03d", target, slot);
|
||||||
g_system->getSavefileManager()->removeSavefile(fileName);
|
g_system->getSavefileManager()->removeSavefile(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DrasculaMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
bool DrasculaMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
||||||
const Drascula::DrasculaGameDescription *gd = (const Drascula::DrasculaGameDescription *)desc;
|
const Drascula::DrasculaGameDescription *gd = (const Drascula::DrasculaGameDescription *)desc;
|
||||||
if (gd) {
|
if (gd) {
|
||||||
*engine = new Drascula::DrasculaEngine(syst, gd);
|
*engine = new Drascula::DrasculaEngine(syst, gd);
|
||||||
|
@ -168,7 +168,7 @@ bool DrasculaMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, c
|
||||||
} // End of namespace Drascula
|
} // End of namespace Drascula
|
||||||
|
|
||||||
#if PLUGIN_ENABLED_DYNAMIC(DRASCULA)
|
#if PLUGIN_ENABLED_DYNAMIC(DRASCULA)
|
||||||
REGISTER_PLUGIN_DYNAMIC(DRASCULA, PLUGIN_TYPE_ENGINE, Drascula::DrasculaMetaEngineConnect);
|
REGISTER_PLUGIN_DYNAMIC(DRASCULA, PLUGIN_TYPE_ENGINE, Drascula::DrasculaMetaEngine);
|
||||||
#else
|
#else
|
||||||
REGISTER_PLUGIN_STATIC(DRASCULA, PLUGIN_TYPE_ENGINE, Drascula::DrasculaMetaEngineConnect);
|
REGISTER_PLUGIN_STATIC(DRASCULA, PLUGIN_TYPE_ENGINE, Drascula::DrasculaMetaEngine);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -61,10 +61,10 @@ static const ADExtraGuiOptionsMap gameGuiOptions[] = {
|
||||||
AD_EXTRA_GUI_OPTIONS_TERMINATOR
|
AD_EXTRA_GUI_OPTIONS_TERMINATOR
|
||||||
};
|
};
|
||||||
|
|
||||||
class DreamWebMetaEngine : public AdvancedMetaEngine {
|
class DreamWebMetaEngineStatic : public AdvancedMetaEngineStatic {
|
||||||
public:
|
public:
|
||||||
DreamWebMetaEngine():
|
DreamWebMetaEngineStatic():
|
||||||
AdvancedMetaEngine(DreamWeb::gameDescriptions,
|
AdvancedMetaEngineStatic(DreamWeb::gameDescriptions,
|
||||||
sizeof(DreamWeb::DreamWebGameDescription), dreamWebGames,
|
sizeof(DreamWeb::DreamWebGameDescription), dreamWebGames,
|
||||||
gameGuiOptions) {
|
gameGuiOptions) {
|
||||||
_guiOptions = GUIO1(GUIO_NOMIDI);
|
_guiOptions = GUIO1(GUIO_NOMIDI);
|
||||||
|
@ -83,4 +83,4 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
REGISTER_PLUGIN_STATIC(DREAMWEB_DETECTION, PLUGIN_TYPE_METAENGINE, DreamWebMetaEngine);
|
REGISTER_PLUGIN_STATIC(DREAMWEB_DETECTION, PLUGIN_TYPE_METAENGINE, DreamWebMetaEngineStatic);
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#include "dreamweb/dreamweb.h"
|
#include "dreamweb/dreamweb.h"
|
||||||
#include "dreamweb/detection.h"
|
#include "dreamweb/detection.h"
|
||||||
|
|
||||||
class DreamWebMetaEngineConnect : public AdvancedMetaEngineConnect {
|
class DreamWebMetaEngine : public AdvancedMetaEngine {
|
||||||
public:
|
public:
|
||||||
const char *getName() const override {
|
const char *getName() const override {
|
||||||
return "dreamweb";
|
return "dreamweb";
|
||||||
|
@ -45,7 +45,7 @@ public:
|
||||||
SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const override;
|
SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool DreamWebMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
bool DreamWebMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
switch(f) {
|
switch(f) {
|
||||||
case kSupportsListSaves:
|
case kSupportsListSaves:
|
||||||
case kSupportsLoadingDuringStartup:
|
case kSupportsLoadingDuringStartup:
|
||||||
|
@ -71,7 +71,7 @@ bool DreamWeb::DreamWebEngine::hasFeature(EngineFeature f) const {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DreamWebMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
bool DreamWebMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
||||||
const DreamWeb::DreamWebGameDescription *gd = (const DreamWeb::DreamWebGameDescription *)desc;
|
const DreamWeb::DreamWebGameDescription *gd = (const DreamWeb::DreamWebGameDescription *)desc;
|
||||||
if (gd) {
|
if (gd) {
|
||||||
*engine = new DreamWeb::DreamWebEngine(syst, gd);
|
*engine = new DreamWeb::DreamWebEngine(syst, gd);
|
||||||
|
@ -79,7 +79,7 @@ bool DreamWebMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, c
|
||||||
return gd != 0;
|
return gd != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateList DreamWebMetaEngineConnect::listSaves(const char *target) const {
|
SaveStateList DreamWebMetaEngine::listSaves(const char *target) const {
|
||||||
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
||||||
Common::StringArray files = saveFileMan->listSavefiles("DREAMWEB.D##");
|
Common::StringArray files = saveFileMan->listSavefiles("DREAMWEB.D##");
|
||||||
|
|
||||||
|
@ -104,14 +104,14 @@ SaveStateList DreamWebMetaEngineConnect::listSaves(const char *target) const {
|
||||||
return saveList;
|
return saveList;
|
||||||
}
|
}
|
||||||
|
|
||||||
int DreamWebMetaEngineConnect::getMaximumSaveSlot() const { return 99; }
|
int DreamWebMetaEngine::getMaximumSaveSlot() const { return 99; }
|
||||||
|
|
||||||
void DreamWebMetaEngineConnect::removeSaveState(const char *target, int slot) const {
|
void DreamWebMetaEngine::removeSaveState(const char *target, int slot) const {
|
||||||
Common::String fileName = Common::String::format("DREAMWEB.D%02d", slot);
|
Common::String fileName = Common::String::format("DREAMWEB.D%02d", slot);
|
||||||
g_system->getSavefileManager()->removeSavefile(fileName);
|
g_system->getSavefileManager()->removeSavefile(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateDescriptor DreamWebMetaEngineConnect::querySaveMetaInfos(const char *target, int slot) const {
|
SaveStateDescriptor DreamWebMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
|
||||||
Common::String filename = Common::String::format("DREAMWEB.D%02d", slot);
|
Common::String filename = Common::String::format("DREAMWEB.D%02d", slot);
|
||||||
Common::InSaveFile *in = g_system->getSavefileManager()->openForLoading(filename.c_str());
|
Common::InSaveFile *in = g_system->getSavefileManager()->openForLoading(filename.c_str());
|
||||||
|
|
||||||
|
@ -178,9 +178,9 @@ SaveStateDescriptor DreamWebMetaEngineConnect::querySaveMetaInfos(const char *ta
|
||||||
}
|
}
|
||||||
|
|
||||||
#if PLUGIN_ENABLED_DYNAMIC(DREAMWEB)
|
#if PLUGIN_ENABLED_DYNAMIC(DREAMWEB)
|
||||||
REGISTER_PLUGIN_DYNAMIC(DREAMWEB, PLUGIN_TYPE_ENGINE, DreamWebMetaEngineConnect);
|
REGISTER_PLUGIN_DYNAMIC(DREAMWEB, PLUGIN_TYPE_ENGINE, DreamWebMetaEngine);
|
||||||
#else
|
#else
|
||||||
REGISTER_PLUGIN_STATIC(DREAMWEB, PLUGIN_TYPE_ENGINE, DreamWebMetaEngineConnect);
|
REGISTER_PLUGIN_STATIC(DREAMWEB, PLUGIN_TYPE_ENGINE, DreamWebMetaEngine);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace DreamWeb {
|
namespace DreamWeb {
|
||||||
|
|
|
@ -106,9 +106,9 @@ static const ADGameDescription gameDescriptions[] = {
|
||||||
|
|
||||||
} // End of namespace Fullpipe
|
} // End of namespace Fullpipe
|
||||||
|
|
||||||
class FullpipeMetaEngine : public AdvancedMetaEngine {
|
class FullpipeMetaEngineStatic : public AdvancedMetaEngineStatic {
|
||||||
public:
|
public:
|
||||||
FullpipeMetaEngine() : AdvancedMetaEngine(Fullpipe::gameDescriptions, sizeof(ADGameDescription), fullpipeGames) {
|
FullpipeMetaEngineStatic() : AdvancedMetaEngineStatic(Fullpipe::gameDescriptions, sizeof(ADGameDescription), fullpipeGames) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *getEngineId() const override {
|
const char *getEngineId() const override {
|
||||||
|
@ -124,4 +124,4 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
REGISTER_PLUGIN_STATIC(FULLPIPE_DETECTION, PLUGIN_TYPE_METAENGINE, FullpipeMetaEngine);
|
REGISTER_PLUGIN_STATIC(FULLPIPE_DETECTION, PLUGIN_TYPE_METAENGINE, FullpipeMetaEngineStatic);
|
||||||
|
|
|
@ -46,7 +46,7 @@ Common::Language FullpipeEngine::getLanguage() const {
|
||||||
|
|
||||||
} // End of namspace Fullpipe
|
} // End of namspace Fullpipe
|
||||||
|
|
||||||
class FullpipeMetaEngineConnect : public AdvancedMetaEngineConnect {
|
class FullpipeMetaEngine : public AdvancedMetaEngine {
|
||||||
public:
|
public:
|
||||||
const char *getName() const override {
|
const char *getName() const override {
|
||||||
return "fullpipe";
|
return "fullpipe";
|
||||||
|
@ -62,7 +62,7 @@ public:
|
||||||
bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
|
bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool FullpipeMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
bool FullpipeMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
return
|
return
|
||||||
(f == kSupportsListSaves) ||
|
(f == kSupportsListSaves) ||
|
||||||
(f == kSupportsDeleteSave) ||
|
(f == kSupportsDeleteSave) ||
|
||||||
|
@ -81,7 +81,7 @@ bool Fullpipe::FullpipeEngine::hasFeature(EngineFeature f) const {
|
||||||
(f == kSupportsSavingDuringRuntime);
|
(f == kSupportsSavingDuringRuntime);
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateList FullpipeMetaEngineConnect::listSaves(const char *target) const {
|
SaveStateList FullpipeMetaEngine::listSaves(const char *target) const {
|
||||||
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
||||||
Common::StringArray filenames;
|
Common::StringArray filenames;
|
||||||
Common::String pattern("fullpipe.s##");
|
Common::String pattern("fullpipe.s##");
|
||||||
|
@ -117,11 +117,11 @@ SaveStateList FullpipeMetaEngineConnect::listSaves(const char *target) const {
|
||||||
return saveList;
|
return saveList;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FullpipeMetaEngineConnect::removeSaveState(const char *target, int slot) const {
|
void FullpipeMetaEngine::removeSaveState(const char *target, int slot) const {
|
||||||
g_system->getSavefileManager()->removeSavefile(Fullpipe::getSavegameFile(slot));
|
g_system->getSavefileManager()->removeSavefile(Fullpipe::getSavegameFile(slot));
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateDescriptor FullpipeMetaEngineConnect::querySaveMetaInfos(const char *target, int slot) const {
|
SaveStateDescriptor FullpipeMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
|
||||||
Common::ScopedPtr<Common::InSaveFile> f(g_system->getSavefileManager()->openForLoading(
|
Common::ScopedPtr<Common::InSaveFile> f(g_system->getSavefileManager()->openForLoading(
|
||||||
Fullpipe::getSavegameFile(slot)));
|
Fullpipe::getSavegameFile(slot)));
|
||||||
|
|
||||||
|
@ -145,7 +145,7 @@ SaveStateDescriptor FullpipeMetaEngineConnect::querySaveMetaInfos(const char *ta
|
||||||
return SaveStateDescriptor();
|
return SaveStateDescriptor();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FullpipeMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
bool FullpipeMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
||||||
if (desc) {
|
if (desc) {
|
||||||
*engine = new Fullpipe::FullpipeEngine(syst, desc);
|
*engine = new Fullpipe::FullpipeEngine(syst, desc);
|
||||||
}
|
}
|
||||||
|
@ -153,7 +153,7 @@ bool FullpipeMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, c
|
||||||
}
|
}
|
||||||
|
|
||||||
#if PLUGIN_ENABLED_DYNAMIC(FULLPIPE)
|
#if PLUGIN_ENABLED_DYNAMIC(FULLPIPE)
|
||||||
REGISTER_PLUGIN_DYNAMIC(FULLPIPE, PLUGIN_TYPE_ENGINE, FullpipeMetaEngineConnect);
|
REGISTER_PLUGIN_DYNAMIC(FULLPIPE, PLUGIN_TYPE_ENGINE, FullpipeMetaEngine);
|
||||||
#else
|
#else
|
||||||
REGISTER_PLUGIN_STATIC(FULLPIPE, PLUGIN_TYPE_ENGINE, FullpipeMetaEngineConnect);
|
REGISTER_PLUGIN_STATIC(FULLPIPE, PLUGIN_TYPE_ENGINE, FullpipeMetaEngine);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -114,7 +114,7 @@ GlkDetectedGame::GlkDetectedGame(const char *id, const char *desc, const Common:
|
||||||
|
|
||||||
} // End of namespace Glk
|
} // End of namespace Glk
|
||||||
|
|
||||||
PlainGameList GlkMetaEngine::getSupportedGames() const {
|
PlainGameList GlkMetaEngineStatic::getSupportedGames() const {
|
||||||
PlainGameList list;
|
PlainGameList list;
|
||||||
Glk::Adrift::AdriftMetaEngine::getSupportedGames(list);
|
Glk::Adrift::AdriftMetaEngine::getSupportedGames(list);
|
||||||
Glk::AdvSys::AdvSysMetaEngine::getSupportedGames(list);
|
Glk::AdvSys::AdvSysMetaEngine::getSupportedGames(list);
|
||||||
|
@ -142,7 +142,7 @@ PlainGameList GlkMetaEngine::getSupportedGames() const {
|
||||||
Glk::GameDescriptor gd##SUBENGINE = Glk::SUBENGINE::SUBENGINE##MetaEngine::findGame(gameId); \
|
Glk::GameDescriptor gd##SUBENGINE = Glk::SUBENGINE::SUBENGINE##MetaEngine::findGame(gameId); \
|
||||||
if (gd##SUBENGINE._description) return gd##SUBENGINE
|
if (gd##SUBENGINE._description) return gd##SUBENGINE
|
||||||
|
|
||||||
PlainGameDescriptor GlkMetaEngine::findGame(const char *gameId) const {
|
PlainGameDescriptor GlkMetaEngineStatic::findGame(const char *gameId) const {
|
||||||
FIND_GAME(Adrift);
|
FIND_GAME(Adrift);
|
||||||
FIND_GAME(AdvSys);
|
FIND_GAME(AdvSys);
|
||||||
FIND_GAME(Alan2);
|
FIND_GAME(Alan2);
|
||||||
|
@ -167,7 +167,7 @@ PlainGameDescriptor GlkMetaEngine::findGame(const char *gameId) const {
|
||||||
|
|
||||||
#undef FIND_GAME
|
#undef FIND_GAME
|
||||||
|
|
||||||
DetectedGames GlkMetaEngine::detectGames(const Common::FSList &fslist) const {
|
DetectedGames GlkMetaEngineStatic::detectGames(const Common::FSList &fslist) const {
|
||||||
// This is as good a place as any to detect multiple sub-engines using the same Ids
|
// This is as good a place as any to detect multiple sub-engines using the same Ids
|
||||||
detectClashes();
|
detectClashes();
|
||||||
|
|
||||||
|
@ -194,7 +194,7 @@ DetectedGames GlkMetaEngine::detectGames(const Common::FSList &fslist) const {
|
||||||
return detectedGames;
|
return detectedGames;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GlkMetaEngine::detectClashes() const {
|
void GlkMetaEngineStatic::detectClashes() const {
|
||||||
Common::StringMap map;
|
Common::StringMap map;
|
||||||
Glk::Adrift::AdriftMetaEngine::detectClashes(map);
|
Glk::Adrift::AdriftMetaEngine::detectClashes(map);
|
||||||
Glk::AdvSys::AdvSysMetaEngine::detectClashes(map);
|
Glk::AdvSys::AdvSysMetaEngine::detectClashes(map);
|
||||||
|
@ -216,7 +216,7 @@ void GlkMetaEngine::detectClashes() const {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
const ExtraGuiOptions GlkMetaEngine::getExtraGuiOptions(const Common::String &) const {
|
const ExtraGuiOptions GlkMetaEngineStatic::getExtraGuiOptions(const Common::String &) const {
|
||||||
ExtraGuiOptions options;
|
ExtraGuiOptions options;
|
||||||
#if defined(USE_TTS)
|
#if defined(USE_TTS)
|
||||||
static const ExtraGuiOption ttsSpeakOptions = {
|
static const ExtraGuiOption ttsSpeakOptions = {
|
||||||
|
@ -237,4 +237,4 @@ const ExtraGuiOptions GlkMetaEngine::getExtraGuiOptions(const Common::String &)
|
||||||
return options;
|
return options;
|
||||||
}
|
}
|
||||||
|
|
||||||
REGISTER_PLUGIN_STATIC(GLK_DETECTION, PLUGIN_TYPE_METAENGINE, GlkMetaEngine);
|
REGISTER_PLUGIN_STATIC(GLK_DETECTION, PLUGIN_TYPE_METAENGINE, GlkMetaEngineStatic);
|
||||||
|
|
|
@ -29,9 +29,9 @@
|
||||||
/**
|
/**
|
||||||
* ScummVM Meta Engine interface
|
* ScummVM Meta Engine interface
|
||||||
*/
|
*/
|
||||||
class GlkMetaEngine : public MetaEngine {
|
class GlkMetaEngineStatic : public MetaEngineStatic {
|
||||||
public:
|
public:
|
||||||
GlkMetaEngine() : MetaEngine() {}
|
GlkMetaEngineStatic() : MetaEngineStatic() {}
|
||||||
|
|
||||||
const char *getName() const override {
|
const char *getName() const override {
|
||||||
return "Glk";
|
return "Glk";
|
||||||
|
|
|
@ -73,7 +73,7 @@
|
||||||
|
|
||||||
#define MAX_SAVES 99
|
#define MAX_SAVES 99
|
||||||
|
|
||||||
class GlkMetaEngineConnect : public MetaEngineConnect {
|
class GlkMetaEngine : public MetaEngine {
|
||||||
private:
|
private:
|
||||||
Common::String findFileByGameId(const Common::String &gameId) const;
|
Common::String findFileByGameId(const Common::String &gameId) const;
|
||||||
public:
|
public:
|
||||||
|
@ -90,7 +90,7 @@ public:
|
||||||
SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const override;
|
SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool GlkMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
bool GlkMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
return
|
return
|
||||||
(f == kSupportsListSaves) ||
|
(f == kSupportsListSaves) ||
|
||||||
(f == kSupportsLoadingDuringStartup) ||
|
(f == kSupportsLoadingDuringStartup) ||
|
||||||
|
@ -138,14 +138,14 @@ template<class META, class ENG>bool create(OSystem *syst,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Common::String GlkMetaEngineConnect::findFileByGameId(const Common::String &gameId) const {
|
Common::String GlkMetaEngine::findFileByGameId(const Common::String &gameId) const {
|
||||||
// Get the list of files in the folder and return detection against them
|
// Get the list of files in the folder and return detection against them
|
||||||
Common::FSNode folder = Common::FSNode(ConfMan.get("path"));
|
Common::FSNode folder = Common::FSNode(ConfMan.get("path"));
|
||||||
Common::FSList fslist;
|
Common::FSList fslist;
|
||||||
folder.getChildren(fslist, Common::FSNode::kListFilesOnly);
|
folder.getChildren(fslist, Common::FSNode::kListFilesOnly);
|
||||||
|
|
||||||
// Get the matching MetaEngine for this Engine.
|
// Get the matching MetaEngine for this Engine.
|
||||||
const MetaEngine &metaEngine = g_engine->getMetaEngine();
|
const MetaEngineStatic &metaEngine = g_engine->getMetaEngine();
|
||||||
|
|
||||||
// Iterate over the files
|
// Iterate over the files
|
||||||
for (Common::FSList::iterator i = fslist.begin(); i != fslist.end(); ++i) {
|
for (Common::FSList::iterator i = fslist.begin(); i != fslist.end(); ++i) {
|
||||||
|
@ -163,7 +163,7 @@ Common::String GlkMetaEngineConnect::findFileByGameId(const Common::String &game
|
||||||
return Common::String();
|
return Common::String();
|
||||||
}
|
}
|
||||||
|
|
||||||
Common::Error GlkMetaEngineConnect::createInstance(OSystem *syst, Engine **engine) const {
|
Common::Error GlkMetaEngine::createInstance(OSystem *syst, Engine **engine) const {
|
||||||
#ifndef RELEASE_BUILD
|
#ifndef RELEASE_BUILD
|
||||||
Glk::GameDescriptor td = Glk::GameDescriptor::empty();
|
Glk::GameDescriptor td = Glk::GameDescriptor::empty();
|
||||||
#endif
|
#endif
|
||||||
|
@ -231,7 +231,7 @@ Common::Error GlkMetaEngineConnect::createInstance(OSystem *syst, Engine **engin
|
||||||
return *engine ? Common::kNoError : Common::kUserCanceled;
|
return *engine ? Common::kNoError : Common::kUserCanceled;
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateList GlkMetaEngineConnect::listSaves(const char *target) const {
|
SaveStateList GlkMetaEngine::listSaves(const char *target) const {
|
||||||
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
||||||
Common::StringArray filenames;
|
Common::StringArray filenames;
|
||||||
Common::String saveDesc;
|
Common::String saveDesc;
|
||||||
|
@ -262,16 +262,16 @@ SaveStateList GlkMetaEngineConnect::listSaves(const char *target) const {
|
||||||
return saveList;
|
return saveList;
|
||||||
}
|
}
|
||||||
|
|
||||||
int GlkMetaEngineConnect::getMaximumSaveSlot() const {
|
int GlkMetaEngine::getMaximumSaveSlot() const {
|
||||||
return MAX_SAVES;
|
return MAX_SAVES;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GlkMetaEngineConnect::removeSaveState(const char *target, int slot) const {
|
void GlkMetaEngine::removeSaveState(const char *target, int slot) const {
|
||||||
Common::String filename = Common::String::format("%s.%03d", target, slot);
|
Common::String filename = Common::String::format("%s.%03d", target, slot);
|
||||||
g_system->getSavefileManager()->removeSavefile(filename);
|
g_system->getSavefileManager()->removeSavefile(filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateDescriptor GlkMetaEngineConnect::querySaveMetaInfos(const char *target, int slot) const {
|
SaveStateDescriptor GlkMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
|
||||||
Common::String filename = Common::String::format("%s.%03d", target, slot);
|
Common::String filename = Common::String::format("%s.%03d", target, slot);
|
||||||
Common::InSaveFile *in = g_system->getSavefileManager()->openForLoading(filename);
|
Common::InSaveFile *in = g_system->getSavefileManager()->openForLoading(filename);
|
||||||
SaveStateDescriptor ssd;
|
SaveStateDescriptor ssd;
|
||||||
|
@ -290,7 +290,7 @@ SaveStateDescriptor GlkMetaEngineConnect::querySaveMetaInfos(const char *target,
|
||||||
}
|
}
|
||||||
|
|
||||||
#if PLUGIN_ENABLED_DYNAMIC(GLK)
|
#if PLUGIN_ENABLED_DYNAMIC(GLK)
|
||||||
REGISTER_PLUGIN_DYNAMIC(GLK, PLUGIN_TYPE_ENGINE, GlkMetaEngineConnect);
|
REGISTER_PLUGIN_DYNAMIC(GLK, PLUGIN_TYPE_ENGINE, GlkMetaEngine);
|
||||||
#else
|
#else
|
||||||
REGISTER_PLUGIN_STATIC(GLK, PLUGIN_TYPE_ENGINE, GlkMetaEngineConnect);
|
REGISTER_PLUGIN_STATIC(GLK, PLUGIN_TYPE_ENGINE, GlkMetaEngine);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -83,9 +83,9 @@ static const ADGameDescription gameDescriptions[] = {
|
||||||
|
|
||||||
} // End of namespace Gnap
|
} // End of namespace Gnap
|
||||||
|
|
||||||
class GnapMetaEngine : public AdvancedMetaEngine {
|
class GnapMetaEngineStatic : public AdvancedMetaEngineStatic {
|
||||||
public:
|
public:
|
||||||
GnapMetaEngine() : AdvancedMetaEngine(Gnap::gameDescriptions, sizeof(ADGameDescription), gnapGames) {
|
GnapMetaEngineStatic() : AdvancedMetaEngineStatic(Gnap::gameDescriptions, sizeof(ADGameDescription), gnapGames) {
|
||||||
_maxScanDepth = 3;
|
_maxScanDepth = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -102,4 +102,4 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
REGISTER_PLUGIN_STATIC(GNAP_DETECTION, PLUGIN_TYPE_METAENGINE, GnapMetaEngine);
|
REGISTER_PLUGIN_STATIC(GNAP_DETECTION, PLUGIN_TYPE_METAENGINE, GnapMetaEngineStatic);
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#include "base/plugins.h"
|
#include "base/plugins.h"
|
||||||
#include "graphics/thumbnail.h"
|
#include "graphics/thumbnail.h"
|
||||||
|
|
||||||
class GnapMetaEngineConnect : public AdvancedMetaEngineConnect {
|
class GnapMetaEngine : public AdvancedMetaEngine {
|
||||||
public:
|
public:
|
||||||
const char *getName() const override {
|
const char *getName() const override {
|
||||||
return "gnap";
|
return "gnap";
|
||||||
|
@ -44,7 +44,7 @@ public:
|
||||||
void removeSaveState(const char *target, int slot) const override;
|
void removeSaveState(const char *target, int slot) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool GnapMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
bool GnapMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
return
|
return
|
||||||
(f == kSupportsListSaves) ||
|
(f == kSupportsListSaves) ||
|
||||||
(f == kSupportsLoadingDuringStartup) ||
|
(f == kSupportsLoadingDuringStartup) ||
|
||||||
|
@ -62,14 +62,14 @@ bool Gnap::GnapEngine::hasFeature(EngineFeature f) const {
|
||||||
(f == kSupportsSavingDuringRuntime);
|
(f == kSupportsSavingDuringRuntime);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GnapMetaEngineConnect::removeSaveState(const char *target, int slot) const {
|
void GnapMetaEngine::removeSaveState(const char *target, int slot) const {
|
||||||
Common::String fileName = Common::String::format("%s.%03d", target, slot);
|
Common::String fileName = Common::String::format("%s.%03d", target, slot);
|
||||||
g_system->getSavefileManager()->removeSavefile(fileName);
|
g_system->getSavefileManager()->removeSavefile(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
int GnapMetaEngineConnect::getMaximumSaveSlot() const { return 99; }
|
int GnapMetaEngine::getMaximumSaveSlot() const { return 99; }
|
||||||
|
|
||||||
SaveStateList GnapMetaEngineConnect::listSaves(const char *target) const {
|
SaveStateList GnapMetaEngine::listSaves(const char *target) const {
|
||||||
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
||||||
Common::StringArray filenames;
|
Common::StringArray filenames;
|
||||||
Common::String saveDesc;
|
Common::String saveDesc;
|
||||||
|
@ -99,7 +99,7 @@ SaveStateList GnapMetaEngineConnect::listSaves(const char *target) const {
|
||||||
return saveList;
|
return saveList;
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateDescriptor GnapMetaEngineConnect::querySaveMetaInfos(const char *target, int slot) const {
|
SaveStateDescriptor GnapMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
|
||||||
Common::String fileName = Common::String::format("%s.%03d", target, slot);
|
Common::String fileName = Common::String::format("%s.%03d", target, slot);
|
||||||
Common::InSaveFile *file = g_system->getSavefileManager()->openForLoading(fileName);
|
Common::InSaveFile *file = g_system->getSavefileManager()->openForLoading(fileName);
|
||||||
if (file) {
|
if (file) {
|
||||||
|
@ -144,7 +144,7 @@ SaveStateDescriptor GnapMetaEngineConnect::querySaveMetaInfos(const char *target
|
||||||
return SaveStateDescriptor();
|
return SaveStateDescriptor();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GnapMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
bool GnapMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
||||||
if (desc) {
|
if (desc) {
|
||||||
*engine = new Gnap::GnapEngine(syst, desc);
|
*engine = new Gnap::GnapEngine(syst, desc);
|
||||||
}
|
}
|
||||||
|
@ -152,7 +152,7 @@ bool GnapMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const
|
||||||
}
|
}
|
||||||
|
|
||||||
#if PLUGIN_ENABLED_DYNAMIC(GNAP)
|
#if PLUGIN_ENABLED_DYNAMIC(GNAP)
|
||||||
REGISTER_PLUGIN_DYNAMIC(GNAP, PLUGIN_TYPE_ENGINE, GnapMetaEngineConnect);
|
REGISTER_PLUGIN_DYNAMIC(GNAP, PLUGIN_TYPE_ENGINE, GnapMetaEngine);
|
||||||
#else
|
#else
|
||||||
REGISTER_PLUGIN_STATIC(GNAP, PLUGIN_TYPE_ENGINE, GnapMetaEngineConnect);
|
REGISTER_PLUGIN_STATIC(GNAP, PLUGIN_TYPE_ENGINE, GnapMetaEngine);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -27,9 +27,9 @@
|
||||||
#include "gob/detection/detection.h"
|
#include "gob/detection/detection.h"
|
||||||
#include "gob/detection/tables.h"
|
#include "gob/detection/tables.h"
|
||||||
|
|
||||||
class GobMetaEngine : public AdvancedMetaEngine {
|
class GobMetaEngineStatic : public AdvancedMetaEngineStatic {
|
||||||
public:
|
public:
|
||||||
GobMetaEngine();
|
GobMetaEngineStatic();
|
||||||
|
|
||||||
const char *getEngineId() const override {
|
const char *getEngineId() const override {
|
||||||
return "gob";
|
return "gob";
|
||||||
|
@ -47,13 +47,13 @@ private:
|
||||||
static const Gob::GOBGameDescription *detectOnceUponATime(const Common::FSList &fslist);
|
static const Gob::GOBGameDescription *detectOnceUponATime(const Common::FSList &fslist);
|
||||||
};
|
};
|
||||||
|
|
||||||
GobMetaEngine::GobMetaEngine() :
|
GobMetaEngineStatic::GobMetaEngineStatic() :
|
||||||
AdvancedMetaEngine(Gob::gameDescriptions, sizeof(Gob::GOBGameDescription), gobGames) {
|
AdvancedMetaEngineStatic(Gob::gameDescriptions, sizeof(Gob::GOBGameDescription), gobGames) {
|
||||||
|
|
||||||
_guiOptions = GUIO1(GUIO_NOLAUNCHLOAD);
|
_guiOptions = GUIO1(GUIO_NOLAUNCHLOAD);
|
||||||
}
|
}
|
||||||
|
|
||||||
ADDetectedGame GobMetaEngine::fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const {
|
ADDetectedGame GobMetaEngineStatic::fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const {
|
||||||
ADDetectedGame detectedGame = detectGameFilebased(allFiles, Gob::fileBased);
|
ADDetectedGame detectedGame = detectGameFilebased(allFiles, Gob::fileBased);
|
||||||
if (!detectedGame.desc) {
|
if (!detectedGame.desc) {
|
||||||
return ADDetectedGame();
|
return ADDetectedGame();
|
||||||
|
@ -71,7 +71,7 @@ ADDetectedGame GobMetaEngine::fallbackDetect(const FileMap &allFiles, const Comm
|
||||||
return detectedGame;
|
return detectedGame;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Gob::GOBGameDescription *GobMetaEngine::detectOnceUponATime(const Common::FSList &fslist) {
|
const Gob::GOBGameDescription *GobMetaEngineStatic::detectOnceUponATime(const Common::FSList &fslist) {
|
||||||
// Add the game path to the search manager
|
// Add the game path to the search manager
|
||||||
SearchMan.clear();
|
SearchMan.clear();
|
||||||
SearchMan.addDirectory(fslist.begin()->getParent().getPath(), fslist.begin()->getParent());
|
SearchMan.addDirectory(fslist.begin()->getParent().getPath(), fslist.begin()->getParent());
|
||||||
|
@ -140,7 +140,7 @@ const Gob::GOBGameDescription *GobMetaEngine::detectOnceUponATime(const Common::
|
||||||
SearchMan.clear();
|
SearchMan.clear();
|
||||||
|
|
||||||
if ((gameType == Gob::kOnceUponATimeInvalid) || (platform == Gob::kOnceUponATimePlatformInvalid)) {
|
if ((gameType == Gob::kOnceUponATimeInvalid) || (platform == Gob::kOnceUponATimePlatformInvalid)) {
|
||||||
warning("GobMetaEngine::detectOnceUponATime(): Detection failed (%d, %d)",
|
warning("GobMetaEngineStatic::detectOnceUponATime(): Detection failed (%d, %d)",
|
||||||
(int)gameType, (int)platform);
|
(int)gameType, (int)platform);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -148,12 +148,12 @@ const Gob::GOBGameDescription *GobMetaEngine::detectOnceUponATime(const Common::
|
||||||
return &Gob::fallbackOnceUpon[gameType][platform];
|
return &Gob::fallbackOnceUpon[gameType][platform];
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *GobMetaEngine::getName() const {
|
const char *GobMetaEngineStatic::getName() const {
|
||||||
return "Gob";
|
return "Gob";
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *GobMetaEngine::getOriginalCopyright() const {
|
const char *GobMetaEngineStatic::getOriginalCopyright() const {
|
||||||
return "Goblins Games (C) Coktel Vision";
|
return "Goblins Games (C) Coktel Vision";
|
||||||
}
|
}
|
||||||
|
|
||||||
REGISTER_PLUGIN_STATIC(GOB_DETECTION, PLUGIN_TYPE_METAENGINE, GobMetaEngine);
|
REGISTER_PLUGIN_STATIC(GOB_DETECTION, PLUGIN_TYPE_METAENGINE, GobMetaEngineStatic);
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
// For struct GOBGameDescription.
|
// For struct GOBGameDescription.
|
||||||
#include "gob/detection/detection.h"
|
#include "gob/detection/detection.h"
|
||||||
|
|
||||||
class GobMetaEngineConnect : public AdvancedMetaEngineConnect {
|
class GobMetaEngine : public AdvancedMetaEngine {
|
||||||
public:
|
public:
|
||||||
const char *getName() const override {
|
const char *getName() const override {
|
||||||
return "gob";
|
return "gob";
|
||||||
|
@ -39,7 +39,7 @@ public:
|
||||||
bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
|
bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool GobMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
bool GobMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,11 +48,11 @@ bool Gob::GobEngine::hasFeature(EngineFeature f) const {
|
||||||
(f == kSupportsReturnToLauncher);
|
(f == kSupportsReturnToLauncher);
|
||||||
}
|
}
|
||||||
|
|
||||||
Common::Error GobMetaEngineConnect::createInstance(OSystem *syst, Engine **engine) const {
|
Common::Error GobMetaEngine::createInstance(OSystem *syst, Engine **engine) const {
|
||||||
return AdvancedMetaEngineConnect::createInstance(syst, engine);
|
return AdvancedMetaEngine::createInstance(syst, engine);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GobMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
bool GobMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
||||||
const Gob::GOBGameDescription *gd = (const Gob::GOBGameDescription *)desc;
|
const Gob::GOBGameDescription *gd = (const Gob::GOBGameDescription *)desc;
|
||||||
if (gd) {
|
if (gd) {
|
||||||
*engine = new Gob::GobEngine(syst);
|
*engine = new Gob::GobEngine(syst);
|
||||||
|
@ -63,9 +63,9 @@ bool GobMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const
|
||||||
|
|
||||||
|
|
||||||
#if PLUGIN_ENABLED_DYNAMIC(GOB)
|
#if PLUGIN_ENABLED_DYNAMIC(GOB)
|
||||||
REGISTER_PLUGIN_DYNAMIC(GOB, PLUGIN_TYPE_ENGINE, GobMetaEngineConnect);
|
REGISTER_PLUGIN_DYNAMIC(GOB, PLUGIN_TYPE_ENGINE, GobMetaEngine);
|
||||||
#else
|
#else
|
||||||
REGISTER_PLUGIN_STATIC(GOB, PLUGIN_TYPE_ENGINE, GobMetaEngineConnect);
|
REGISTER_PLUGIN_STATIC(GOB, PLUGIN_TYPE_ENGINE, GobMetaEngine);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace Gob {
|
namespace Gob {
|
||||||
|
|
|
@ -46,9 +46,9 @@ static const ADGameDescription gameDescriptions[] = {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class GriffonMetaEngine: public AdvancedMetaEngine {
|
class GriffonMetaEngineStatic: public AdvancedMetaEngineStatic {
|
||||||
public:
|
public:
|
||||||
GriffonMetaEngine() : AdvancedMetaEngine(Griffon::gameDescriptions, sizeof(ADGameDescription), griffonGames) {
|
GriffonMetaEngineStatic() : AdvancedMetaEngineStatic(Griffon::gameDescriptions, sizeof(ADGameDescription), griffonGames) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *getEngineId() const override {
|
const char *getEngineId() const override {
|
||||||
|
@ -64,4 +64,4 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
REGISTER_PLUGIN_STATIC(GRIFFON_DETECTION, PLUGIN_TYPE_METAENGINE, GriffonMetaEngine);
|
REGISTER_PLUGIN_STATIC(GRIFFON_DETECTION, PLUGIN_TYPE_METAENGINE, GriffonMetaEngineStatic);
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
|
|
||||||
#include "griffon/griffon.h"
|
#include "griffon/griffon.h"
|
||||||
|
|
||||||
class GriffonMetaEngineConnect: public AdvancedMetaEngineConnect {
|
class GriffonMetaEngine: public AdvancedMetaEngine {
|
||||||
public:
|
public:
|
||||||
const char *getName() const override {
|
const char *getName() const override {
|
||||||
return "griffon";
|
return "griffon";
|
||||||
|
@ -52,7 +52,7 @@ public:
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Common::String GriffonMetaEngineConnect::getSavegameFile(int saveGameIdx, const char *target) const {
|
Common::String GriffonMetaEngine::getSavegameFile(int saveGameIdx, const char *target) const {
|
||||||
if (saveGameIdx == kSavegameFilePattern) {
|
if (saveGameIdx == kSavegameFilePattern) {
|
||||||
// Pattern requested
|
// Pattern requested
|
||||||
return Common::String::format("%s.s##", target == nullptr ? getEngineId() : target);
|
return Common::String::format("%s.s##", target == nullptr ? getEngineId() : target);
|
||||||
|
@ -69,14 +69,14 @@ bool Griffon::GriffonEngine::hasFeature(EngineFeature f) const {
|
||||||
(f == kSupportsSavingDuringRuntime);
|
(f == kSupportsSavingDuringRuntime);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GriffonMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
bool GriffonMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
||||||
if (desc)
|
if (desc)
|
||||||
*engine = new Griffon::GriffonEngine(syst);
|
*engine = new Griffon::GriffonEngine(syst);
|
||||||
|
|
||||||
return desc != nullptr;
|
return desc != nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
Common::KeymapArray GriffonMetaEngineConnect::initKeymaps(const char *target) const {
|
Common::KeymapArray GriffonMetaEngine::initKeymaps(const char *target) const {
|
||||||
using namespace Common;
|
using namespace Common;
|
||||||
|
|
||||||
Keymap *engineKeyMap = new Keymap(Keymap::kKeymapTypeGame, "griffon", "The Griffon Legend");
|
Keymap *engineKeyMap = new Keymap(Keymap::kKeymapTypeGame, "griffon", "The Griffon Legend");
|
||||||
|
@ -143,7 +143,7 @@ Common::KeymapArray GriffonMetaEngineConnect::initKeymaps(const char *target) co
|
||||||
}
|
}
|
||||||
|
|
||||||
#if PLUGIN_ENABLED_DYNAMIC(GRIFFON)
|
#if PLUGIN_ENABLED_DYNAMIC(GRIFFON)
|
||||||
REGISTER_PLUGIN_DYNAMIC(GRIFFON, PLUGIN_TYPE_ENGINE, GriffonMetaEngineConnect);
|
REGISTER_PLUGIN_DYNAMIC(GRIFFON, PLUGIN_TYPE_ENGINE, GriffonMetaEngine);
|
||||||
#else
|
#else
|
||||||
REGISTER_PLUGIN_STATIC(GRIFFON, PLUGIN_TYPE_ENGINE, GriffonMetaEngineConnect);
|
REGISTER_PLUGIN_STATIC(GRIFFON, PLUGIN_TYPE_ENGINE, GriffonMetaEngine);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -327,9 +327,9 @@ static const ADExtraGuiOptionsMap optionsList[] = {
|
||||||
AD_EXTRA_GUI_OPTIONS_TERMINATOR
|
AD_EXTRA_GUI_OPTIONS_TERMINATOR
|
||||||
};
|
};
|
||||||
|
|
||||||
class GroovieMetaEngine : public AdvancedMetaEngine {
|
class GroovieMetaEngineStatic : public AdvancedMetaEngineStatic {
|
||||||
public:
|
public:
|
||||||
GroovieMetaEngine() : AdvancedMetaEngine(gameDescriptions, sizeof(GroovieGameDescription), groovieGames, optionsList) {
|
GroovieMetaEngineStatic() : AdvancedMetaEngineStatic(gameDescriptions, sizeof(GroovieGameDescription), groovieGames, optionsList) {
|
||||||
// Use kADFlagUseExtraAsHint in order to distinguish the 11th hour from
|
// Use kADFlagUseExtraAsHint in order to distinguish the 11th hour from
|
||||||
// its "Making of" as well as the Clandestiny Trailer; they all share
|
// its "Making of" as well as the Clandestiny Trailer; they all share
|
||||||
// the same MD5.
|
// the same MD5.
|
||||||
|
@ -361,4 +361,4 @@ public:
|
||||||
|
|
||||||
} // End of namespace Groovie
|
} // End of namespace Groovie
|
||||||
|
|
||||||
REGISTER_PLUGIN_STATIC(GROOVIE_DETECTION, PLUGIN_TYPE_METAENGINE, Groovie::GroovieMetaEngine);
|
REGISTER_PLUGIN_STATIC(GROOVIE_DETECTION, PLUGIN_TYPE_METAENGINE, Groovie::GroovieMetaEngineStatic);
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
|
|
||||||
namespace Groovie {
|
namespace Groovie {
|
||||||
|
|
||||||
class GroovieMetaEngineConnect : public AdvancedMetaEngineConnect {
|
class GroovieMetaEngine : public AdvancedMetaEngine {
|
||||||
public:
|
public:
|
||||||
const char *getName() const override {
|
const char *getName() const override {
|
||||||
return "groovie";
|
return "groovie";
|
||||||
|
@ -46,14 +46,14 @@ public:
|
||||||
SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const override;
|
SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool GroovieMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *gd) const {
|
bool GroovieMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *gd) const {
|
||||||
if (gd) {
|
if (gd) {
|
||||||
*engine = new GroovieEngine(syst, (const GroovieGameDescription *)gd);
|
*engine = new GroovieEngine(syst, (const GroovieGameDescription *)gd);
|
||||||
}
|
}
|
||||||
return gd != 0;
|
return gd != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GroovieMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
bool GroovieMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
return
|
return
|
||||||
(f == kSupportsListSaves) ||
|
(f == kSupportsListSaves) ||
|
||||||
(f == kSupportsLoadingDuringStartup) ||
|
(f == kSupportsLoadingDuringStartup) ||
|
||||||
|
@ -61,15 +61,15 @@ bool GroovieMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
||||||
(f == kSavesSupportMetaInfo);
|
(f == kSavesSupportMetaInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateList GroovieMetaEngineConnect::listSaves(const char *target) const {
|
SaveStateList GroovieMetaEngine::listSaves(const char *target) const {
|
||||||
return SaveLoad::listValidSaves(target);
|
return SaveLoad::listValidSaves(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
int GroovieMetaEngineConnect::getMaximumSaveSlot() const {
|
int GroovieMetaEngine::getMaximumSaveSlot() const {
|
||||||
return SaveLoad::getMaximumSlot();
|
return SaveLoad::getMaximumSlot();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GroovieMetaEngineConnect::removeSaveState(const char *target, int slot) const {
|
void GroovieMetaEngine::removeSaveState(const char *target, int slot) const {
|
||||||
if (!SaveLoad::isSlotValid(slot)) {
|
if (!SaveLoad::isSlotValid(slot)) {
|
||||||
// Invalid slot, do nothing
|
// Invalid slot, do nothing
|
||||||
return;
|
return;
|
||||||
|
@ -79,7 +79,7 @@ void GroovieMetaEngineConnect::removeSaveState(const char *target, int slot) con
|
||||||
g_system->getSavefileManager()->removeSavefile(filename);
|
g_system->getSavefileManager()->removeSavefile(filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateDescriptor GroovieMetaEngineConnect::querySaveMetaInfos(const char *target, int slot) const {
|
SaveStateDescriptor GroovieMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
|
||||||
SaveStateDescriptor desc;
|
SaveStateDescriptor desc;
|
||||||
|
|
||||||
Common::InSaveFile *savefile = SaveLoad::openForLoading(target, slot, &desc);
|
Common::InSaveFile *savefile = SaveLoad::openForLoading(target, slot, &desc);
|
||||||
|
@ -91,7 +91,7 @@ SaveStateDescriptor GroovieMetaEngineConnect::querySaveMetaInfos(const char *tar
|
||||||
} // End of namespace Groovie
|
} // End of namespace Groovie
|
||||||
|
|
||||||
#if PLUGIN_ENABLED_DYNAMIC(GROOVIE)
|
#if PLUGIN_ENABLED_DYNAMIC(GROOVIE)
|
||||||
REGISTER_PLUGIN_DYNAMIC(GROOVIE, PLUGIN_TYPE_ENGINE, Groovie::GroovieMetaEngineConnect);
|
REGISTER_PLUGIN_DYNAMIC(GROOVIE, PLUGIN_TYPE_ENGINE, Groovie::GroovieMetaEngine);
|
||||||
#else
|
#else
|
||||||
REGISTER_PLUGIN_STATIC(GROOVIE, PLUGIN_TYPE_ENGINE, Groovie::GroovieMetaEngineConnect);
|
REGISTER_PLUGIN_STATIC(GROOVIE, PLUGIN_TYPE_ENGINE, Groovie::GroovieMetaEngine);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -131,9 +131,9 @@ static const ADExtraGuiOptionsMap optionsList[] = {
|
||||||
AD_EXTRA_GUI_OPTIONS_TERMINATOR
|
AD_EXTRA_GUI_OPTIONS_TERMINATOR
|
||||||
};
|
};
|
||||||
|
|
||||||
class HDBMetaEngine : public AdvancedMetaEngine {
|
class HDBMetaEngineStatic : public AdvancedMetaEngineStatic {
|
||||||
public:
|
public:
|
||||||
HDBMetaEngine() : AdvancedMetaEngine(HDB::gameDescriptions, sizeof(ADGameDescription), hdbGames, optionsList) {
|
HDBMetaEngineStatic() : AdvancedMetaEngineStatic(HDB::gameDescriptions, sizeof(ADGameDescription), hdbGames, optionsList) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *getEngineId() const override {
|
const char *getEngineId() const override {
|
||||||
|
@ -149,4 +149,4 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
REGISTER_PLUGIN_STATIC(HDB_DETECTION, PLUGIN_TYPE_METAENGINE, HDBMetaEngine);
|
REGISTER_PLUGIN_STATIC(HDB_DETECTION, PLUGIN_TYPE_METAENGINE, HDBMetaEngineStatic);
|
||||||
|
|
|
@ -63,7 +63,7 @@ bool HDBGame::isHandango() const {
|
||||||
|
|
||||||
} // End of namespace HDB
|
} // End of namespace HDB
|
||||||
|
|
||||||
class HDBMetaEngineConnect : public AdvancedMetaEngineConnect {
|
class HDBMetaEngine : public AdvancedMetaEngine {
|
||||||
public:
|
public:
|
||||||
const char *getName() const override {
|
const char *getName() const override {
|
||||||
return "hdb";
|
return "hdb";
|
||||||
|
@ -79,7 +79,7 @@ public:
|
||||||
bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
|
bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool HDBMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
bool HDBMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
return
|
return
|
||||||
(f == kSupportsLoadingDuringStartup) ||
|
(f == kSupportsLoadingDuringStartup) ||
|
||||||
(f == kSupportsListSaves) ||
|
(f == kSupportsListSaves) ||
|
||||||
|
@ -95,14 +95,14 @@ bool HDB::HDBGame::hasFeature(Engine::EngineFeature f) const {
|
||||||
(f == kSupportsSavingDuringRuntime);
|
(f == kSupportsSavingDuringRuntime);
|
||||||
}
|
}
|
||||||
|
|
||||||
void HDBMetaEngineConnect::removeSaveState(const char *target, int slot) const {
|
void HDBMetaEngine::removeSaveState(const char *target, int slot) const {
|
||||||
Common::String fileName = Common::String::format("%s.%03d", target, slot);
|
Common::String fileName = Common::String::format("%s.%03d", target, slot);
|
||||||
g_system->getSavefileManager()->removeSavefile(fileName);
|
g_system->getSavefileManager()->removeSavefile(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
int HDBMetaEngineConnect::getMaximumSaveSlot() const { return 99; }
|
int HDBMetaEngine::getMaximumSaveSlot() const { return 99; }
|
||||||
|
|
||||||
SaveStateList HDBMetaEngineConnect::listSaves(const char *target) const {
|
SaveStateList HDBMetaEngine::listSaves(const char *target) const {
|
||||||
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
||||||
Common::StringArray filenames;
|
Common::StringArray filenames;
|
||||||
Common::String pattern = target;
|
Common::String pattern = target;
|
||||||
|
@ -150,7 +150,7 @@ SaveStateList HDBMetaEngineConnect::listSaves(const char *target) const {
|
||||||
return saveList;
|
return saveList;
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateDescriptor HDBMetaEngineConnect::querySaveMetaInfos(const char *target, int slot) const {
|
SaveStateDescriptor HDBMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
|
||||||
Common::ScopedPtr<Common::InSaveFile> in(g_system->getSavefileManager()->openForLoading(Common::String::format("%s.%03d", target, slot)));
|
Common::ScopedPtr<Common::InSaveFile> in(g_system->getSavefileManager()->openForLoading(Common::String::format("%s.%03d", target, slot)));
|
||||||
|
|
||||||
if (in) {
|
if (in) {
|
||||||
|
@ -176,7 +176,7 @@ SaveStateDescriptor HDBMetaEngineConnect::querySaveMetaInfos(const char *target,
|
||||||
return SaveStateDescriptor();
|
return SaveStateDescriptor();
|
||||||
}
|
}
|
||||||
|
|
||||||
Common::KeymapArray HDBMetaEngineConnect::initKeymaps(const char *target) const {
|
Common::KeymapArray HDBMetaEngine::initKeymaps(const char *target) const {
|
||||||
using namespace Common;
|
using namespace Common;
|
||||||
using namespace HDB;
|
using namespace HDB;
|
||||||
|
|
||||||
|
@ -260,7 +260,7 @@ Common::KeymapArray HDBMetaEngineConnect::initKeymaps(const char *target) const
|
||||||
return Keymap::arrayOf(engineKeyMap);
|
return Keymap::arrayOf(engineKeyMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool HDBMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
bool HDBMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
||||||
if (desc) {
|
if (desc) {
|
||||||
*engine = new HDB::HDBGame(syst, desc);
|
*engine = new HDB::HDBGame(syst, desc);
|
||||||
}
|
}
|
||||||
|
@ -269,7 +269,7 @@ bool HDBMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const
|
||||||
}
|
}
|
||||||
|
|
||||||
#if PLUGIN_ENABLED_DYNAMIC(HDB)
|
#if PLUGIN_ENABLED_DYNAMIC(HDB)
|
||||||
REGISTER_PLUGIN_DYNAMIC(HDB, PLUGIN_TYPE_ENGINE, HDBMetaEngineConnect);
|
REGISTER_PLUGIN_DYNAMIC(HDB, PLUGIN_TYPE_ENGINE, HDBMetaEngine);
|
||||||
#else
|
#else
|
||||||
REGISTER_PLUGIN_STATIC(HDB, PLUGIN_TYPE_ENGINE, HDBMetaEngineConnect);
|
REGISTER_PLUGIN_STATIC(HDB, PLUGIN_TYPE_ENGINE, HDBMetaEngine);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -63,9 +63,9 @@ const static char *directoryGlobs[] = {
|
||||||
0
|
0
|
||||||
};
|
};
|
||||||
|
|
||||||
class HopkinsMetaEngine : public AdvancedMetaEngine {
|
class HopkinsMetaEngineStatic : public AdvancedMetaEngineStatic {
|
||||||
public:
|
public:
|
||||||
HopkinsMetaEngine() : AdvancedMetaEngine(Hopkins::gameDescriptions, sizeof(Hopkins::HopkinsGameDescription), hopkinsGames, optionsList) {
|
HopkinsMetaEngineStatic() : AdvancedMetaEngineStatic(Hopkins::gameDescriptions, sizeof(Hopkins::HopkinsGameDescription), hopkinsGames, optionsList) {
|
||||||
_maxScanDepth = 3;
|
_maxScanDepth = 3;
|
||||||
_directoryGlobs = directoryGlobs;
|
_directoryGlobs = directoryGlobs;
|
||||||
}
|
}
|
||||||
|
@ -84,4 +84,4 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
REGISTER_PLUGIN_STATIC(HOPKINS_DETECTION, PLUGIN_TYPE_METAENGINE, HopkinsMetaEngine);
|
REGISTER_PLUGIN_STATIC(HOPKINS_DETECTION, PLUGIN_TYPE_METAENGINE, HopkinsMetaEngineStatic);
|
||||||
|
|
|
@ -59,7 +59,7 @@ const Common::String &HopkinsEngine::getTargetName() const {
|
||||||
|
|
||||||
} // End of namespace Hopkins
|
} // End of namespace Hopkins
|
||||||
|
|
||||||
class HopkinsMetaEngineConnect : public AdvancedMetaEngineConnect {
|
class HopkinsMetaEngine : public AdvancedMetaEngine {
|
||||||
public:
|
public:
|
||||||
const char *getName() const override {
|
const char *getName() const override {
|
||||||
return "hopkins";
|
return "hopkins";
|
||||||
|
@ -74,7 +74,7 @@ public:
|
||||||
SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const override;
|
SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool HopkinsMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
bool HopkinsMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
return
|
return
|
||||||
(f == kSupportsListSaves) ||
|
(f == kSupportsListSaves) ||
|
||||||
(f == kSupportsLoadingDuringStartup) ||
|
(f == kSupportsLoadingDuringStartup) ||
|
||||||
|
@ -91,7 +91,7 @@ bool Hopkins::HopkinsEngine::hasFeature(EngineFeature f) const {
|
||||||
(f == kSupportsSavingDuringRuntime);
|
(f == kSupportsSavingDuringRuntime);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool HopkinsMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
bool HopkinsMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
||||||
const Hopkins::HopkinsGameDescription *gd = (const Hopkins::HopkinsGameDescription *)desc;
|
const Hopkins::HopkinsGameDescription *gd = (const Hopkins::HopkinsGameDescription *)desc;
|
||||||
if (gd) {
|
if (gd) {
|
||||||
*engine = new Hopkins::HopkinsEngine(syst, gd);
|
*engine = new Hopkins::HopkinsEngine(syst, gd);
|
||||||
|
@ -99,7 +99,7 @@ bool HopkinsMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, co
|
||||||
return gd != 0;
|
return gd != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateList HopkinsMetaEngineConnect::listSaves(const char *target) const {
|
SaveStateList HopkinsMetaEngine::listSaves(const char *target) const {
|
||||||
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
||||||
Common::StringArray filenames;
|
Common::StringArray filenames;
|
||||||
Common::String saveDesc;
|
Common::String saveDesc;
|
||||||
|
@ -132,16 +132,16 @@ SaveStateList HopkinsMetaEngineConnect::listSaves(const char *target) const {
|
||||||
return saveList;
|
return saveList;
|
||||||
}
|
}
|
||||||
|
|
||||||
int HopkinsMetaEngineConnect::getMaximumSaveSlot() const {
|
int HopkinsMetaEngine::getMaximumSaveSlot() const {
|
||||||
return MAX_SAVES;
|
return MAX_SAVES;
|
||||||
}
|
}
|
||||||
|
|
||||||
void HopkinsMetaEngineConnect::removeSaveState(const char *target, int slot) const {
|
void HopkinsMetaEngine::removeSaveState(const char *target, int slot) const {
|
||||||
Common::String filename = Common::String::format("%s.%03d", target, slot);
|
Common::String filename = Common::String::format("%s.%03d", target, slot);
|
||||||
g_system->getSavefileManager()->removeSavefile(filename);
|
g_system->getSavefileManager()->removeSavefile(filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateDescriptor HopkinsMetaEngineConnect::querySaveMetaInfos(const char *target, int slot) const {
|
SaveStateDescriptor HopkinsMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
|
||||||
Common::String filename = Common::String::format("%s.%03d", target, slot);
|
Common::String filename = Common::String::format("%s.%03d", target, slot);
|
||||||
Common::InSaveFile *f = g_system->getSavefileManager()->openForLoading(filename);
|
Common::InSaveFile *f = g_system->getSavefileManager()->openForLoading(filename);
|
||||||
|
|
||||||
|
@ -168,7 +168,7 @@ SaveStateDescriptor HopkinsMetaEngineConnect::querySaveMetaInfos(const char *tar
|
||||||
}
|
}
|
||||||
|
|
||||||
#if PLUGIN_ENABLED_DYNAMIC(HOPKINS)
|
#if PLUGIN_ENABLED_DYNAMIC(HOPKINS)
|
||||||
REGISTER_PLUGIN_DYNAMIC(HOPKINS, PLUGIN_TYPE_ENGINE, HopkinsMetaEngineConnect);
|
REGISTER_PLUGIN_DYNAMIC(HOPKINS, PLUGIN_TYPE_ENGINE, HopkinsMetaEngine);
|
||||||
#else
|
#else
|
||||||
REGISTER_PLUGIN_STATIC(HOPKINS, PLUGIN_TYPE_ENGINE, HopkinsMetaEngineConnect);
|
REGISTER_PLUGIN_STATIC(HOPKINS, PLUGIN_TYPE_ENGINE, HopkinsMetaEngine);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -113,9 +113,9 @@ static const HugoGameDescription gameDescriptions[] = {
|
||||||
{AD_TABLE_END_MARKER, kGameTypeNone}
|
{AD_TABLE_END_MARKER, kGameTypeNone}
|
||||||
};
|
};
|
||||||
|
|
||||||
class HugoMetaEngine : public AdvancedMetaEngine {
|
class HugoMetaEngineStatic : public AdvancedMetaEngineStatic {
|
||||||
public:
|
public:
|
||||||
HugoMetaEngine() : AdvancedMetaEngine(gameDescriptions, sizeof(HugoGameDescription), hugoGames) {
|
HugoMetaEngineStatic() : AdvancedMetaEngineStatic(gameDescriptions, sizeof(HugoGameDescription), hugoGames) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *getEngineId() const override {
|
const char *getEngineId() const override {
|
||||||
|
@ -133,4 +133,4 @@ public:
|
||||||
|
|
||||||
} // End of namespace Hugo
|
} // End of namespace Hugo
|
||||||
|
|
||||||
REGISTER_PLUGIN_STATIC(HUGO_DETECTION, PLUGIN_TYPE_METAENGINE, Hugo::HugoMetaEngine);
|
REGISTER_PLUGIN_STATIC(HUGO_DETECTION, PLUGIN_TYPE_METAENGINE, Hugo::HugoMetaEngineStatic);
|
||||||
|
|
|
@ -40,7 +40,7 @@ const char *HugoEngine::getGameId() const {
|
||||||
return _gameDescription->desc.gameId;
|
return _gameDescription->desc.gameId;
|
||||||
}
|
}
|
||||||
|
|
||||||
class HugoMetaEngineConnect : public AdvancedMetaEngineConnect {
|
class HugoMetaEngine : public AdvancedMetaEngine {
|
||||||
public:
|
public:
|
||||||
const char *getName() const override {
|
const char *getName() const override {
|
||||||
return "hugo";
|
return "hugo";
|
||||||
|
@ -56,7 +56,7 @@ public:
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
bool HugoMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *gd) const {
|
bool HugoMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *gd) const {
|
||||||
if (gd) {
|
if (gd) {
|
||||||
*engine = new HugoEngine(syst, (const HugoGameDescription *)gd);
|
*engine = new HugoEngine(syst, (const HugoGameDescription *)gd);
|
||||||
((HugoEngine *)*engine)->initGame((const HugoGameDescription *)gd);
|
((HugoEngine *)*engine)->initGame((const HugoGameDescription *)gd);
|
||||||
|
@ -64,7 +64,7 @@ bool HugoMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const
|
||||||
return gd != 0;
|
return gd != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool HugoMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
bool HugoMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
return
|
return
|
||||||
(f == kSupportsListSaves) ||
|
(f == kSupportsListSaves) ||
|
||||||
(f == kSupportsLoadingDuringStartup) ||
|
(f == kSupportsLoadingDuringStartup) ||
|
||||||
|
@ -74,9 +74,9 @@ bool HugoMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
||||||
(f == kSavesSupportCreationDate);
|
(f == kSavesSupportCreationDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
int HugoMetaEngineConnect::getMaximumSaveSlot() const { return 99; }
|
int HugoMetaEngine::getMaximumSaveSlot() const { return 99; }
|
||||||
|
|
||||||
SaveStateList HugoMetaEngineConnect::listSaves(const char *target) const {
|
SaveStateList HugoMetaEngine::listSaves(const char *target) const {
|
||||||
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
||||||
Common::StringArray filenames;
|
Common::StringArray filenames;
|
||||||
Common::String pattern = target;
|
Common::String pattern = target;
|
||||||
|
@ -124,7 +124,7 @@ SaveStateList HugoMetaEngineConnect::listSaves(const char *target) const {
|
||||||
return saveList;
|
return saveList;
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateDescriptor HugoMetaEngineConnect::querySaveMetaInfos(const char *target, int slot) const {
|
SaveStateDescriptor HugoMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
|
||||||
Common::String fileName = Common::String::format("%s-%02d.SAV", target, slot);
|
Common::String fileName = Common::String::format("%s-%02d.SAV", target, slot);
|
||||||
Common::InSaveFile *file = g_system->getSavefileManager()->openForLoading(fileName);
|
Common::InSaveFile *file = g_system->getSavefileManager()->openForLoading(fileName);
|
||||||
|
|
||||||
|
@ -177,7 +177,7 @@ SaveStateDescriptor HugoMetaEngineConnect::querySaveMetaInfos(const char *target
|
||||||
return SaveStateDescriptor();
|
return SaveStateDescriptor();
|
||||||
}
|
}
|
||||||
|
|
||||||
void HugoMetaEngineConnect::removeSaveState(const char *target, int slot) const {
|
void HugoMetaEngine::removeSaveState(const char *target, int slot) const {
|
||||||
Common::String fileName = Common::String::format("%s-%02d.SAV", target, slot);
|
Common::String fileName = Common::String::format("%s-%02d.SAV", target, slot);
|
||||||
g_system->getSavefileManager()->removeSavefile(fileName);
|
g_system->getSavefileManager()->removeSavefile(fileName);
|
||||||
}
|
}
|
||||||
|
@ -185,9 +185,9 @@ void HugoMetaEngineConnect::removeSaveState(const char *target, int slot) const
|
||||||
} // End of namespace Hugo
|
} // End of namespace Hugo
|
||||||
|
|
||||||
#if PLUGIN_ENABLED_DYNAMIC(HUGO)
|
#if PLUGIN_ENABLED_DYNAMIC(HUGO)
|
||||||
REGISTER_PLUGIN_DYNAMIC(HUGO, PLUGIN_TYPE_ENGINE, Hugo::HugoMetaEngineConnect);
|
REGISTER_PLUGIN_DYNAMIC(HUGO, PLUGIN_TYPE_ENGINE, Hugo::HugoMetaEngine);
|
||||||
#else
|
#else
|
||||||
REGISTER_PLUGIN_STATIC(HUGO, PLUGIN_TYPE_ENGINE, Hugo::HugoMetaEngineConnect);
|
REGISTER_PLUGIN_STATIC(HUGO, PLUGIN_TYPE_ENGINE, Hugo::HugoMetaEngine);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace Hugo {
|
namespace Hugo {
|
||||||
|
|
|
@ -110,9 +110,9 @@ static const char * const directoryGlobs[] = {
|
||||||
0
|
0
|
||||||
};
|
};
|
||||||
|
|
||||||
class IllusionsMetaEngine : public AdvancedMetaEngine {
|
class IllusionsMetaEngineStatic : public AdvancedMetaEngineStatic {
|
||||||
public:
|
public:
|
||||||
IllusionsMetaEngine() : AdvancedMetaEngine(Illusions::gameDescriptions, sizeof(Illusions::IllusionsGameDescription), illusionsGames) {
|
IllusionsMetaEngineStatic() : AdvancedMetaEngineStatic(Illusions::gameDescriptions, sizeof(Illusions::IllusionsGameDescription), illusionsGames) {
|
||||||
_maxScanDepth = 2;
|
_maxScanDepth = 2;
|
||||||
_directoryGlobs = directoryGlobs;
|
_directoryGlobs = directoryGlobs;
|
||||||
}
|
}
|
||||||
|
@ -130,4 +130,4 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
REGISTER_PLUGIN_STATIC(ILLUSIONS_DETECTION, PLUGIN_TYPE_METAENGINE, IllusionsMetaEngine);
|
REGISTER_PLUGIN_STATIC(ILLUSIONS_DETECTION, PLUGIN_TYPE_METAENGINE, IllusionsMetaEngineStatic);
|
||||||
|
|
|
@ -45,7 +45,7 @@ Common::Language IllusionsEngine::getGameLanguage() const {
|
||||||
|
|
||||||
} // End of namespace Illusions
|
} // End of namespace Illusions
|
||||||
|
|
||||||
class IllusionsMetaEngineConnect : public AdvancedMetaEngineConnect {
|
class IllusionsMetaEngine : public AdvancedMetaEngine {
|
||||||
public:
|
public:
|
||||||
const char *getName() const override {
|
const char *getName() const override {
|
||||||
return "illusions";
|
return "illusions";
|
||||||
|
@ -60,7 +60,7 @@ public:
|
||||||
void removeSaveState(const char *target, int slot) const override;
|
void removeSaveState(const char *target, int slot) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool IllusionsMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
bool IllusionsMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
return
|
return
|
||||||
(f == kSupportsListSaves) ||
|
(f == kSupportsListSaves) ||
|
||||||
(f == kSupportsDeleteSave) ||
|
(f == kSupportsDeleteSave) ||
|
||||||
|
@ -70,16 +70,16 @@ bool IllusionsMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
||||||
(f == kSavesSupportCreationDate);
|
(f == kSavesSupportCreationDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IllusionsMetaEngineConnect::removeSaveState(const char *target, int slot) const {
|
void IllusionsMetaEngine::removeSaveState(const char *target, int slot) const {
|
||||||
Common::String fileName = Common::String::format("%s.%03d", target, slot);
|
Common::String fileName = Common::String::format("%s.%03d", target, slot);
|
||||||
g_system->getSavefileManager()->removeSavefile(fileName);
|
g_system->getSavefileManager()->removeSavefile(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
int IllusionsMetaEngineConnect::getMaximumSaveSlot() const {
|
int IllusionsMetaEngine::getMaximumSaveSlot() const {
|
||||||
return 999;
|
return 999;
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateList IllusionsMetaEngineConnect::listSaves(const char *target) const {
|
SaveStateList IllusionsMetaEngine::listSaves(const char *target) const {
|
||||||
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
||||||
Illusions::IllusionsEngine::SaveHeader header;
|
Illusions::IllusionsEngine::SaveHeader header;
|
||||||
Common::String pattern = target;
|
Common::String pattern = target;
|
||||||
|
@ -104,7 +104,7 @@ SaveStateList IllusionsMetaEngineConnect::listSaves(const char *target) const {
|
||||||
return saveList;
|
return saveList;
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateDescriptor IllusionsMetaEngineConnect::querySaveMetaInfos(const char *target, int slot) const {
|
SaveStateDescriptor IllusionsMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
|
||||||
Common::String filename = Illusions::IllusionsEngine::getSavegameFilename(target, slot);
|
Common::String filename = Illusions::IllusionsEngine::getSavegameFilename(target, slot);
|
||||||
Common::InSaveFile *in = g_system->getSavefileManager()->openForLoading(filename.c_str());
|
Common::InSaveFile *in = g_system->getSavefileManager()->openForLoading(filename.c_str());
|
||||||
if (in) {
|
if (in) {
|
||||||
|
@ -127,7 +127,7 @@ SaveStateDescriptor IllusionsMetaEngineConnect::querySaveMetaInfos(const char *t
|
||||||
return SaveStateDescriptor();
|
return SaveStateDescriptor();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IllusionsMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
bool IllusionsMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
||||||
const Illusions::IllusionsGameDescription *gd = (const Illusions::IllusionsGameDescription *)desc;
|
const Illusions::IllusionsGameDescription *gd = (const Illusions::IllusionsGameDescription *)desc;
|
||||||
if (gd) {
|
if (gd) {
|
||||||
switch (gd->gameId) {
|
switch (gd->gameId) {
|
||||||
|
@ -146,7 +146,7 @@ bool IllusionsMetaEngineConnect::createInstance(OSystem *syst, Engine **engine,
|
||||||
}
|
}
|
||||||
|
|
||||||
#if PLUGIN_ENABLED_DYNAMIC(ILLUSIONS)
|
#if PLUGIN_ENABLED_DYNAMIC(ILLUSIONS)
|
||||||
REGISTER_PLUGIN_DYNAMIC(ILLUSIONS, PLUGIN_TYPE_ENGINE, IllusionsMetaEngineConnect);
|
REGISTER_PLUGIN_DYNAMIC(ILLUSIONS, PLUGIN_TYPE_ENGINE, IllusionsMetaEngine);
|
||||||
#else
|
#else
|
||||||
REGISTER_PLUGIN_STATIC(ILLUSIONS, PLUGIN_TYPE_ENGINE, IllusionsMetaEngineConnect);
|
REGISTER_PLUGIN_STATIC(ILLUSIONS, PLUGIN_TYPE_ENGINE, IllusionsMetaEngine);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -72,9 +72,9 @@ static const ADGameDescription gameDescriptions[] = {
|
||||||
|
|
||||||
} // End of namespace Kingdom
|
} // End of namespace Kingdom
|
||||||
|
|
||||||
class KingdomMetaEngine : public AdvancedMetaEngine {
|
class KingdomMetaEngineStatic : public AdvancedMetaEngineStatic {
|
||||||
public:
|
public:
|
||||||
KingdomMetaEngine() : AdvancedMetaEngine(Kingdom::gameDescriptions, sizeof(ADGameDescription), kingdomGames) {
|
KingdomMetaEngineStatic() : AdvancedMetaEngineStatic(Kingdom::gameDescriptions, sizeof(ADGameDescription), kingdomGames) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *getEngineId() const override {
|
const char *getEngineId() const override {
|
||||||
|
@ -90,4 +90,4 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
REGISTER_PLUGIN_STATIC(KINGDOM_DETECTION, PLUGIN_TYPE_METAENGINE, KingdomMetaEngine);
|
REGISTER_PLUGIN_STATIC(KINGDOM_DETECTION, PLUGIN_TYPE_METAENGINE, KingdomMetaEngineStatic);
|
||||||
|
|
|
@ -38,7 +38,7 @@ Common::Platform KingdomGame::getPlatform() const { return _gameDescription->pla
|
||||||
} // End of namespace Kingdom
|
} // End of namespace Kingdom
|
||||||
|
|
||||||
|
|
||||||
class KingdomMetaEngineConnect : public AdvancedMetaEngineConnect {
|
class KingdomMetaEngine : public AdvancedMetaEngine {
|
||||||
public:
|
public:
|
||||||
const char *getName() const override {
|
const char *getName() const override {
|
||||||
return "kingdom";
|
return "kingdom";
|
||||||
|
@ -53,7 +53,7 @@ public:
|
||||||
SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const override;
|
SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool KingdomMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
bool KingdomMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
return
|
return
|
||||||
(f == kSupportsListSaves) ||
|
(f == kSupportsListSaves) ||
|
||||||
(f == kSupportsLoadingDuringStartup) ||
|
(f == kSupportsLoadingDuringStartup) ||
|
||||||
|
@ -63,18 +63,18 @@ bool KingdomMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
||||||
(f == kSavesSupportCreationDate);
|
(f == kSavesSupportCreationDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool KingdomMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
bool KingdomMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
||||||
if (desc)
|
if (desc)
|
||||||
*engine = new Kingdom::KingdomGame(syst, desc);
|
*engine = new Kingdom::KingdomGame(syst, desc);
|
||||||
|
|
||||||
return desc != nullptr;
|
return desc != nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
int KingdomMetaEngineConnect::getMaximumSaveSlot() const {
|
int KingdomMetaEngine::getMaximumSaveSlot() const {
|
||||||
return MAX_SAVES;
|
return MAX_SAVES;
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateList KingdomMetaEngineConnect::listSaves(const char *target) const {
|
SaveStateList KingdomMetaEngine::listSaves(const char *target) const {
|
||||||
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
||||||
Common::StringArray filenames;
|
Common::StringArray filenames;
|
||||||
Common::String saveDesc;
|
Common::String saveDesc;
|
||||||
|
@ -110,12 +110,12 @@ SaveStateList KingdomMetaEngineConnect::listSaves(const char *target) const {
|
||||||
return saveList;
|
return saveList;
|
||||||
}
|
}
|
||||||
|
|
||||||
void KingdomMetaEngineConnect::removeSaveState(const char *target, int slot) const {
|
void KingdomMetaEngine::removeSaveState(const char *target, int slot) const {
|
||||||
Common::String filename = Common::String::format("%s.%03d", target, slot);
|
Common::String filename = Common::String::format("%s.%03d", target, slot);
|
||||||
g_system->getSavefileManager()->removeSavefile(filename);
|
g_system->getSavefileManager()->removeSavefile(filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateDescriptor KingdomMetaEngineConnect::querySaveMetaInfos(const char *target, int slot) const {
|
SaveStateDescriptor KingdomMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
|
||||||
Common::String filename = Common::String::format("%s.%03d", target, slot);
|
Common::String filename = Common::String::format("%s.%03d", target, slot);
|
||||||
Common::InSaveFile *f = g_system->getSavefileManager()->openForLoading(filename);
|
Common::InSaveFile *f = g_system->getSavefileManager()->openForLoading(filename);
|
||||||
|
|
||||||
|
@ -137,7 +137,7 @@ SaveStateDescriptor KingdomMetaEngineConnect::querySaveMetaInfos(const char *tar
|
||||||
}
|
}
|
||||||
|
|
||||||
#if PLUGIN_ENABLED_DYNAMIC(KINGDOM)
|
#if PLUGIN_ENABLED_DYNAMIC(KINGDOM)
|
||||||
REGISTER_PLUGIN_DYNAMIC(KINGDOM, PLUGIN_TYPE_ENGINE, KingdomMetaEngineConnect);
|
REGISTER_PLUGIN_DYNAMIC(KINGDOM, PLUGIN_TYPE_ENGINE, KingdomMetaEngine);
|
||||||
#else
|
#else
|
||||||
REGISTER_PLUGIN_STATIC(KINGDOM, PLUGIN_TYPE_ENGINE, KingdomMetaEngineConnect);
|
REGISTER_PLUGIN_STATIC(KINGDOM, PLUGIN_TYPE_ENGINE, KingdomMetaEngine);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -144,9 +144,9 @@ const ADExtraGuiOptionsMap gameGuiOptions[] = {
|
||||||
|
|
||||||
} // End of anonymous namespace
|
} // End of anonymous namespace
|
||||||
|
|
||||||
class KyraMetaEngine : public AdvancedMetaEngine {
|
class KyraMetaEngineStatic : public AdvancedMetaEngineStatic {
|
||||||
public:
|
public:
|
||||||
KyraMetaEngine() : AdvancedMetaEngine(adGameDescs, sizeof(KYRAGameDescription), gameList, gameGuiOptions) {
|
KyraMetaEngineStatic() : AdvancedMetaEngineStatic(adGameDescs, sizeof(KYRAGameDescription), gameList, gameGuiOptions) {
|
||||||
_md5Bytes = 1024 * 1024;
|
_md5Bytes = 1024 * 1024;
|
||||||
_maxScanDepth = 2;
|
_maxScanDepth = 2;
|
||||||
_directoryGlobs = directoryGlobs;
|
_directoryGlobs = directoryGlobs;
|
||||||
|
@ -172,4 +172,4 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
REGISTER_PLUGIN_STATIC(KYRA_DETECTION, PLUGIN_TYPE_METAENGINE, KyraMetaEngine);
|
REGISTER_PLUGIN_STATIC(KYRA_DETECTION, PLUGIN_TYPE_METAENGINE, KyraMetaEngineStatic);
|
||||||
|
|
|
@ -48,7 +48,7 @@ namespace Graphics {
|
||||||
struct Surface;
|
struct Surface;
|
||||||
}
|
}
|
||||||
|
|
||||||
class KyraMetaEngineConnect;
|
class KyraMetaEngine;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is the namespace of the Kyra engine.
|
* This is the namespace of the Kyra engine.
|
||||||
|
@ -147,7 +147,7 @@ struct Button;
|
||||||
|
|
||||||
class KyraEngine_v1 : public Engine {
|
class KyraEngine_v1 : public Engine {
|
||||||
friend class Debugger;
|
friend class Debugger;
|
||||||
friend class ::KyraMetaEngineConnect;
|
friend class ::KyraMetaEngine;
|
||||||
friend class GUI;
|
friend class GUI;
|
||||||
friend class GUI_v1;
|
friend class GUI_v1;
|
||||||
friend class GUI_EoB;
|
friend class GUI_EoB;
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
|
|
||||||
#include "kyra/detection.h"
|
#include "kyra/detection.h"
|
||||||
|
|
||||||
class KyraMetaEngineConnect : public AdvancedMetaEngineConnect {
|
class KyraMetaEngine : public AdvancedMetaEngine {
|
||||||
public:
|
public:
|
||||||
const char *getName() const override {
|
const char *getName() const override {
|
||||||
return "kyra";
|
return "kyra";
|
||||||
|
@ -56,7 +56,7 @@ public:
|
||||||
Common::KeymapArray initKeymaps(const char *target) const override;
|
Common::KeymapArray initKeymaps(const char *target) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool KyraMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
bool KyraMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
return
|
return
|
||||||
(f == kSupportsListSaves) ||
|
(f == kSupportsListSaves) ||
|
||||||
(f == kSupportsLoadingDuringStartup) ||
|
(f == kSupportsLoadingDuringStartup) ||
|
||||||
|
@ -74,7 +74,7 @@ bool Kyra::KyraEngine_v1::hasFeature(EngineFeature f) const {
|
||||||
(f == kSupportsSubtitleOptions);
|
(f == kSupportsSubtitleOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool KyraMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
bool KyraMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
||||||
const KYRAGameDescription *gd = (const KYRAGameDescription *)desc;
|
const KYRAGameDescription *gd = (const KYRAGameDescription *)desc;
|
||||||
bool res = true;
|
bool res = true;
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ bool KyraMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateList KyraMetaEngineConnect::listSaves(const char *target) const {
|
SaveStateList KyraMetaEngine::listSaves(const char *target) const {
|
||||||
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
||||||
Kyra::KyraEngine_v1::SaveHeader header;
|
Kyra::KyraEngine_v1::SaveHeader header;
|
||||||
Common::String pattern = target;
|
Common::String pattern = target;
|
||||||
|
@ -169,11 +169,11 @@ SaveStateList KyraMetaEngineConnect::listSaves(const char *target) const {
|
||||||
return saveList;
|
return saveList;
|
||||||
}
|
}
|
||||||
|
|
||||||
int KyraMetaEngineConnect::getMaximumSaveSlot() const {
|
int KyraMetaEngine::getMaximumSaveSlot() const {
|
||||||
return 999;
|
return 999;
|
||||||
}
|
}
|
||||||
|
|
||||||
void KyraMetaEngineConnect::removeSaveState(const char *target, int slot) const {
|
void KyraMetaEngine::removeSaveState(const char *target, int slot) const {
|
||||||
// In Kyra games slot 0 can't be deleted, it's for restarting the game(s).
|
// In Kyra games slot 0 can't be deleted, it's for restarting the game(s).
|
||||||
// An exception makes Lands of Lore here, it does not have any way to restart the
|
// An exception makes Lands of Lore here, it does not have any way to restart the
|
||||||
// game except via its main menu.
|
// game except via its main menu.
|
||||||
|
@ -184,7 +184,7 @@ void KyraMetaEngineConnect::removeSaveState(const char *target, int slot) const
|
||||||
g_system->getSavefileManager()->removeSavefile(filename);
|
g_system->getSavefileManager()->removeSavefile(filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateDescriptor KyraMetaEngineConnect::querySaveMetaInfos(const char *target, int slot) const {
|
SaveStateDescriptor KyraMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
|
||||||
Common::String filename = Kyra::KyraEngine_v1::getSavegameFilename(target, slot);
|
Common::String filename = Kyra::KyraEngine_v1::getSavegameFilename(target, slot);
|
||||||
Common::InSaveFile *in = g_system->getSavefileManager()->openForLoading(filename);
|
Common::InSaveFile *in = g_system->getSavefileManager()->openForLoading(filename);
|
||||||
const bool nonKyraGame = ConfMan.getDomain(target)->getVal("gameid").equalsIgnoreCase("lol") || ConfMan.getDomain(target)->getVal("gameid").equalsIgnoreCase("eob") || ConfMan.getDomain(target)->getVal("gameid").equalsIgnoreCase("eob2");
|
const bool nonKyraGame = ConfMan.getDomain(target)->getVal("gameid").equalsIgnoreCase("lol") || ConfMan.getDomain(target)->getVal("gameid").equalsIgnoreCase("eob") || ConfMan.getDomain(target)->getVal("gameid").equalsIgnoreCase("eob2");
|
||||||
|
@ -223,7 +223,7 @@ SaveStateDescriptor KyraMetaEngineConnect::querySaveMetaInfos(const char *target
|
||||||
return desc;
|
return desc;
|
||||||
}
|
}
|
||||||
|
|
||||||
Common::KeymapArray KyraMetaEngineConnect::initKeymaps(const char *target) const {
|
Common::KeymapArray KyraMetaEngine::initKeymaps(const char *target) const {
|
||||||
Common::String gameId = ConfMan.get("gameid", target);
|
Common::String gameId = ConfMan.get("gameid", target);
|
||||||
|
|
||||||
#ifdef ENABLE_LOL
|
#ifdef ENABLE_LOL
|
||||||
|
@ -238,11 +238,11 @@ Common::KeymapArray KyraMetaEngineConnect::initKeymaps(const char *target) const
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return AdvancedMetaEngineConnect::initKeymaps(target);
|
return AdvancedMetaEngine::initKeymaps(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if PLUGIN_ENABLED_DYNAMIC(KYRA)
|
#if PLUGIN_ENABLED_DYNAMIC(KYRA)
|
||||||
REGISTER_PLUGIN_DYNAMIC(KYRA, PLUGIN_TYPE_ENGINE, KyraMetaEngineConnect);
|
REGISTER_PLUGIN_DYNAMIC(KYRA, PLUGIN_TYPE_ENGINE, KyraMetaEngine);
|
||||||
#else
|
#else
|
||||||
REGISTER_PLUGIN_STATIC(KYRA, PLUGIN_TYPE_ENGINE, KyraMetaEngineConnect);
|
REGISTER_PLUGIN_STATIC(KYRA, PLUGIN_TYPE_ENGINE, KyraMetaEngine);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -101,9 +101,9 @@ static const char *const directoryGlobs[] = {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class LabMetaEngine : public AdvancedMetaEngine {
|
class LabMetaEngineStatic : public AdvancedMetaEngineStatic {
|
||||||
public:
|
public:
|
||||||
LabMetaEngine() : AdvancedMetaEngine(labDescriptions, sizeof(ADGameDescription), lab_setting) {
|
LabMetaEngineStatic() : AdvancedMetaEngineStatic(labDescriptions, sizeof(ADGameDescription), lab_setting) {
|
||||||
_maxScanDepth = 4;
|
_maxScanDepth = 4;
|
||||||
_directoryGlobs = directoryGlobs;
|
_directoryGlobs = directoryGlobs;
|
||||||
_flags = kADFlagUseExtraAsHint;
|
_flags = kADFlagUseExtraAsHint;
|
||||||
|
@ -122,4 +122,4 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
REGISTER_PLUGIN_STATIC(LAB_DETECTION, PLUGIN_TYPE_METAENGINE, LabMetaEngine);
|
REGISTER_PLUGIN_STATIC(LAB_DETECTION, PLUGIN_TYPE_METAENGINE, LabMetaEngineStatic);
|
||||||
|
|
|
@ -43,7 +43,7 @@ uint32 LabEngine::getFeatures() const {
|
||||||
|
|
||||||
} // End of namespace Lab
|
} // End of namespace Lab
|
||||||
|
|
||||||
class LabMetaEngineConnect : public AdvancedMetaEngineConnect {
|
class LabMetaEngine : public AdvancedMetaEngine {
|
||||||
public:
|
public:
|
||||||
const char *getName() const override {
|
const char *getName() const override {
|
||||||
return "lab";
|
return "lab";
|
||||||
|
@ -62,7 +62,7 @@ public:
|
||||||
SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const override;
|
SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool LabMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
bool LabMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
return
|
return
|
||||||
(f == kSupportsListSaves) ||
|
(f == kSupportsListSaves) ||
|
||||||
(f == kSupportsLoadingDuringStartup) ||
|
(f == kSupportsLoadingDuringStartup) ||
|
||||||
|
@ -81,7 +81,7 @@ bool Lab::LabEngine::hasFeature(EngineFeature f) const {
|
||||||
(f == kSupportsSavingDuringRuntime);
|
(f == kSupportsSavingDuringRuntime);
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateList LabMetaEngineConnect::listSaves(const char *target) const {
|
SaveStateList LabMetaEngine::listSaves(const char *target) const {
|
||||||
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
||||||
Lab::SaveGameHeader header;
|
Lab::SaveGameHeader header;
|
||||||
Common::String pattern = target;
|
Common::String pattern = target;
|
||||||
|
@ -111,16 +111,16 @@ SaveStateList LabMetaEngineConnect::listSaves(const char *target) const {
|
||||||
return saveList;
|
return saveList;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LabMetaEngineConnect::getMaximumSaveSlot() const {
|
int LabMetaEngine::getMaximumSaveSlot() const {
|
||||||
return 999;
|
return 999;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LabMetaEngineConnect::removeSaveState(const char *target, int slot) const {
|
void LabMetaEngine::removeSaveState(const char *target, int slot) const {
|
||||||
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
||||||
saveFileMan->removeSavefile(Common::String::format("%s.%03u", target, slot));
|
saveFileMan->removeSavefile(Common::String::format("%s.%03u", target, slot));
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateDescriptor LabMetaEngineConnect::querySaveMetaInfos(const char *target, int slot) const {
|
SaveStateDescriptor LabMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
|
||||||
Common::String filename = Common::String::format("%s.%03u", target, slot);
|
Common::String filename = Common::String::format("%s.%03u", target, slot);
|
||||||
Common::InSaveFile *in = g_system->getSavefileManager()->openForLoading(filename.c_str());
|
Common::InSaveFile *in = g_system->getSavefileManager()->openForLoading(filename.c_str());
|
||||||
|
|
||||||
|
@ -145,7 +145,7 @@ SaveStateDescriptor LabMetaEngineConnect::querySaveMetaInfos(const char *target,
|
||||||
}
|
}
|
||||||
|
|
||||||
#if PLUGIN_ENABLED_DYNAMIC(LAB)
|
#if PLUGIN_ENABLED_DYNAMIC(LAB)
|
||||||
REGISTER_PLUGIN_DYNAMIC(LAB, PLUGIN_TYPE_ENGINE, LabMetaEngineConnect);
|
REGISTER_PLUGIN_DYNAMIC(LAB, PLUGIN_TYPE_ENGINE, LabMetaEngine);
|
||||||
#else
|
#else
|
||||||
REGISTER_PLUGIN_STATIC(LAB, PLUGIN_TYPE_ENGINE, LabMetaEngineConnect);
|
REGISTER_PLUGIN_STATIC(LAB, PLUGIN_TYPE_ENGINE, LabMetaEngine);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -223,9 +223,9 @@ static const ADGameDescription gameDescriptions[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class LastExpressMetaEngine : public AdvancedMetaEngine {
|
class LastExpressMetaEngineStatic : public AdvancedMetaEngineStatic {
|
||||||
public:
|
public:
|
||||||
LastExpressMetaEngine() : AdvancedMetaEngine(gameDescriptions, sizeof(ADGameDescription), lastExpressGames) {
|
LastExpressMetaEngineStatic() : AdvancedMetaEngineStatic(gameDescriptions, sizeof(ADGameDescription), lastExpressGames) {
|
||||||
_guiOptions = GUIO2(GUIO_NOSUBTITLES, GUIO_NOSFX);
|
_guiOptions = GUIO2(GUIO_NOSUBTITLES, GUIO_NOSFX);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -244,4 +244,4 @@ public:
|
||||||
|
|
||||||
} // End of namespace LastExpress
|
} // End of namespace LastExpress
|
||||||
|
|
||||||
REGISTER_PLUGIN_STATIC(LASTEXPRESS_DETECTION, PLUGIN_TYPE_METAENGINE, LastExpress::LastExpressMetaEngine);
|
REGISTER_PLUGIN_STATIC(LASTEXPRESS_DETECTION, PLUGIN_TYPE_METAENGINE, LastExpress::LastExpressMetaEngineStatic);
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
namespace LastExpress {
|
namespace LastExpress {
|
||||||
|
|
||||||
class LastExpressMetaEngineConnect : public AdvancedMetaEngineConnect {
|
class LastExpressMetaEngine : public AdvancedMetaEngine {
|
||||||
public:
|
public:
|
||||||
const char *getName() const override {
|
const char *getName() const override {
|
||||||
return "lastexpress";
|
return "lastexpress";
|
||||||
|
@ -35,7 +35,7 @@ protected:
|
||||||
bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *gd) const override;
|
bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *gd) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool LastExpressMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *gd) const {
|
bool LastExpressMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *gd) const {
|
||||||
if (gd) {
|
if (gd) {
|
||||||
*engine = new LastExpressEngine(syst, (const ADGameDescription *)gd);
|
*engine = new LastExpressEngine(syst, (const ADGameDescription *)gd);
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@ bool LastExpressEngine::isDemo() const {
|
||||||
} // End of namespace LastExpress
|
} // End of namespace LastExpress
|
||||||
|
|
||||||
#if PLUGIN_ENABLED_DYNAMIC(LASTEXPRESS)
|
#if PLUGIN_ENABLED_DYNAMIC(LASTEXPRESS)
|
||||||
REGISTER_PLUGIN_DYNAMIC(LASTEXPRESS, PLUGIN_TYPE_ENGINE, LastExpress::LastExpressMetaEngineConnect);
|
REGISTER_PLUGIN_DYNAMIC(LASTEXPRESS, PLUGIN_TYPE_ENGINE, LastExpress::LastExpressMetaEngine);
|
||||||
#else
|
#else
|
||||||
REGISTER_PLUGIN_STATIC(LASTEXPRESS, PLUGIN_TYPE_ENGINE, LastExpress::LastExpressMetaEngineConnect);
|
REGISTER_PLUGIN_STATIC(LASTEXPRESS, PLUGIN_TYPE_ENGINE, LastExpress::LastExpressMetaEngine);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -104,9 +104,9 @@ static const LilliputGameDescription gameDescriptions[] = {
|
||||||
{AD_TABLE_END_MARKER, kGameTypeNone}
|
{AD_TABLE_END_MARKER, kGameTypeNone}
|
||||||
};
|
};
|
||||||
|
|
||||||
class LilliputMetaEngine : public AdvancedMetaEngine {
|
class LilliputMetaEngineStatic : public AdvancedMetaEngineStatic {
|
||||||
public:
|
public:
|
||||||
LilliputMetaEngine() : AdvancedMetaEngine(gameDescriptions, sizeof(LilliputGameDescription), lilliputGames) {
|
LilliputMetaEngineStatic() : AdvancedMetaEngineStatic(gameDescriptions, sizeof(LilliputGameDescription), lilliputGames) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *getEngineId() const override {
|
const char *getEngineId() const override {
|
||||||
|
@ -124,4 +124,4 @@ public:
|
||||||
|
|
||||||
} // End of namespace Lilliput
|
} // End of namespace Lilliput
|
||||||
|
|
||||||
REGISTER_PLUGIN_STATIC(LILLIPUT_DETECTION, PLUGIN_TYPE_METAENGINE, Lilliput::LilliputMetaEngine);
|
REGISTER_PLUGIN_STATIC(LILLIPUT_DETECTION, PLUGIN_TYPE_METAENGINE, Lilliput::LilliputMetaEngineStatic);
|
||||||
|
|
|
@ -44,7 +44,7 @@ const char *LilliputEngine::getGameId() const {
|
||||||
|
|
||||||
namespace Lilliput {
|
namespace Lilliput {
|
||||||
|
|
||||||
class LilliputMetaEngineConnect : public AdvancedMetaEngineConnect {
|
class LilliputMetaEngine : public AdvancedMetaEngine {
|
||||||
public:
|
public:
|
||||||
const char *getName() const override {
|
const char *getName() const override {
|
||||||
return "lilliput";
|
return "lilliput";
|
||||||
|
@ -59,7 +59,7 @@ public:
|
||||||
void removeSaveState(const char *target, int slot) const override;
|
void removeSaveState(const char *target, int slot) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool LilliputMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *gd) const {
|
bool LilliputMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *gd) const {
|
||||||
if (gd) {
|
if (gd) {
|
||||||
*engine = new LilliputEngine(syst, (const LilliputGameDescription *)gd);
|
*engine = new LilliputEngine(syst, (const LilliputGameDescription *)gd);
|
||||||
((LilliputEngine *)*engine)->initGame((const LilliputGameDescription *)gd);
|
((LilliputEngine *)*engine)->initGame((const LilliputGameDescription *)gd);
|
||||||
|
@ -67,7 +67,7 @@ bool LilliputMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, c
|
||||||
return gd != 0;
|
return gd != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool LilliputMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
bool LilliputMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
return
|
return
|
||||||
(f == kSupportsListSaves) ||
|
(f == kSupportsListSaves) ||
|
||||||
(f == kSupportsLoadingDuringStartup) ||
|
(f == kSupportsLoadingDuringStartup) ||
|
||||||
|
@ -77,11 +77,11 @@ bool LilliputMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
||||||
(f == kSavesSupportCreationDate);
|
(f == kSavesSupportCreationDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
int LilliputMetaEngineConnect::getMaximumSaveSlot() const {
|
int LilliputMetaEngine::getMaximumSaveSlot() const {
|
||||||
return 99;
|
return 99;
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateList LilliputMetaEngineConnect::listSaves(const char *target) const {
|
SaveStateList LilliputMetaEngine::listSaves(const char *target) const {
|
||||||
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
||||||
Common::StringArray filenames;
|
Common::StringArray filenames;
|
||||||
Common::String pattern = target;
|
Common::String pattern = target;
|
||||||
|
@ -129,7 +129,7 @@ SaveStateList LilliputMetaEngineConnect::listSaves(const char *target) const {
|
||||||
return saveList;
|
return saveList;
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateDescriptor LilliputMetaEngineConnect::querySaveMetaInfos(const char *target, int slot) const {
|
SaveStateDescriptor LilliputMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
|
||||||
Common::String fileName = Common::String::format("%s-%02d.SAV", target, slot);
|
Common::String fileName = Common::String::format("%s-%02d.SAV", target, slot);
|
||||||
Common::InSaveFile *file = g_system->getSavefileManager()->openForLoading(fileName);
|
Common::InSaveFile *file = g_system->getSavefileManager()->openForLoading(fileName);
|
||||||
|
|
||||||
|
@ -186,7 +186,7 @@ SaveStateDescriptor LilliputMetaEngineConnect::querySaveMetaInfos(const char *ta
|
||||||
return SaveStateDescriptor();
|
return SaveStateDescriptor();
|
||||||
}
|
}
|
||||||
|
|
||||||
void LilliputMetaEngineConnect::removeSaveState(const char *target, int slot) const {
|
void LilliputMetaEngine::removeSaveState(const char *target, int slot) const {
|
||||||
Common::String fileName = Common::String::format("%s-%02d.SAV", target, slot);
|
Common::String fileName = Common::String::format("%s-%02d.SAV", target, slot);
|
||||||
g_system->getSavefileManager()->removeSavefile(fileName);
|
g_system->getSavefileManager()->removeSavefile(fileName);
|
||||||
}
|
}
|
||||||
|
@ -194,9 +194,9 @@ void LilliputMetaEngineConnect::removeSaveState(const char *target, int slot) co
|
||||||
} // End of namespace Lilliput
|
} // End of namespace Lilliput
|
||||||
|
|
||||||
#if PLUGIN_ENABLED_DYNAMIC(LILLIPUT)
|
#if PLUGIN_ENABLED_DYNAMIC(LILLIPUT)
|
||||||
REGISTER_PLUGIN_DYNAMIC(LILLIPUT, PLUGIN_TYPE_ENGINE, Lilliput::LilliputMetaEngineConnect);
|
REGISTER_PLUGIN_DYNAMIC(LILLIPUT, PLUGIN_TYPE_ENGINE, Lilliput::LilliputMetaEngine);
|
||||||
#else
|
#else
|
||||||
REGISTER_PLUGIN_STATIC(LILLIPUT, PLUGIN_TYPE_ENGINE, Lilliput::LilliputMetaEngineConnect);
|
REGISTER_PLUGIN_STATIC(LILLIPUT, PLUGIN_TYPE_ENGINE, Lilliput::LilliputMetaEngine);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace Lilliput {
|
namespace Lilliput {
|
||||||
|
|
|
@ -202,9 +202,9 @@ static const LureGameDescription gameDescriptions[] = {
|
||||||
|
|
||||||
} // End of namespace Lure
|
} // End of namespace Lure
|
||||||
|
|
||||||
class LureMetaEngine : public AdvancedMetaEngine {
|
class LureMetaEngineStatic : public AdvancedMetaEngineStatic {
|
||||||
public:
|
public:
|
||||||
LureMetaEngine() : AdvancedMetaEngine(Lure::gameDescriptions, sizeof(Lure::LureGameDescription), lureGames
|
LureMetaEngineStatic() : AdvancedMetaEngineStatic(Lure::gameDescriptions, sizeof(Lure::LureGameDescription), lureGames
|
||||||
#ifdef USE_TTS
|
#ifdef USE_TTS
|
||||||
, optionsList
|
, optionsList
|
||||||
#endif
|
#endif
|
||||||
|
@ -230,4 +230,4 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
REGISTER_PLUGIN_STATIC(LURE_DETECTION, PLUGIN_TYPE_METAENGINE, LureMetaEngine);
|
REGISTER_PLUGIN_STATIC(LURE_DETECTION, PLUGIN_TYPE_METAENGINE, LureMetaEngineStatic);
|
||||||
|
|
|
@ -50,7 +50,7 @@ LureLanguage LureEngine::getLureLanguage() const {
|
||||||
|
|
||||||
} // End of namespace Lure
|
} // End of namespace Lure
|
||||||
|
|
||||||
class LureMetaEngineConnect : public AdvancedMetaEngineConnect {
|
class LureMetaEngine : public AdvancedMetaEngine {
|
||||||
public:
|
public:
|
||||||
const char *getName() const override {
|
const char *getName() const override {
|
||||||
return "lure";
|
return "lure";
|
||||||
|
@ -64,7 +64,7 @@ public:
|
||||||
void removeSaveState(const char *target, int slot) const override;
|
void removeSaveState(const char *target, int slot) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool LureMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
bool LureMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
return
|
return
|
||||||
(f == kSupportsListSaves) ||
|
(f == kSupportsListSaves) ||
|
||||||
(f == kSupportsLoadingDuringStartup) ||
|
(f == kSupportsLoadingDuringStartup) ||
|
||||||
|
@ -78,7 +78,7 @@ bool Lure::LureEngine::hasFeature(EngineFeature f) const {
|
||||||
(f == kSupportsSavingDuringRuntime);
|
(f == kSupportsSavingDuringRuntime);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool LureMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
bool LureMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
||||||
const Lure::LureGameDescription *gd = (const Lure::LureGameDescription *)desc;
|
const Lure::LureGameDescription *gd = (const Lure::LureGameDescription *)desc;
|
||||||
if (gd) {
|
if (gd) {
|
||||||
*engine = new Lure::LureEngine(syst, gd);
|
*engine = new Lure::LureEngine(syst, gd);
|
||||||
|
@ -86,7 +86,7 @@ bool LureMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const
|
||||||
return gd != 0;
|
return gd != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateList LureMetaEngineConnect::listSaves(const char *target) const {
|
SaveStateList LureMetaEngine::listSaves(const char *target) const {
|
||||||
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
||||||
Common::StringArray filenames;
|
Common::StringArray filenames;
|
||||||
Common::String saveDesc;
|
Common::String saveDesc;
|
||||||
|
@ -114,9 +114,9 @@ SaveStateList LureMetaEngineConnect::listSaves(const char *target) const {
|
||||||
return saveList;
|
return saveList;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LureMetaEngineConnect::getMaximumSaveSlot() const { return 999; }
|
int LureMetaEngine::getMaximumSaveSlot() const { return 999; }
|
||||||
|
|
||||||
void LureMetaEngineConnect::removeSaveState(const char *target, int slot) const {
|
void LureMetaEngine::removeSaveState(const char *target, int slot) const {
|
||||||
Common::String filename = target;
|
Common::String filename = target;
|
||||||
filename += Common::String::format(".%03d", slot);
|
filename += Common::String::format(".%03d", slot);
|
||||||
|
|
||||||
|
@ -124,7 +124,7 @@ void LureMetaEngineConnect::removeSaveState(const char *target, int slot) const
|
||||||
}
|
}
|
||||||
|
|
||||||
#if PLUGIN_ENABLED_DYNAMIC(LURE)
|
#if PLUGIN_ENABLED_DYNAMIC(LURE)
|
||||||
REGISTER_PLUGIN_DYNAMIC(LURE, PLUGIN_TYPE_ENGINE, LureMetaEngineConnect);
|
REGISTER_PLUGIN_DYNAMIC(LURE, PLUGIN_TYPE_ENGINE, LureMetaEngine);
|
||||||
#else
|
#else
|
||||||
REGISTER_PLUGIN_STATIC(LURE, PLUGIN_TYPE_ENGINE, LureMetaEngineConnect);
|
REGISTER_PLUGIN_STATIC(LURE, PLUGIN_TYPE_ENGINE, LureMetaEngine);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -50,9 +50,9 @@ namespace MacVenture {
|
||||||
|
|
||||||
SaveStateDescriptor loadMetaData(Common::SeekableReadStream *s, int slot, bool skipThumbnail = true);
|
SaveStateDescriptor loadMetaData(Common::SeekableReadStream *s, int slot, bool skipThumbnail = true);
|
||||||
|
|
||||||
class MacVentureMetaEngine : public AdvancedMetaEngine {
|
class MacVentureMetaEngineStatic : public AdvancedMetaEngineStatic {
|
||||||
public:
|
public:
|
||||||
MacVentureMetaEngine() : AdvancedMetaEngine(MacVenture::gameDescriptions, sizeof(ADGameDescription), macventureGames) {
|
MacVentureMetaEngineStatic() : AdvancedMetaEngineStatic(MacVenture::gameDescriptions, sizeof(ADGameDescription), macventureGames) {
|
||||||
_guiOptions = GUIO1(GUIO_NOMIDI);
|
_guiOptions = GUIO1(GUIO_NOMIDI);
|
||||||
_md5Bytes = 5000000; // TODO: Upper limit, adjust it once all games are added
|
_md5Bytes = 5000000; // TODO: Upper limit, adjust it once all games are added
|
||||||
}
|
}
|
||||||
|
@ -72,4 +72,4 @@ public:
|
||||||
|
|
||||||
} // End of namespace MacVenture
|
} // End of namespace MacVenture
|
||||||
|
|
||||||
REGISTER_PLUGIN_STATIC(MACVENTURE_DETECTION, PLUGIN_TYPE_METAENGINE, MacVenture::MacVentureMetaEngine);
|
REGISTER_PLUGIN_STATIC(MACVENTURE_DETECTION, PLUGIN_TYPE_METAENGINE, MacVenture::MacVentureMetaEngineStatic);
|
||||||
|
|
|
@ -40,7 +40,7 @@ namespace MacVenture {
|
||||||
|
|
||||||
SaveStateDescriptor loadMetaData(Common::SeekableReadStream *s, int slot, bool skipThumbnail = true);
|
SaveStateDescriptor loadMetaData(Common::SeekableReadStream *s, int slot, bool skipThumbnail = true);
|
||||||
|
|
||||||
class MacVentureMetaEngineConnect : public AdvancedMetaEngineConnect {
|
class MacVentureMetaEngine : public AdvancedMetaEngine {
|
||||||
public:
|
public:
|
||||||
const char *getName() const override {
|
const char *getName() const override {
|
||||||
return "macventure";
|
return "macventure";
|
||||||
|
@ -56,7 +56,7 @@ protected:
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
bool MacVentureMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
bool MacVentureMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
return
|
return
|
||||||
(f == kSupportsListSaves) ||
|
(f == kSupportsListSaves) ||
|
||||||
(f == kSupportsLoadingDuringStartup) ||
|
(f == kSupportsLoadingDuringStartup) ||
|
||||||
|
@ -74,7 +74,7 @@ bool MacVentureEngine::hasFeature(EngineFeature f) const {
|
||||||
(f == kSupportsSavingDuringRuntime);
|
(f == kSupportsSavingDuringRuntime);
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateList MacVentureMetaEngineConnect::listSaves(const char *target) const {
|
SaveStateList MacVentureMetaEngine::listSaves(const char *target) const {
|
||||||
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
||||||
Common::StringArray filenames;
|
Common::StringArray filenames;
|
||||||
Common::String pattern = target;
|
Common::String pattern = target;
|
||||||
|
@ -111,21 +111,21 @@ SaveStateList MacVentureMetaEngineConnect::listSaves(const char *target) const {
|
||||||
return saveList;
|
return saveList;
|
||||||
}
|
}
|
||||||
|
|
||||||
int MacVentureMetaEngineConnect::getMaximumSaveSlot() const { return 999; }
|
int MacVentureMetaEngine::getMaximumSaveSlot() const { return 999; }
|
||||||
|
|
||||||
bool MacVentureMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *game) const {
|
bool MacVentureMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *game) const {
|
||||||
if (game) {
|
if (game) {
|
||||||
*engine = new MacVenture::MacVentureEngine(syst, game);
|
*engine = new MacVenture::MacVentureEngine(syst, game);
|
||||||
}
|
}
|
||||||
return game != 0;
|
return game != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MacVentureMetaEngineConnect::removeSaveState(const char *target, int slot) const {
|
void MacVentureMetaEngine::removeSaveState(const char *target, int slot) const {
|
||||||
g_system->getSavefileManager()->removeSavefile(Common::String::format("%s.%03d", target, slot));
|
g_system->getSavefileManager()->removeSavefile(Common::String::format("%s.%03d", target, slot));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SaveStateDescriptor MacVentureMetaEngineConnect::querySaveMetaInfos(const char *target, int slot) const {
|
SaveStateDescriptor MacVentureMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
|
||||||
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
||||||
SaveStateDescriptor desc;
|
SaveStateDescriptor desc;
|
||||||
Common::String saveFileName;
|
Common::String saveFileName;
|
||||||
|
@ -151,7 +151,7 @@ SaveStateDescriptor MacVentureMetaEngineConnect::querySaveMetaInfos(const char *
|
||||||
} // End of namespace MacVenture
|
} // End of namespace MacVenture
|
||||||
|
|
||||||
#if PLUGIN_ENABLED_DYNAMIC(MACVENTURE)
|
#if PLUGIN_ENABLED_DYNAMIC(MACVENTURE)
|
||||||
REGISTER_PLUGIN_DYNAMIC(MACVENTURE, PLUGIN_TYPE_ENGINE, MacVenture::MacVentureMetaEngineConnect);
|
REGISTER_PLUGIN_DYNAMIC(MACVENTURE, PLUGIN_TYPE_ENGINE, MacVenture::MacVentureMetaEngine);
|
||||||
#else
|
#else
|
||||||
REGISTER_PLUGIN_STATIC(MACVENTURE, PLUGIN_TYPE_ENGINE, MacVenture::MacVentureMetaEngineConnect);
|
REGISTER_PLUGIN_STATIC(MACVENTURE, PLUGIN_TYPE_ENGINE, MacVenture::MacVentureMetaEngine);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -35,9 +35,9 @@ static const PlainGameDescriptor madeGames[] = {
|
||||||
|
|
||||||
#include "made/detection_tables.h"
|
#include "made/detection_tables.h"
|
||||||
|
|
||||||
class MadeMetaEngine : public AdvancedMetaEngine {
|
class MadeMetaEngineStatic : public AdvancedMetaEngineStatic {
|
||||||
public:
|
public:
|
||||||
MadeMetaEngine() : AdvancedMetaEngine(Made::gameDescriptions, sizeof(Made::MadeGameDescription), madeGames) {
|
MadeMetaEngineStatic() : AdvancedMetaEngineStatic(Made::gameDescriptions, sizeof(Made::MadeGameDescription), madeGames) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *getEngineId() const override {
|
const char *getEngineId() const override {
|
||||||
|
@ -55,7 +55,7 @@ public:
|
||||||
ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const override;
|
ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
ADDetectedGame MadeMetaEngine::fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const {
|
ADDetectedGame MadeMetaEngineStatic::fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const {
|
||||||
// Set the default values for the fallback descriptor's ADGameDescription part.
|
// Set the default values for the fallback descriptor's ADGameDescription part.
|
||||||
Made::g_fallbackDesc.desc.language = Common::UNK_LANG;
|
Made::g_fallbackDesc.desc.language = Common::UNK_LANG;
|
||||||
Made::g_fallbackDesc.desc.platform = Common::kPlatformDOS;
|
Made::g_fallbackDesc.desc.platform = Common::kPlatformDOS;
|
||||||
|
@ -70,4 +70,4 @@ ADDetectedGame MadeMetaEngine::fallbackDetect(const FileMap &allFiles, const Com
|
||||||
return ADDetectedGame();
|
return ADDetectedGame();
|
||||||
}
|
}
|
||||||
|
|
||||||
REGISTER_PLUGIN_STATIC(MADE_DETECTION, PLUGIN_TYPE_METAENGINE, MadeMetaEngine);
|
REGISTER_PLUGIN_STATIC(MADE_DETECTION, PLUGIN_TYPE_METAENGINE, MadeMetaEngineStatic);
|
||||||
|
|
|
@ -45,7 +45,7 @@ uint16 MadeEngine::getVersion() const {
|
||||||
|
|
||||||
} // End of namespace Made
|
} // End of namespace Made
|
||||||
|
|
||||||
class MadeMetaEngineConnect : public AdvancedMetaEngineConnect {
|
class MadeMetaEngine : public AdvancedMetaEngine {
|
||||||
public:
|
public:
|
||||||
const char *getName() const override {
|
const char *getName() const override {
|
||||||
return "made";
|
return "made";
|
||||||
|
@ -55,7 +55,7 @@ public:
|
||||||
bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
|
bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool MadeMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
bool MadeMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
return
|
return
|
||||||
false;
|
false;
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,7 @@ bool Made::MadeEngine::hasFeature(EngineFeature f) const {
|
||||||
(f == kSupportsReturnToLauncher);
|
(f == kSupportsReturnToLauncher);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MadeMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
bool MadeMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
||||||
const Made::MadeGameDescription *gd = (const Made::MadeGameDescription *)desc;
|
const Made::MadeGameDescription *gd = (const Made::MadeGameDescription *)desc;
|
||||||
if (gd) {
|
if (gd) {
|
||||||
*engine = new Made::MadeEngine(syst, gd);
|
*engine = new Made::MadeEngine(syst, gd);
|
||||||
|
@ -74,7 +74,7 @@ bool MadeMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const
|
||||||
}
|
}
|
||||||
|
|
||||||
#if PLUGIN_ENABLED_DYNAMIC(MADE)
|
#if PLUGIN_ENABLED_DYNAMIC(MADE)
|
||||||
REGISTER_PLUGIN_DYNAMIC(MADE, PLUGIN_TYPE_ENGINE, MadeMetaEngineConnect);
|
REGISTER_PLUGIN_DYNAMIC(MADE, PLUGIN_TYPE_ENGINE, MadeMetaEngine);
|
||||||
#else
|
#else
|
||||||
REGISTER_PLUGIN_STATIC(MADE, PLUGIN_TYPE_ENGINE, MadeMetaEngineConnect);
|
REGISTER_PLUGIN_STATIC(MADE, PLUGIN_TYPE_ENGINE, MadeMetaEngine);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -114,9 +114,9 @@ static const ADExtraGuiOptionsMap optionsList[] = {
|
||||||
AD_EXTRA_GUI_OPTIONS_TERMINATOR
|
AD_EXTRA_GUI_OPTIONS_TERMINATOR
|
||||||
};
|
};
|
||||||
|
|
||||||
class MADSMetaEngine : public AdvancedMetaEngine {
|
class MADSMetaEngineStatic : public AdvancedMetaEngineStatic {
|
||||||
public:
|
public:
|
||||||
MADSMetaEngine() : AdvancedMetaEngine(MADS::gameDescriptions, sizeof(MADS::MADSGameDescription), MADSGames, optionsList) {
|
MADSMetaEngineStatic() : AdvancedMetaEngineStatic(MADS::gameDescriptions, sizeof(MADS::MADSGameDescription), MADSGames, optionsList) {
|
||||||
_maxScanDepth = 3;
|
_maxScanDepth = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -133,4 +133,4 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
REGISTER_PLUGIN_STATIC(MADS_DETECTION, PLUGIN_TYPE_METAENGINE, MADSMetaEngine);
|
REGISTER_PLUGIN_STATIC(MADS_DETECTION, PLUGIN_TYPE_METAENGINE, MADSMetaEngineStatic);
|
||||||
|
|
|
@ -63,7 +63,7 @@ Common::Platform MADSEngine::getPlatform() const {
|
||||||
|
|
||||||
} // End of namespace MADS
|
} // End of namespace MADS
|
||||||
|
|
||||||
class MADSMetaEngineConnect : public AdvancedMetaEngineConnect {
|
class MADSMetaEngine : public AdvancedMetaEngine {
|
||||||
public:
|
public:
|
||||||
const char *getName() const override {
|
const char *getName() const override {
|
||||||
return "mads";
|
return "mads";
|
||||||
|
@ -78,7 +78,7 @@ public:
|
||||||
SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const override;
|
SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool MADSMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
bool MADSMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
return
|
return
|
||||||
(f == kSupportsListSaves) ||
|
(f == kSupportsListSaves) ||
|
||||||
(f == kSupportsLoadingDuringStartup) ||
|
(f == kSupportsLoadingDuringStartup) ||
|
||||||
|
@ -95,7 +95,7 @@ bool MADS::MADSEngine::hasFeature(EngineFeature f) const {
|
||||||
(f == kSupportsSavingDuringRuntime);
|
(f == kSupportsSavingDuringRuntime);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MADSMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
bool MADSMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
||||||
const MADS::MADSGameDescription *gd = (const MADS::MADSGameDescription *)desc;
|
const MADS::MADSGameDescription *gd = (const MADS::MADSGameDescription *)desc;
|
||||||
if (gd) {
|
if (gd) {
|
||||||
*engine = new MADS::MADSEngine(syst, gd);
|
*engine = new MADS::MADSEngine(syst, gd);
|
||||||
|
@ -103,7 +103,7 @@ bool MADSMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const
|
||||||
return gd != 0;
|
return gd != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateList MADSMetaEngineConnect::listSaves(const char *target) const {
|
SaveStateList MADSMetaEngine::listSaves(const char *target) const {
|
||||||
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
||||||
Common::StringArray filenames;
|
Common::StringArray filenames;
|
||||||
Common::String saveDesc;
|
Common::String saveDesc;
|
||||||
|
@ -133,16 +133,16 @@ SaveStateList MADSMetaEngineConnect::listSaves(const char *target) const {
|
||||||
return saveList;
|
return saveList;
|
||||||
}
|
}
|
||||||
|
|
||||||
int MADSMetaEngineConnect::getMaximumSaveSlot() const {
|
int MADSMetaEngine::getMaximumSaveSlot() const {
|
||||||
return MAX_SAVES;
|
return MAX_SAVES;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MADSMetaEngineConnect::removeSaveState(const char *target, int slot) const {
|
void MADSMetaEngine::removeSaveState(const char *target, int slot) const {
|
||||||
Common::String filename = Common::String::format("%s.%03d", target, slot);
|
Common::String filename = Common::String::format("%s.%03d", target, slot);
|
||||||
g_system->getSavefileManager()->removeSavefile(filename);
|
g_system->getSavefileManager()->removeSavefile(filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateDescriptor MADSMetaEngineConnect::querySaveMetaInfos(const char *target, int slot) const {
|
SaveStateDescriptor MADSMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
|
||||||
Common::String filename = Common::String::format("%s.%03d", target, slot);
|
Common::String filename = Common::String::format("%s.%03d", target, slot);
|
||||||
Common::InSaveFile *f = g_system->getSavefileManager()->openForLoading(filename);
|
Common::InSaveFile *f = g_system->getSavefileManager()->openForLoading(filename);
|
||||||
|
|
||||||
|
@ -168,7 +168,7 @@ SaveStateDescriptor MADSMetaEngineConnect::querySaveMetaInfos(const char *target
|
||||||
}
|
}
|
||||||
|
|
||||||
#if PLUGIN_ENABLED_DYNAMIC(MADS)
|
#if PLUGIN_ENABLED_DYNAMIC(MADS)
|
||||||
REGISTER_PLUGIN_DYNAMIC(MADS, PLUGIN_TYPE_ENGINE, MADSMetaEngineConnect);
|
REGISTER_PLUGIN_DYNAMIC(MADS, PLUGIN_TYPE_ENGINE, MADSMetaEngine);
|
||||||
#else
|
#else
|
||||||
REGISTER_PLUGIN_STATIC(MADS, PLUGIN_TYPE_ENGINE, MADSMetaEngineConnect);
|
REGISTER_PLUGIN_STATIC(MADS, PLUGIN_TYPE_ENGINE, MADSMetaEngine);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -76,9 +76,9 @@ static const char *directoryGlobs[] = {
|
||||||
nullptr
|
nullptr
|
||||||
};
|
};
|
||||||
|
|
||||||
class MohawkMetaEngine : public AdvancedMetaEngine {
|
class MohawkMetaEngineStatic : public AdvancedMetaEngineStatic {
|
||||||
public:
|
public:
|
||||||
MohawkMetaEngine() : AdvancedMetaEngine(Mohawk::gameDescriptions, sizeof(Mohawk::MohawkGameDescription), mohawkGames) {
|
MohawkMetaEngineStatic() : AdvancedMetaEngineStatic(Mohawk::gameDescriptions, sizeof(Mohawk::MohawkGameDescription), mohawkGames) {
|
||||||
_maxScanDepth = 2;
|
_maxScanDepth = 2;
|
||||||
_directoryGlobs = directoryGlobs;
|
_directoryGlobs = directoryGlobs;
|
||||||
}
|
}
|
||||||
|
@ -104,8 +104,8 @@ public:
|
||||||
void registerDefaultSettings(const Common::String &target) const override;
|
void registerDefaultSettings(const Common::String &target) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
DetectedGame MohawkMetaEngine::toDetectedGame(const ADDetectedGame &adGame) const {
|
DetectedGame MohawkMetaEngineStatic::toDetectedGame(const ADDetectedGame &adGame) const {
|
||||||
DetectedGame game = AdvancedMetaEngine::toDetectedGame(adGame);
|
DetectedGame game = AdvancedMetaEngineStatic::toDetectedGame(adGame);
|
||||||
|
|
||||||
// The AdvancedDetector model only allows specifying a single supported
|
// The AdvancedDetector model only allows specifying a single supported
|
||||||
// game language. The 25th anniversary edition Myst games are multilanguage.
|
// game language. The 25th anniversary edition Myst games are multilanguage.
|
||||||
|
@ -132,7 +132,7 @@ DetectedGame MohawkMetaEngine::toDetectedGame(const ADDetectedGame &adGame) cons
|
||||||
return game;
|
return game;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MohawkMetaEngine::registerDefaultSettings(const Common::String &target) const {
|
void MohawkMetaEngineStatic::registerDefaultSettings(const Common::String &target) const {
|
||||||
Common::String gameId = ConfMan.get("gameid", target);
|
Common::String gameId = ConfMan.get("gameid", target);
|
||||||
|
|
||||||
if (gameId == "myst" || gameId == "makingofmyst") {
|
if (gameId == "myst" || gameId == "makingofmyst") {
|
||||||
|
@ -143,7 +143,7 @@ void MohawkMetaEngine::registerDefaultSettings(const Common::String &target) con
|
||||||
return Mohawk::MohawkMetaEngine_Riven::registerDefaultSettings();
|
return Mohawk::MohawkMetaEngine_Riven::registerDefaultSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
return AdvancedMetaEngine::registerDefaultSettings(target);
|
return AdvancedMetaEngineStatic::registerDefaultSettings(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
REGISTER_PLUGIN_STATIC(MOHAWK_DETECTION, PLUGIN_TYPE_METAENGINE, MohawkMetaEngine);
|
REGISTER_PLUGIN_STATIC(MOHAWK_DETECTION, PLUGIN_TYPE_METAENGINE, MohawkMetaEngineStatic);
|
||||||
|
|
|
@ -119,7 +119,7 @@ bool MohawkEngine_Riven::hasFeature(EngineFeature f) const {
|
||||||
|
|
||||||
} // End of Namespace Mohawk
|
} // End of Namespace Mohawk
|
||||||
|
|
||||||
class MohawkMetaEngineConnect : public AdvancedMetaEngineConnect {
|
class MohawkMetaEngine : public AdvancedMetaEngine {
|
||||||
public:
|
public:
|
||||||
const char *getName() const override {
|
const char *getName() const override {
|
||||||
return "mohawk";
|
return "mohawk";
|
||||||
|
@ -139,7 +139,7 @@ public:
|
||||||
GUI::OptionsContainerWidget *buildEngineOptionsWidgetDynamic(GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const override;
|
GUI::OptionsContainerWidget *buildEngineOptionsWidgetDynamic(GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool MohawkMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
bool MohawkMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
return
|
return
|
||||||
(f == kSupportsListSaves)
|
(f == kSupportsListSaves)
|
||||||
|| (f == kSupportsLoadingDuringStartup)
|
|| (f == kSupportsLoadingDuringStartup)
|
||||||
|
@ -150,7 +150,7 @@ bool MohawkMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
||||||
|| (f == kSavesSupportPlayTime);
|
|| (f == kSavesSupportPlayTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateList MohawkMetaEngineConnect::listSavesForPrefix(const char *prefix, const char *extension) const {
|
SaveStateList MohawkMetaEngine::listSavesForPrefix(const char *prefix, const char *extension) const {
|
||||||
Common::String pattern = Common::String::format("%s-###.%s", prefix, extension);
|
Common::String pattern = Common::String::format("%s-###.%s", prefix, extension);
|
||||||
Common::StringArray filenames = g_system->getSavefileManager()->listSavefiles(pattern);
|
Common::StringArray filenames = g_system->getSavefileManager()->listSavefiles(pattern);
|
||||||
size_t prefixLen = strlen(prefix);
|
size_t prefixLen = strlen(prefix);
|
||||||
|
@ -174,7 +174,7 @@ SaveStateList MohawkMetaEngineConnect::listSavesForPrefix(const char *prefix, co
|
||||||
return saveList;
|
return saveList;
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateList MohawkMetaEngineConnect::listSaves(const char *target) const {
|
SaveStateList MohawkMetaEngine::listSaves(const char *target) const {
|
||||||
Common::String gameId = ConfMan.get("gameid", target);
|
Common::String gameId = ConfMan.get("gameid", target);
|
||||||
SaveStateList saveList;
|
SaveStateList saveList;
|
||||||
|
|
||||||
|
@ -207,7 +207,7 @@ SaveStateList MohawkMetaEngineConnect::listSaves(const char *target) const {
|
||||||
return saveList;
|
return saveList;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MohawkMetaEngineConnect::removeSaveState(const char *target, int slot) const {
|
void MohawkMetaEngine::removeSaveState(const char *target, int slot) const {
|
||||||
Common::String gameId = ConfMan.get("gameid", target);
|
Common::String gameId = ConfMan.get("gameid", target);
|
||||||
|
|
||||||
// Removing saved games is only supported in Myst/Riven currently.
|
// Removing saved games is only supported in Myst/Riven currently.
|
||||||
|
@ -223,7 +223,7 @@ void MohawkMetaEngineConnect::removeSaveState(const char *target, int slot) cons
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateDescriptor MohawkMetaEngineConnect::querySaveMetaInfos(const char *target, int slot) const {
|
SaveStateDescriptor MohawkMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
|
||||||
Common::String gameId = ConfMan.get("gameid", target);
|
Common::String gameId = ConfMan.get("gameid", target);
|
||||||
|
|
||||||
#ifdef ENABLE_MYST
|
#ifdef ENABLE_MYST
|
||||||
|
@ -241,7 +241,7 @@ SaveStateDescriptor MohawkMetaEngineConnect::querySaveMetaInfos(const char *targ
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Common::KeymapArray MohawkMetaEngineConnect::initKeymaps(const char *target) const {
|
Common::KeymapArray MohawkMetaEngine::initKeymaps(const char *target) const {
|
||||||
Common::String gameId = ConfMan.get("gameid", target);
|
Common::String gameId = ConfMan.get("gameid", target);
|
||||||
|
|
||||||
#ifdef ENABLE_MYST
|
#ifdef ENABLE_MYST
|
||||||
|
@ -255,10 +255,10 @@ Common::KeymapArray MohawkMetaEngineConnect::initKeymaps(const char *target) con
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return AdvancedMetaEngineConnect::initKeymaps(target);
|
return AdvancedMetaEngine::initKeymaps(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MohawkMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
bool MohawkMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
||||||
const Mohawk::MohawkGameDescription *gd = (const Mohawk::MohawkGameDescription *)desc;
|
const Mohawk::MohawkGameDescription *gd = (const Mohawk::MohawkGameDescription *)desc;
|
||||||
|
|
||||||
if (gd) {
|
if (gd) {
|
||||||
|
@ -309,7 +309,7 @@ bool MohawkMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, con
|
||||||
return (gd != nullptr);
|
return (gd != nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
GUI::OptionsContainerWidget *MohawkMetaEngineConnect::buildEngineOptionsWidgetDynamic(GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const {
|
GUI::OptionsContainerWidget *MohawkMetaEngine::buildEngineOptionsWidgetDynamic(GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const {
|
||||||
Common::String gameId = ConfMan.get("gameid", target);
|
Common::String gameId = ConfMan.get("gameid", target);
|
||||||
|
|
||||||
#ifdef ENABLE_MYST
|
#ifdef ENABLE_MYST
|
||||||
|
@ -323,11 +323,11 @@ GUI::OptionsContainerWidget *MohawkMetaEngineConnect::buildEngineOptionsWidgetDy
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return MetaEngineConnect::buildEngineOptionsWidgetDynamic(boss, name, target);
|
return MetaEngine::buildEngineOptionsWidgetDynamic(boss, name, target);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if PLUGIN_ENABLED_DYNAMIC(MOHAWK)
|
#if PLUGIN_ENABLED_DYNAMIC(MOHAWK)
|
||||||
REGISTER_PLUGIN_DYNAMIC(MOHAWK, PLUGIN_TYPE_ENGINE, MohawkMetaEngineConnect);
|
REGISTER_PLUGIN_DYNAMIC(MOHAWK, PLUGIN_TYPE_ENGINE, MohawkMetaEngine);
|
||||||
#else
|
#else
|
||||||
REGISTER_PLUGIN_STATIC(MOHAWK, PLUGIN_TYPE_ENGINE, MohawkMetaEngineConnect);
|
REGISTER_PLUGIN_STATIC(MOHAWK, PLUGIN_TYPE_ENGINE, MohawkMetaEngine);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -32,9 +32,9 @@ static const PlainGameDescriptor MortevielleGame[] = {
|
||||||
|
|
||||||
#include "mortevielle/detection_tables.h"
|
#include "mortevielle/detection_tables.h"
|
||||||
|
|
||||||
class MortevielleMetaEngine : public AdvancedMetaEngine {
|
class MortevielleMetaEngineStatic : public AdvancedMetaEngineStatic {
|
||||||
public:
|
public:
|
||||||
MortevielleMetaEngine() : AdvancedMetaEngine(Mortevielle::MortevielleGameDescriptions, sizeof(Mortevielle::MortevielleGameDescription),
|
MortevielleMetaEngineStatic() : AdvancedMetaEngineStatic(Mortevielle::MortevielleGameDescriptions, sizeof(Mortevielle::MortevielleGameDescription),
|
||||||
MortevielleGame) {
|
MortevielleGame) {
|
||||||
_md5Bytes = 512;
|
_md5Bytes = 512;
|
||||||
// Use kADFlagUseExtraAsHint to distinguish between original and improved versions
|
// Use kADFlagUseExtraAsHint to distinguish between original and improved versions
|
||||||
|
@ -56,4 +56,4 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
REGISTER_PLUGIN_STATIC(MORTEVIELLE_DETECTION, PLUGIN_TYPE_METAENGINE, MortevielleMetaEngine);
|
REGISTER_PLUGIN_STATIC(MORTEVIELLE_DETECTION, PLUGIN_TYPE_METAENGINE, MortevielleMetaEngineStatic);
|
||||||
|
|
|
@ -39,7 +39,7 @@ bool MortevielleEngine::useOriginalData() const { return _gameDescription->dataF
|
||||||
|
|
||||||
} // End of namespace Mortevielle
|
} // End of namespace Mortevielle
|
||||||
|
|
||||||
class MortevielleMetaEngineConnect : public AdvancedMetaEngineConnect {
|
class MortevielleMetaEngine : public AdvancedMetaEngine {
|
||||||
public:
|
public:
|
||||||
const char *getName() const override {
|
const char *getName() const override {
|
||||||
return "mortevielle";
|
return "mortevielle";
|
||||||
|
@ -53,14 +53,14 @@ public:
|
||||||
SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const override;
|
SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool MortevielleMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
bool MortevielleMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
||||||
if (desc) {
|
if (desc) {
|
||||||
*engine = new Mortevielle::MortevielleEngine(syst, (const Mortevielle::MortevielleGameDescription *)desc);
|
*engine = new Mortevielle::MortevielleEngine(syst, (const Mortevielle::MortevielleGameDescription *)desc);
|
||||||
}
|
}
|
||||||
return desc != 0;
|
return desc != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MortevielleMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
bool MortevielleMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
switch (f) {
|
switch (f) {
|
||||||
case kSupportsListSaves:
|
case kSupportsListSaves:
|
||||||
case kSupportsDeleteSave:
|
case kSupportsDeleteSave:
|
||||||
|
@ -75,19 +75,19 @@ bool MortevielleMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int MortevielleMetaEngineConnect::getMaximumSaveSlot() const { return 99; }
|
int MortevielleMetaEngine::getMaximumSaveSlot() const { return 99; }
|
||||||
|
|
||||||
SaveStateList MortevielleMetaEngineConnect::listSaves(const char *target) const {
|
SaveStateList MortevielleMetaEngine::listSaves(const char *target) const {
|
||||||
return Mortevielle::SavegameManager::listSaves(target);
|
return Mortevielle::SavegameManager::listSaves(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateDescriptor MortevielleMetaEngineConnect::querySaveMetaInfos(const char *target, int slot) const {
|
SaveStateDescriptor MortevielleMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
|
||||||
Common::String filename = Mortevielle::MortevielleEngine::generateSaveFilename(target, slot);
|
Common::String filename = Mortevielle::MortevielleEngine::generateSaveFilename(target, slot);
|
||||||
return Mortevielle::SavegameManager::querySaveMetaInfos(filename);
|
return Mortevielle::SavegameManager::querySaveMetaInfos(filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if PLUGIN_ENABLED_DYNAMIC(MORTEVIELLE)
|
#if PLUGIN_ENABLED_DYNAMIC(MORTEVIELLE)
|
||||||
REGISTER_PLUGIN_DYNAMIC(MORTEVIELLE, PLUGIN_TYPE_ENGINE, MortevielleMetaEngineConnect);
|
REGISTER_PLUGIN_DYNAMIC(MORTEVIELLE, PLUGIN_TYPE_ENGINE, MortevielleMetaEngine);
|
||||||
#else
|
#else
|
||||||
REGISTER_PLUGIN_STATIC(MORTEVIELLE, PLUGIN_TYPE_ENGINE, MortevielleMetaEngineConnect);
|
REGISTER_PLUGIN_STATIC(MORTEVIELLE, PLUGIN_TYPE_ENGINE, MortevielleMetaEngine);
|
||||||
#endif
|
#endif
|
|
@ -79,9 +79,9 @@ static const char *const mutationofjbDirectoryGlobs[] = {
|
||||||
nullptr
|
nullptr
|
||||||
};
|
};
|
||||||
|
|
||||||
class MutationOfJBMetaEngine : public AdvancedMetaEngine {
|
class MutationOfJBMetaEngineStatic : public AdvancedMetaEngineStatic {
|
||||||
public:
|
public:
|
||||||
MutationOfJBMetaEngine() : AdvancedMetaEngine(mutationofjbDescriptions, sizeof(ADGameDescription), mutationofjbGames) {
|
MutationOfJBMetaEngineStatic() : AdvancedMetaEngineStatic(mutationofjbDescriptions, sizeof(ADGameDescription), mutationofjbGames) {
|
||||||
_maxScanDepth = 2;
|
_maxScanDepth = 2;
|
||||||
_directoryGlobs = mutationofjbDirectoryGlobs;
|
_directoryGlobs = mutationofjbDirectoryGlobs;
|
||||||
}
|
}
|
||||||
|
@ -99,4 +99,4 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
REGISTER_PLUGIN_STATIC(MUTATIONOFJB_DETECTION, PLUGIN_TYPE_METAENGINE, MutationOfJBMetaEngine);
|
REGISTER_PLUGIN_STATIC(MUTATIONOFJB_DETECTION, PLUGIN_TYPE_METAENGINE, MutationOfJBMetaEngineStatic);
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
#include "engines/advancedDetector.h"
|
#include "engines/advancedDetector.h"
|
||||||
|
|
||||||
class MutationOfJBMetaEngineConnect : public AdvancedMetaEngineConnect {
|
class MutationOfJBMetaEngine : public AdvancedMetaEngine {
|
||||||
public:
|
public:
|
||||||
const char *getName() const override {
|
const char *getName() const override {
|
||||||
return "mutationofjb";
|
return "mutationofjb";
|
||||||
|
@ -83,7 +83,7 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
#if PLUGIN_ENABLED_DYNAMIC(MUTATIONOFJB)
|
#if PLUGIN_ENABLED_DYNAMIC(MUTATIONOFJB)
|
||||||
REGISTER_PLUGIN_DYNAMIC(MUTATIONOFJB, PLUGIN_TYPE_ENGINE, MutationOfJBMetaEngineConnect);
|
REGISTER_PLUGIN_DYNAMIC(MUTATIONOFJB, PLUGIN_TYPE_ENGINE, MutationOfJBMetaEngine);
|
||||||
#else
|
#else
|
||||||
REGISTER_PLUGIN_STATIC(MUTATIONOFJB, PLUGIN_TYPE_ENGINE, MutationOfJBMetaEngineConnect);
|
REGISTER_PLUGIN_STATIC(MUTATIONOFJB, PLUGIN_TYPE_ENGINE, MutationOfJBMetaEngine);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -130,9 +130,9 @@ static const ExtraGuiOption neverhoodExtraGuiOption3 = {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class NeverhoodMetaEngine : public AdvancedMetaEngine {
|
class NeverhoodMetaEngineStatic : public AdvancedMetaEngineStatic {
|
||||||
public:
|
public:
|
||||||
NeverhoodMetaEngine() : AdvancedMetaEngine(Neverhood::gameDescriptions, sizeof(ADGameDescription), neverhoodGames) {
|
NeverhoodMetaEngineStatic() : AdvancedMetaEngineStatic(Neverhood::gameDescriptions, sizeof(ADGameDescription), neverhoodGames) {
|
||||||
_guiOptions = GUIO2(GUIO_NOSUBTITLES, GUIO_NOMIDI);
|
_guiOptions = GUIO2(GUIO_NOSUBTITLES, GUIO_NOMIDI);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -151,7 +151,7 @@ public:
|
||||||
const ExtraGuiOptions getExtraGuiOptions(const Common::String &target) const override;
|
const ExtraGuiOptions getExtraGuiOptions(const Common::String &target) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
const ExtraGuiOptions NeverhoodMetaEngine::getExtraGuiOptions(const Common::String &target) const {
|
const ExtraGuiOptions NeverhoodMetaEngineStatic::getExtraGuiOptions(const Common::String &target) const {
|
||||||
ExtraGuiOptions options;
|
ExtraGuiOptions options;
|
||||||
options.push_back(neverhoodExtraGuiOption1);
|
options.push_back(neverhoodExtraGuiOption1);
|
||||||
options.push_back(neverhoodExtraGuiOption2);
|
options.push_back(neverhoodExtraGuiOption2);
|
||||||
|
@ -159,4 +159,4 @@ const ExtraGuiOptions NeverhoodMetaEngine::getExtraGuiOptions(const Common::Stri
|
||||||
return options;
|
return options;
|
||||||
}
|
}
|
||||||
|
|
||||||
REGISTER_PLUGIN_STATIC(NEVERHOOD_DETECTION, PLUGIN_TYPE_METAENGINE, NeverhoodMetaEngine);
|
REGISTER_PLUGIN_STATIC(NEVERHOOD_DETECTION, PLUGIN_TYPE_METAENGINE, NeverhoodMetaEngineStatic);
|
||||||
|
|
|
@ -57,7 +57,7 @@ bool NeverhoodEngine::applyResourceFixes() const {
|
||||||
|
|
||||||
} // End of namespace Neverhood
|
} // End of namespace Neverhood
|
||||||
|
|
||||||
class NeverhoodMetaEngineConnect : public AdvancedMetaEngineConnect {
|
class NeverhoodMetaEngine : public AdvancedMetaEngine {
|
||||||
public:
|
public:
|
||||||
const char *getName() const override {
|
const char *getName() const override {
|
||||||
return "neverhood";
|
return "neverhood";
|
||||||
|
@ -72,7 +72,7 @@ public:
|
||||||
SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const override;
|
SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool NeverhoodMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
bool NeverhoodMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
return
|
return
|
||||||
(f == kSupportsListSaves) ||
|
(f == kSupportsListSaves) ||
|
||||||
(f == kSupportsLoadingDuringStartup) ||
|
(f == kSupportsLoadingDuringStartup) ||
|
||||||
|
@ -91,14 +91,14 @@ bool Neverhood::NeverhoodEngine::hasFeature(EngineFeature f) const {
|
||||||
(f == kSupportsSavingDuringRuntime);
|
(f == kSupportsSavingDuringRuntime);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NeverhoodMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
bool NeverhoodMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
||||||
if (desc) {
|
if (desc) {
|
||||||
*engine = new Neverhood::NeverhoodEngine(syst, desc);
|
*engine = new Neverhood::NeverhoodEngine(syst, desc);
|
||||||
}
|
}
|
||||||
return desc != 0;
|
return desc != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateList NeverhoodMetaEngineConnect::listSaves(const char *target) const {
|
SaveStateList NeverhoodMetaEngine::listSaves(const char *target) const {
|
||||||
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
||||||
Neverhood::NeverhoodEngine::SaveHeader header;
|
Neverhood::NeverhoodEngine::SaveHeader header;
|
||||||
Common::String pattern = target;
|
Common::String pattern = target;
|
||||||
|
@ -127,17 +127,17 @@ SaveStateList NeverhoodMetaEngineConnect::listSaves(const char *target) const {
|
||||||
return saveList;
|
return saveList;
|
||||||
}
|
}
|
||||||
|
|
||||||
int NeverhoodMetaEngineConnect::getMaximumSaveSlot() const {
|
int NeverhoodMetaEngine::getMaximumSaveSlot() const {
|
||||||
return 999;
|
return 999;
|
||||||
}
|
}
|
||||||
|
|
||||||
void NeverhoodMetaEngineConnect::removeSaveState(const char *target, int slot) const {
|
void NeverhoodMetaEngine::removeSaveState(const char *target, int slot) const {
|
||||||
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
||||||
Common::String filename = Neverhood::NeverhoodEngine::getSavegameFilename(target, slot);
|
Common::String filename = Neverhood::NeverhoodEngine::getSavegameFilename(target, slot);
|
||||||
saveFileMan->removeSavefile(filename.c_str());
|
saveFileMan->removeSavefile(filename.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateDescriptor NeverhoodMetaEngineConnect::querySaveMetaInfos(const char *target, int slot) const {
|
SaveStateDescriptor NeverhoodMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
|
||||||
Common::String filename = Neverhood::NeverhoodEngine::getSavegameFilename(target, slot);
|
Common::String filename = Neverhood::NeverhoodEngine::getSavegameFilename(target, slot);
|
||||||
Common::InSaveFile *in = g_system->getSavefileManager()->openForLoading(filename.c_str());
|
Common::InSaveFile *in = g_system->getSavefileManager()->openForLoading(filename.c_str());
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ SaveStateDescriptor NeverhoodMetaEngineConnect::querySaveMetaInfos(const char *t
|
||||||
}
|
}
|
||||||
|
|
||||||
#if PLUGIN_ENABLED_DYNAMIC(NEVERHOOD)
|
#if PLUGIN_ENABLED_DYNAMIC(NEVERHOOD)
|
||||||
REGISTER_PLUGIN_DYNAMIC(NEVERHOOD, PLUGIN_TYPE_ENGINE, NeverhoodMetaEngineConnect);
|
REGISTER_PLUGIN_DYNAMIC(NEVERHOOD, PLUGIN_TYPE_ENGINE, NeverhoodMetaEngine);
|
||||||
#else
|
#else
|
||||||
REGISTER_PLUGIN_STATIC(NEVERHOOD, PLUGIN_TYPE_ENGINE, NeverhoodMetaEngineConnect);
|
REGISTER_PLUGIN_STATIC(NEVERHOOD, PLUGIN_TYPE_ENGINE, NeverhoodMetaEngine);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -201,9 +201,9 @@ static const PARALLACTIONGameDescription gameDescriptions[] = {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class ParallactionMetaEngine : public AdvancedMetaEngine {
|
class ParallactionMetaEngineStatic : public AdvancedMetaEngineStatic {
|
||||||
public:
|
public:
|
||||||
ParallactionMetaEngine() : AdvancedMetaEngine(Parallaction::gameDescriptions, sizeof(Parallaction::PARALLACTIONGameDescription), parallactionGames) {
|
ParallactionMetaEngineStatic() : AdvancedMetaEngineStatic(Parallaction::gameDescriptions, sizeof(Parallaction::PARALLACTIONGameDescription), parallactionGames) {
|
||||||
_guiOptions = GUIO1(GUIO_NOLAUNCHLOAD);
|
_guiOptions = GUIO1(GUIO_NOLAUNCHLOAD);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -220,4 +220,4 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
REGISTER_PLUGIN_STATIC(PARALLACTION_DETECTION, PLUGIN_TYPE_METAENGINE, ParallactionMetaEngine);
|
REGISTER_PLUGIN_STATIC(PARALLACTION_DETECTION, PLUGIN_TYPE_METAENGINE, ParallactionMetaEngineStatic);
|
||||||
|
|
|
@ -39,7 +39,7 @@ Common::Platform Parallaction::getPlatform() const { return _gameDescription->de
|
||||||
|
|
||||||
} // End of namespace Parallaction
|
} // End of namespace Parallaction
|
||||||
|
|
||||||
class ParallactionMetaEngineConnect : public AdvancedMetaEngineConnect {
|
class ParallactionMetaEngine : public AdvancedMetaEngine {
|
||||||
public:
|
public:
|
||||||
const char *getName() const override {
|
const char *getName() const override {
|
||||||
return "parallaction";
|
return "parallaction";
|
||||||
|
@ -53,7 +53,7 @@ public:
|
||||||
void removeSaveState(const char *target, int slot) const override;
|
void removeSaveState(const char *target, int slot) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool ParallactionMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
bool ParallactionMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
return
|
return
|
||||||
(f == kSupportsListSaves) ||
|
(f == kSupportsListSaves) ||
|
||||||
(f == kSupportsDeleteSave);
|
(f == kSupportsDeleteSave);
|
||||||
|
@ -64,7 +64,7 @@ bool Parallaction::Parallaction::hasFeature(EngineFeature f) const {
|
||||||
(f == kSupportsReturnToLauncher);
|
(f == kSupportsReturnToLauncher);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ParallactionMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
bool ParallactionMetaEngine::createInstance(OSystem *syst, Engine **engine, const 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;
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ bool ParallactionMetaEngineConnect::createInstance(OSystem *syst, Engine **engin
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateList ParallactionMetaEngineConnect::listSaves(const char *target) const {
|
SaveStateList ParallactionMetaEngine::listSaves(const char *target) const {
|
||||||
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
||||||
|
|
||||||
Common::String pattern(ConfMan.getDomain(target)->getVal("gameid") + ".0##");
|
Common::String pattern(ConfMan.getDomain(target)->getVal("gameid") + ".0##");
|
||||||
|
@ -109,9 +109,9 @@ SaveStateList ParallactionMetaEngineConnect::listSaves(const char *target) const
|
||||||
return saveList;
|
return saveList;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ParallactionMetaEngineConnect::getMaximumSaveSlot() const { return 99; }
|
int ParallactionMetaEngine::getMaximumSaveSlot() const { return 99; }
|
||||||
|
|
||||||
void ParallactionMetaEngineConnect::removeSaveState(const char *target, int slot) const {
|
void ParallactionMetaEngine::removeSaveState(const char *target, int slot) const {
|
||||||
Common::String filename = ConfMan.getDomain(target)->getVal("gameid");
|
Common::String filename = ConfMan.getDomain(target)->getVal("gameid");
|
||||||
filename += Common::String::format(".0%02d", slot);
|
filename += Common::String::format(".0%02d", slot);
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@ void ParallactionMetaEngineConnect::removeSaveState(const char *target, int slot
|
||||||
}
|
}
|
||||||
|
|
||||||
#if PLUGIN_ENABLED_DYNAMIC(PARALLACTION)
|
#if PLUGIN_ENABLED_DYNAMIC(PARALLACTION)
|
||||||
REGISTER_PLUGIN_DYNAMIC(PARALLACTION, PLUGIN_TYPE_ENGINE, ParallactionMetaEngineConnect);
|
REGISTER_PLUGIN_DYNAMIC(PARALLACTION, PLUGIN_TYPE_ENGINE, ParallactionMetaEngine);
|
||||||
#else
|
#else
|
||||||
REGISTER_PLUGIN_STATIC(PARALLACTION, PLUGIN_TYPE_ENGINE, ParallactionMetaEngineConnect);
|
REGISTER_PLUGIN_STATIC(PARALLACTION, PLUGIN_TYPE_ENGINE, ParallactionMetaEngine);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -91,9 +91,9 @@ static const PegasusGameDescription gameDescriptions[] = {
|
||||||
} // End of namespace Pegasus
|
} // End of namespace Pegasus
|
||||||
|
|
||||||
|
|
||||||
class PegasusMetaEngine : public AdvancedMetaEngine {
|
class PegasusMetaEngineStatic : public AdvancedMetaEngineStatic {
|
||||||
public:
|
public:
|
||||||
PegasusMetaEngine() : AdvancedMetaEngine(Pegasus::gameDescriptions, sizeof(Pegasus::PegasusGameDescription), pegasusGames) {
|
PegasusMetaEngineStatic() : AdvancedMetaEngineStatic(Pegasus::gameDescriptions, sizeof(Pegasus::PegasusGameDescription), pegasusGames) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *getEngineId() const override {
|
const char *getEngineId() const override {
|
||||||
|
@ -109,4 +109,4 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
REGISTER_PLUGIN_STATIC(PEGASUS_DETECTION, PLUGIN_TYPE_METAENGINE, PegasusMetaEngine);
|
REGISTER_PLUGIN_STATIC(PEGASUS_DETECTION, PLUGIN_TYPE_METAENGINE, PegasusMetaEngineStatic);
|
||||||
|
|
|
@ -61,7 +61,7 @@ bool PegasusEngine::isWindows() const {
|
||||||
|
|
||||||
} // End of namespace Pegasus
|
} // End of namespace Pegasus
|
||||||
|
|
||||||
class PegasusMetaEngineConnect : public AdvancedMetaEngineConnect {
|
class PegasusMetaEngine : public AdvancedMetaEngine {
|
||||||
public:
|
public:
|
||||||
const char *getName() const override {
|
const char *getName() const override {
|
||||||
return "pegasus";
|
return "pegasus";
|
||||||
|
@ -76,14 +76,14 @@ public:
|
||||||
Common::KeymapArray initKeymaps(const char *target) const override;
|
Common::KeymapArray initKeymaps(const char *target) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool PegasusMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
bool PegasusMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
return
|
return
|
||||||
(f == kSupportsListSaves)
|
(f == kSupportsListSaves)
|
||||||
|| (f == kSupportsLoadingDuringStartup)
|
|| (f == kSupportsLoadingDuringStartup)
|
||||||
|| (f == kSupportsDeleteSave);
|
|| (f == kSupportsDeleteSave);
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateList PegasusMetaEngineConnect::listSaves(const char *target) const {
|
SaveStateList PegasusMetaEngine::listSaves(const char *target) const {
|
||||||
// The original had no pattern, so the user must rename theirs
|
// The original had no pattern, so the user must rename theirs
|
||||||
// Note that we ignore the target because saves are compatible between
|
// Note that we ignore the target because saves are compatible between
|
||||||
// all versions
|
// all versions
|
||||||
|
@ -102,17 +102,17 @@ SaveStateList PegasusMetaEngineConnect::listSaves(const char *target) const {
|
||||||
return saveList;
|
return saveList;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PegasusMetaEngineConnect::removeSaveState(const char *target, int slot) const {
|
void PegasusMetaEngine::removeSaveState(const char *target, int slot) const {
|
||||||
// See listSaves() for info on the pattern
|
// See listSaves() for info on the pattern
|
||||||
Common::StringArray fileNames = Pegasus::PegasusEngine::listSaveFiles();
|
Common::StringArray fileNames = Pegasus::PegasusEngine::listSaveFiles();
|
||||||
g_system->getSavefileManager()->removeSavefile(fileNames[slot].c_str());
|
g_system->getSavefileManager()->removeSavefile(fileNames[slot].c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
Common::KeymapArray PegasusMetaEngineConnect::initKeymaps(const char *target) const {
|
Common::KeymapArray PegasusMetaEngine::initKeymaps(const char *target) const {
|
||||||
return Pegasus::PegasusEngine::initKeymaps();
|
return Pegasus::PegasusEngine::initKeymaps();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PegasusMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
bool PegasusMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
||||||
const Pegasus::PegasusGameDescription *gd = (const Pegasus::PegasusGameDescription *)desc;
|
const Pegasus::PegasusGameDescription *gd = (const Pegasus::PegasusGameDescription *)desc;
|
||||||
|
|
||||||
if (gd)
|
if (gd)
|
||||||
|
@ -122,7 +122,7 @@ bool PegasusMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, co
|
||||||
}
|
}
|
||||||
|
|
||||||
#if PLUGIN_ENABLED_DYNAMIC(PEGASUS)
|
#if PLUGIN_ENABLED_DYNAMIC(PEGASUS)
|
||||||
REGISTER_PLUGIN_DYNAMIC(PEGASUS, PLUGIN_TYPE_ENGINE, PegasusMetaEngineConnect);
|
REGISTER_PLUGIN_DYNAMIC(PEGASUS, PLUGIN_TYPE_ENGINE, PegasusMetaEngine);
|
||||||
#else
|
#else
|
||||||
REGISTER_PLUGIN_STATIC(PEGASUS, PLUGIN_TYPE_ENGINE, PegasusMetaEngineConnect);
|
REGISTER_PLUGIN_STATIC(PEGASUS, PLUGIN_TYPE_ENGINE, PegasusMetaEngine);
|
||||||
#endif
|
#endif
|
|
@ -33,9 +33,9 @@ static const PlainGameDescriptor petkaGames[] = {
|
||||||
|
|
||||||
#include "petka/detection_tables.h"
|
#include "petka/detection_tables.h"
|
||||||
|
|
||||||
class PetkaMetaEngine : public AdvancedMetaEngine {
|
class PetkaMetaEngineStatic : public AdvancedMetaEngineStatic {
|
||||||
public:
|
public:
|
||||||
PetkaMetaEngine() : AdvancedMetaEngine(Petka::gameDescriptions, sizeof(ADGameDescription), petkaGames) {
|
PetkaMetaEngineStatic() : AdvancedMetaEngineStatic(Petka::gameDescriptions, sizeof(ADGameDescription), petkaGames) {
|
||||||
_gameIds = petkaGames;
|
_gameIds = petkaGames;
|
||||||
_maxScanDepth = 2;
|
_maxScanDepth = 2;
|
||||||
}
|
}
|
||||||
|
@ -53,4 +53,4 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
REGISTER_PLUGIN_STATIC(PETKA_DETECTION, PLUGIN_TYPE_METAENGINE, PetkaMetaEngine);
|
REGISTER_PLUGIN_STATIC(PETKA_DETECTION, PLUGIN_TYPE_METAENGINE, PetkaMetaEngineStatic);
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
#include "petka/petka.h"
|
#include "petka/petka.h"
|
||||||
|
|
||||||
class PetkaMetaEngineConnect : public AdvancedMetaEngineConnect {
|
class PetkaMetaEngine : public AdvancedMetaEngine {
|
||||||
public:
|
public:
|
||||||
const char *getName() const override {
|
const char *getName() const override {
|
||||||
return "petka";
|
return "petka";
|
||||||
|
@ -41,7 +41,7 @@ public:
|
||||||
virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
|
virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool PetkaMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
bool PetkaMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
return
|
return
|
||||||
(f == kSupportsListSaves) ||
|
(f == kSupportsListSaves) ||
|
||||||
(f == kSupportsDeleteSave) ||
|
(f == kSupportsDeleteSave) ||
|
||||||
|
@ -51,7 +51,7 @@ bool PetkaMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
||||||
(f == kSavesSupportPlayTime);
|
(f == kSavesSupportPlayTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateList PetkaMetaEngineConnect::listSaves(const char *target) const {
|
SaveStateList PetkaMetaEngine::listSaves(const char *target) const {
|
||||||
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
||||||
Common::String pattern = Common::String::format("%s.s##", target);
|
Common::String pattern = Common::String::format("%s.s##", target);
|
||||||
Common::StringArray filenames = saveFileMan->listSavefiles(pattern);
|
Common::StringArray filenames = saveFileMan->listSavefiles(pattern);
|
||||||
|
@ -76,11 +76,11 @@ SaveStateList PetkaMetaEngineConnect::listSaves(const char *target) const {
|
||||||
return saveList;
|
return saveList;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PetkaMetaEngineConnect::removeSaveState(const char *target, int slot) const {
|
void PetkaMetaEngine::removeSaveState(const char *target, int slot) const {
|
||||||
g_system->getSavefileManager()->removeSavefile(Petka::generateSaveName(slot, target));
|
g_system->getSavefileManager()->removeSavefile(Petka::generateSaveName(slot, target));
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateDescriptor PetkaMetaEngineConnect::querySaveMetaInfos(const char *target, int slot) const {
|
SaveStateDescriptor PetkaMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
|
||||||
Common::ScopedPtr<Common::InSaveFile> f(g_system->getSavefileManager()->openForLoading(Petka::generateSaveName(slot, target)));
|
Common::ScopedPtr<Common::InSaveFile> f(g_system->getSavefileManager()->openForLoading(Petka::generateSaveName(slot, target)));
|
||||||
|
|
||||||
if (f) {
|
if (f) {
|
||||||
|
@ -94,7 +94,7 @@ SaveStateDescriptor PetkaMetaEngineConnect::querySaveMetaInfos(const char *targe
|
||||||
return SaveStateDescriptor();
|
return SaveStateDescriptor();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PetkaMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
bool PetkaMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
||||||
if (desc)
|
if (desc)
|
||||||
*engine = new Petka::PetkaEngine(syst, desc);
|
*engine = new Petka::PetkaEngine(syst, desc);
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ bool PetkaMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, cons
|
||||||
}
|
}
|
||||||
|
|
||||||
#if PLUGIN_ENABLED_DYNAMIC(PETKA)
|
#if PLUGIN_ENABLED_DYNAMIC(PETKA)
|
||||||
REGISTER_PLUGIN_DYNAMIC(PETKA, PLUGIN_TYPE_ENGINE, PetkaMetaEngineConnect);
|
REGISTER_PLUGIN_DYNAMIC(PETKA, PLUGIN_TYPE_ENGINE, PetkaMetaEngine);
|
||||||
#else
|
#else
|
||||||
REGISTER_PLUGIN_STATIC(PETKA, PLUGIN_TYPE_ENGINE, PetkaMetaEngineConnect);
|
REGISTER_PLUGIN_STATIC(PETKA, PLUGIN_TYPE_ENGINE, PetkaMetaEngine);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -38,9 +38,9 @@ static const char *directoryGlobs[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class PinkMetaEngine : public AdvancedMetaEngine {
|
class PinkMetaEngineStatic : public AdvancedMetaEngineStatic {
|
||||||
public:
|
public:
|
||||||
PinkMetaEngine() : AdvancedMetaEngine(Pink::gameDescriptions, sizeof(ADGameDescription), pinkGames) {
|
PinkMetaEngineStatic() : AdvancedMetaEngineStatic(Pink::gameDescriptions, sizeof(ADGameDescription), pinkGames) {
|
||||||
_gameIds = pinkGames;
|
_gameIds = pinkGames;
|
||||||
_maxScanDepth = 2;
|
_maxScanDepth = 2;
|
||||||
_directoryGlobs = directoryGlobs;
|
_directoryGlobs = directoryGlobs;
|
||||||
|
@ -59,4 +59,4 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
REGISTER_PLUGIN_STATIC(PINK_DETECTION, PLUGIN_TYPE_METAENGINE, PinkMetaEngine);
|
REGISTER_PLUGIN_STATIC(PINK_DETECTION, PLUGIN_TYPE_METAENGINE, PinkMetaEngineStatic);
|
||||||
|
|
|
@ -34,7 +34,7 @@ Common::Language PinkEngine::getLanguage() const {
|
||||||
|
|
||||||
} // End of Namespace Pink
|
} // End of Namespace Pink
|
||||||
|
|
||||||
class PinkMetaEngineConnect : public AdvancedMetaEngineConnect {
|
class PinkMetaEngine : public AdvancedMetaEngine {
|
||||||
public:
|
public:
|
||||||
const char *getName() const override {
|
const char *getName() const override {
|
||||||
return "pink";
|
return "pink";
|
||||||
|
@ -50,7 +50,7 @@ public:
|
||||||
bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
|
bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool PinkMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
bool PinkMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||||
return
|
return
|
||||||
(f == kSupportsListSaves) ||
|
(f == kSupportsListSaves) ||
|
||||||
(f == kSupportsDeleteSave) ||
|
(f == kSupportsDeleteSave) ||
|
||||||
|
@ -62,7 +62,7 @@ bool PinkMetaEngineConnect::hasFeature(MetaEngineFeature f) const {
|
||||||
(f == kSimpleSavesNames);
|
(f == kSimpleSavesNames);
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateList PinkMetaEngineConnect::listSaves(const char *target) const {
|
SaveStateList PinkMetaEngine::listSaves(const char *target) const {
|
||||||
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
||||||
Common::String pattern = Common::String::format("%s.s##", target);
|
Common::String pattern = Common::String::format("%s.s##", target);
|
||||||
Common::StringArray filenames = saveFileMan->listSavefiles(pattern);
|
Common::StringArray filenames = saveFileMan->listSavefiles(pattern);
|
||||||
|
@ -87,11 +87,11 @@ SaveStateList PinkMetaEngineConnect::listSaves(const char *target) const {
|
||||||
return saveList;
|
return saveList;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PinkMetaEngineConnect::removeSaveState(const char *target, int slot) const {
|
void PinkMetaEngine::removeSaveState(const char *target, int slot) const {
|
||||||
g_system->getSavefileManager()->removeSavefile(Pink::generateSaveName(slot, target));
|
g_system->getSavefileManager()->removeSavefile(Pink::generateSaveName(slot, target));
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveStateDescriptor PinkMetaEngineConnect::querySaveMetaInfos(const char *target, int slot) const {
|
SaveStateDescriptor PinkMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
|
||||||
Common::ScopedPtr<Common::InSaveFile> f(g_system->getSavefileManager()->openForLoading(Pink::generateSaveName(slot, target)));
|
Common::ScopedPtr<Common::InSaveFile> f(g_system->getSavefileManager()->openForLoading(Pink::generateSaveName(slot, target)));
|
||||||
|
|
||||||
if (f) {
|
if (f) {
|
||||||
|
@ -105,7 +105,7 @@ SaveStateDescriptor PinkMetaEngineConnect::querySaveMetaInfos(const char *target
|
||||||
return SaveStateDescriptor();
|
return SaveStateDescriptor();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PinkMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
bool PinkMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
||||||
if (desc)
|
if (desc)
|
||||||
*engine = new Pink::PinkEngine(syst, desc);
|
*engine = new Pink::PinkEngine(syst, desc);
|
||||||
|
|
||||||
|
@ -113,8 +113,8 @@ bool PinkMetaEngineConnect::createInstance(OSystem *syst, Engine **engine, const
|
||||||
}
|
}
|
||||||
|
|
||||||
#if PLUGIN_ENABLED_DYNAMIC(PINK)
|
#if PLUGIN_ENABLED_DYNAMIC(PINK)
|
||||||
REGISTER_PLUGIN_DYNAMIC(PINK, PLUGIN_TYPE_ENGINE, PinkMetaEngineConnect);
|
REGISTER_PLUGIN_DYNAMIC(PINK, PLUGIN_TYPE_ENGINE, PinkMetaEngine);
|
||||||
#else
|
#else
|
||||||
REGISTER_PLUGIN_STATIC(PINK, PLUGIN_TYPE_ENGINE, PinkMetaEngineConnect);
|
REGISTER_PLUGIN_STATIC(PINK, PLUGIN_TYPE_ENGINE, PinkMetaEngine);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -62,9 +62,9 @@ static const ADGameDescription gameDescriptions[] = {
|
||||||
|
|
||||||
} // End of namespace Plumbers
|
} // End of namespace Plumbers
|
||||||
|
|
||||||
class PlumbersMetaEngine : public AdvancedMetaEngine {
|
class PlumbersMetaEngineStatic : public AdvancedMetaEngineStatic {
|
||||||
public:
|
public:
|
||||||
PlumbersMetaEngine() : AdvancedMetaEngine(Plumbers::gameDescriptions, sizeof(ADGameDescription), plumbersGames) {
|
PlumbersMetaEngineStatic() : AdvancedMetaEngineStatic(Plumbers::gameDescriptions, sizeof(ADGameDescription), plumbersGames) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *getEngineId() const override {
|
const char *getEngineId() const override {
|
||||||
|
@ -80,4 +80,4 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
REGISTER_PLUGIN_STATIC(PLUMBERS_DETECTION, PLUGIN_TYPE_METAENGINE, PlumbersMetaEngine);
|
REGISTER_PLUGIN_STATIC(PLUMBERS_DETECTION, PLUGIN_TYPE_METAENGINE, PlumbersMetaEngineStatic);
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue