diff options
author | Eugene Sandulenko | 2018-05-26 20:32:53 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2019-11-13 22:07:08 +0100 |
commit | 541b2e473a28eee8b591065529a4b37616317d0c (patch) | |
tree | 0f188719e2fe57ca3d8a4ba45346e07a72ff4edf | |
parent | 08a475c318b568b189032271a2db6de9645911c4 (diff) | |
download | scummvm-rg350-541b2e473a28eee8b591065529a4b37616317d0c.tar.gz scummvm-rg350-541b2e473a28eee8b591065529a4b37616317d0c.tar.bz2 scummvm-rg350-541b2e473a28eee8b591065529a4b37616317d0c.zip |
GRIFFON: Added skeleton engine with detection
-rw-r--r-- | engines/griffon/configure.engine | 3 | ||||
-rw-r--r-- | engines/griffon/detection.cpp | 79 | ||||
-rw-r--r-- | engines/griffon/griffon.cpp | 53 | ||||
-rw-r--r-- | engines/griffon/griffon.h | 45 | ||||
-rw-r--r-- | engines/griffon/module.mk | 16 |
5 files changed, 196 insertions, 0 deletions
diff --git a/engines/griffon/configure.engine b/engines/griffon/configure.engine new file mode 100644 index 0000000000..fedaef3ebb --- /dev/null +++ b/engines/griffon/configure.engine @@ -0,0 +1,3 @@ +# This file is included from the main "configure" script +# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps] +add_engine griffon "The Griffon Legend" no diff --git a/engines/griffon/detection.cpp b/engines/griffon/detection.cpp new file mode 100644 index 0000000000..099c85513d --- /dev/null +++ b/engines/griffon/detection.cpp @@ -0,0 +1,79 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * 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 "base/plugins.h" +#include "engines/advancedDetector.h" + +#include "griffon/griffon.h" + +static const PlainGameDescriptor griffonGames[] = { + {"griffon", "The Griffon Legend"}, + {NULL, NULL} +}; + +namespace Griffon { +static const ADGameDescription gameDescriptions[] = { + { + "griffon", + NULL, + AD_ENTRY1s("objectdb.dat", "ec5371da28f01ccf88980b32d9de2232", 27754), + Common::EN_ANY, + Common::kPlatformWindows, + ADGF_UNSTABLE, + GUIO1(GUIO_NONE) + }, + + AD_TABLE_END_MARKER +}; +} + +class GriffonMetaEngine: public AdvancedMetaEngine { +public: + GriffonMetaEngine() : AdvancedMetaEngine(Griffon::gameDescriptions, sizeof(ADGameDescription), griffonGames) { + _singleId = "griffon"; + } + + virtual const char *getName() const { + return "Griffon Engine"; + } + + virtual const char *getOriginalCopyright() const { + return "The Griffon Legend (c) 2005 Syn9 (Daniel Kennedy)"; + } + + virtual bool hasFeature(MetaEngineFeature f) const; + virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const; +}; + +bool GriffonMetaEngine::hasFeature(MetaEngineFeature f) const { + return false; +} + +bool GriffonMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const { + return false; +} + +#if PLUGIN_ENABLED_DYNAMIC(GRIFFON) +REGISTER_PLUGIN_DYNAMIC(GRIFFON, PLUGIN_TYPE_ENGINE, GriffonMetaEngine); +#else +REGISTER_PLUGIN_STATIC(GRIFFON, PLUGIN_TYPE_ENGINE, GriffonMetaEngine); +#endif diff --git a/engines/griffon/griffon.cpp b/engines/griffon/griffon.cpp new file mode 100644 index 0000000000..f787ac847d --- /dev/null +++ b/engines/griffon/griffon.cpp @@ -0,0 +1,53 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * 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 "common/config-manager.h" +#include "common/debug.h" +#include "common/debug-channels.h" +#include "common/error.h" +#include "common/file.h" +#include "common/fs.h" + +#include "engines/util.h" + +#include "griffon/griffon.h" + +namespace Griffon { + +GriffonEngine::GriffonEngine(OSystem *syst) : Engine(syst) { + const Common::FSNode gameDataDir(ConfMan.get("path")); + SearchMan.addSubDirectoryMatching(gameDataDir, "sound"); + + _rnd = new Common::RandomSource("griffon"); +} + +GriffonEngine::~GriffonEngine() { + delete _rnd; +} + +Common::Error GriffonEngine::run() { + initGraphics(320, 200); + + return Common::kNoError; +} + +} diff --git a/engines/griffon/griffon.h b/engines/griffon/griffon.h new file mode 100644 index 0000000000..dc250fdffb --- /dev/null +++ b/engines/griffon/griffon.h @@ -0,0 +1,45 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * 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. + * + */ + +#ifndef GRIFFON_H +#define GRIFFON_H + +#include "common/scummsys.h" +#include "common/random.h" +#include "engines/engine.h" + +namespace Griffon { + +class GriffonEngine : public Engine { +public: + GriffonEngine(OSystem *syst); + ~GriffonEngine(); + + virtual Common::Error run(); + +private: + Common::RandomSource *_rnd; +}; + +} + +#endif diff --git a/engines/griffon/module.mk b/engines/griffon/module.mk new file mode 100644 index 0000000000..5b24bafe7f --- /dev/null +++ b/engines/griffon/module.mk @@ -0,0 +1,16 @@ +MODULE := engines/griffon + +MODULE_OBJS := \ + griffon.o \ + detection.o + +MODULE_DIRS += \ + engines/griffon + +# This module can be built as a plugin +ifeq ($(ENABLE_GRIFFON), DYNAMIC_PLUGIN) +PLUGIN := 1 +endif + +# Include common rules +include $(srcdir)/rules.mk |