mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 13:50:13 +00:00
ICB: Split detection features & adapt to new plugins
This commit is contained in:
parent
f33fd81697
commit
0d088313a2
@ -21,10 +21,6 @@
|
||||
*/
|
||||
|
||||
#include "engines/advancedDetector.h"
|
||||
#include "engines/icb/icb.h"
|
||||
|
||||
#include "common/savefile.h"
|
||||
#include "common/system.h"
|
||||
|
||||
namespace ICB {
|
||||
|
||||
@ -67,9 +63,9 @@ static const ADGameDescription gameDescriptions[] = {
|
||||
AD_TABLE_END_MARKER
|
||||
};
|
||||
|
||||
class IcbMetaEngine : public AdvancedMetaEngine {
|
||||
class IcbMetaEngineStatic : public AdvancedMetaEngineStatic {
|
||||
public:
|
||||
IcbMetaEngine() : AdvancedMetaEngine(gameDescriptions, sizeof(ADGameDescription), icbGames) {
|
||||
IcbMetaEngineStatic() : AdvancedMetaEngineStatic(gameDescriptions, sizeof(ADGameDescription), icbGames) {
|
||||
_guiOptions = GUIO_NOMIDI;
|
||||
_maxScanDepth = 3;
|
||||
_directoryGlobs = directoryGlobs;
|
||||
@ -82,23 +78,8 @@ public:
|
||||
}
|
||||
|
||||
virtual const char *getOriginalCopyright() const override { return "(C) 2000 Revolution Software Ltd"; }
|
||||
|
||||
virtual bool hasFeature(MetaEngineFeature f) const override { return false; }
|
||||
|
||||
virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
|
||||
};
|
||||
|
||||
bool IcbMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
||||
if (desc)
|
||||
*engine = new IcbEngine(syst, desc);
|
||||
|
||||
return desc != nullptr;
|
||||
}
|
||||
|
||||
} // End of namespace ICB
|
||||
|
||||
#if PLUGIN_ENABLED_DYNAMIC(ICB)
|
||||
REGISTER_PLUGIN_DYNAMIC(ICB, PLUGIN_TYPE_ENGINE, ICB::IcbMetaEngine);
|
||||
#else
|
||||
REGISTER_PLUGIN_STATIC(ICB, PLUGIN_TYPE_ENGINE, ICB::IcbMetaEngine);
|
||||
#endif
|
||||
REGISTER_PLUGIN_STATIC(ICB_DETECTION, PLUGIN_TYPE_METAENGINE, ICB::IcbMetaEngineStatic);
|
||||
|
52
engines/icb/metaengine.cpp
Normal file
52
engines/icb/metaengine.cpp
Normal file
@ -0,0 +1,52 @@
|
||||
/* ResidualVM - A 3D game interpreter
|
||||
*
|
||||
* ResidualVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "engines/icb/icb.h"
|
||||
#include "common/savefile.h"
|
||||
#include "common/system.h"
|
||||
|
||||
namespace ICB {
|
||||
|
||||
class IcbMetaEngine : public AdvancedMetaEngine {
|
||||
public:
|
||||
const char *getName() const override {
|
||||
return "icb";
|
||||
}
|
||||
virtual bool hasFeature(MetaEngineFeature f) const override { return false; }
|
||||
|
||||
virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
|
||||
};
|
||||
|
||||
bool IcbMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
||||
if (desc)
|
||||
*engine = new IcbEngine(syst, desc);
|
||||
|
||||
return desc != nullptr;
|
||||
}
|
||||
|
||||
} // End of namespace ICB
|
||||
|
||||
#if PLUGIN_ENABLED_DYNAMIC(ICB)
|
||||
REGISTER_PLUGIN_DYNAMIC(ICB, PLUGIN_TYPE_ENGINE, ICB::IcbMetaEngine);
|
||||
#else
|
||||
REGISTER_PLUGIN_STATIC(ICB, PLUGIN_TYPE_ENGINE, ICB::IcbMetaEngine);
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user