aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBorja Lorente2016-06-04 20:53:01 +0200
committerBorja Lorente2016-08-14 18:07:21 +0200
commit52d53c25515a93b9f129f0f7aa1d16918f6490d5 (patch)
tree53106373c455bec4f8afd9e6df08b12d9ff3e4e8
parente821fd789ce8da9e9012dd527487b34d59b1a702 (diff)
downloadscummvm-rg350-52d53c25515a93b9f129f0f7aa1d16918f6490d5.tar.gz
scummvm-rg350-52d53c25515a93b9f129f0f7aa1d16918f6490d5.tar.bz2
scummvm-rg350-52d53c25515a93b9f129f0f7aa1d16918f6490d5.zip
MACVENTURE: Add game detection for Shadowgate
-rw-r--r--engines/macventure/detection.cpp52
-rw-r--r--engines/macventure/detection_tables.h33
-rw-r--r--engines/macventure/macventure.cpp21
-rw-r--r--engines/macventure/macventure.h25
-rw-r--r--engines/macventure/module.mk2
5 files changed, 129 insertions, 4 deletions
diff --git a/engines/macventure/detection.cpp b/engines/macventure/detection.cpp
index ac4a6e5817..8fa5fab57d 100644
--- a/engines/macventure/detection.cpp
+++ b/engines/macventure/detection.cpp
@@ -20,10 +20,56 @@
*
*/
- #include "base/plugins.h"
+#include "base/plugins.h"
- namespace MacVenture {
+#include "engines/advancedDetector.h"
+#include "common/system.h"
+#include "macventure/macventure.h"
+namespace MacVenture {
- } // End of namespace MacVenture
+#include "macventure/detection_tables.h"
+
+static const PlainGameDescriptor macventureGames[] = {
+ { "Shadowgate", "Shadowgate" },
+ { 0, 0 }
+};
+
+class MacVentureMetaEngine : public AdvancedMetaEngine {
+public:
+ MacVentureMetaEngine() : AdvancedMetaEngine(MacVenture::gameDescriptions, sizeof(ADGameDescription), macventureGames) {
+ _guiOptions = GUIO0();
+ _md5Bytes = 5000000; // TODO: Upper limit, adjust it once all games are added
+ }
+
+ virtual const char * getName() const override {
+ return "MacVenture";
+ }
+ virtual const char * getOriginalCopyright() const override {
+ return "(C) ICOM Simulations";
+ }
+
+ virtual bool createInstance(OSystem * syst, Engine ** engine, const ADGameDescription * desc) const;
+ virtual bool hasFeature(MetaEngineFeature f) const;
+};
+
+bool MacVentureMetaEngine::hasFeature(MetaEngineFeature f) const {
+ return false;
+}
+
+bool MacVentureMetaEngine::createInstance(OSystem * syst, Engine ** engine, const ADGameDescription *game) const {
+ if (game) {
+ *engine = new MacVentureEngine(syst, game);
+ }
+ return game != 0;
+}
+
+
+} // End of namespace MacVenture
+
+#if PLUGIN_ENABLED_DYNAMIC(MACVENTURE)
+ REGISTER_PLUGIN_DYNAMIC(MACVENTURE, PLUGIN_TYPE_ENGINE, MacVenture::MacVentureMetaEngine);
+#else
+ REGISTER_PLUGIN_STATIC(MACVENTURE, PLUGIN_TYPE_ENGINE, MacVenture::MacVentureMetaEngine);
+#endif
diff --git a/engines/macventure/detection_tables.h b/engines/macventure/detection_tables.h
new file mode 100644
index 0000000000..9aa9536c09
--- /dev/null
+++ b/engines/macventure/detection_tables.h
@@ -0,0 +1,33 @@
+/* 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.
+*
+*/
+
+namespace MacVenture {
+
+#define ADGF_DEFAULT (ADGF_DROPLANGUAGE|ADGF_DROPPLATFORM)
+
+#define BASEGAME(n, v, f, md5, s) {n, v, AD_ENTRY1s(f, md5, s), Common::EN_ANY, Common::kPlatformMacintosh, ADGF_DEFAULT, GUIO0()}
+
+static const ADGameDescription gameDescriptions[] = {
+ BASEGAME("Shadowgate", "Zojoi Rerelease", "Shadowgate.dsk", "4e03e9ef1cd5f65ce1de14d512510537", 839680), // Zojoi Rerelease
+ AD_TABLE_END_MARKER
+};
+} // End of namespace MacVenture
diff --git a/engines/macventure/macventure.cpp b/engines/macventure/macventure.cpp
index ae926f0a5c..06325f5eba 100644
--- a/engines/macventure/macventure.cpp
+++ b/engines/macventure/macventure.cpp
@@ -19,3 +19,24 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
+
+#include "common/error.h"
+
+#include "engines/engine.h"
+
+#include "macventure/macventure.h"
+
+namespace MacVenture {
+
+MacVentureEngine::MacVentureEngine(OSystem *syst, const ADGameDescription *gameDesc) : Engine(syst) {
+ _gameDescription = gameDesc;
+}
+
+MacVentureEngine::~MacVentureEngine() {
+}
+
+Common::Error MacVentureEngine::run() {
+ return Common::Error();
+}
+
+} // End of namespace MacVenture
diff --git a/engines/macventure/macventure.h b/engines/macventure/macventure.h
index ae926f0a5c..d4ead54457 100644
--- a/engines/macventure/macventure.h
+++ b/engines/macventure/macventure.h
@@ -19,3 +19,28 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
+
+#ifndef MACVENTURE_H
+#define MACVENTURE_H
+
+#include "engines/engine.h"
+
+struct ADGameDescription;
+
+namespace MacVenture {
+
+class MacVentureEngine : public Engine {
+
+public:
+ MacVentureEngine(OSystem *syst, const ADGameDescription *gameDesc);
+ ~MacVentureEngine();
+
+ virtual Common::Error run();
+
+private:
+ const ADGameDescription *_gameDescription;
+
+};
+} // End of namespace MacVenture
+
+#endif \ No newline at end of file
diff --git a/engines/macventure/module.mk b/engines/macventure/module.mk
index 4c04159b3e..839cbb4587 100644
--- a/engines/macventure/module.mk
+++ b/engines/macventure/module.mk
@@ -8,7 +8,7 @@ MODULE_DIRS += \
engines/macventure
# This module can be built as a plugin
-ifeq ($(ENABLE_WAGE), DYNAMIC_PLUGIN)
+ifeq ($(ENABLE_MACVENTURE), DYNAMIC_PLUGIN)
PLUGIN := 1
endif