diff options
-rw-r--r-- | engines/mortevielle/detection.cpp | 70 | ||||
-rw-r--r-- | engines/mortevielle/detection_tables.h | 38 | ||||
-rw-r--r-- | engines/mortevielle/module.mk | 2 | ||||
-rw-r--r-- | engines/mortevielle/mort.cpp | 2 | ||||
-rw-r--r-- | engines/mortevielle/mort.h | 3 | ||||
-rw-r--r-- | engines/mortevielle/mortevielle.cpp | 47 | ||||
-rw-r--r-- | engines/mortevielle/mortevielle.h | 55 |
7 files changed, 215 insertions, 2 deletions
diff --git a/engines/mortevielle/detection.cpp b/engines/mortevielle/detection.cpp new file mode 100644 index 0000000000..df8a6df407 --- /dev/null +++ b/engines/mortevielle/detection.cpp @@ -0,0 +1,70 @@ +/* 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 "mortevielle/mortevielle.h" +#include "mortevielle/detection_tables.h" + +namespace Mortevielle { +uint32 MortevielleEngine::getGameFlags() const { return _gameDescription->flags; } +} + +static const PlainGameDescriptor MortevielleGame[] = { + {"mortevielle", "Mortville Manor"}, + {0, 0} +}; + +class MortevielleMetaEngine : public AdvancedMetaEngine { +public: + MortevielleMetaEngine() : AdvancedMetaEngine(Mortevielle::gameDescriptions, sizeof(ADGameDescription), + MortevielleGame) { + } + virtual const char *getName() const { + return "Mortevielle"; + } + + virtual const char *getOriginalCopyright() const { + return "Mortville Manor (C) 1988 Lankhor"; + } + + virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const; + virtual bool hasFeature(MetaEngineFeature f) const; +}; + +bool MortevielleMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const { + if (desc) { + *engine = new Mortevielle::MortevielleEngine(syst, desc); + } + return desc != 0; +} + +bool MortevielleMetaEngine::hasFeature(MetaEngineFeature f) const { + return false; +} + +#if PLUGIN_ENABLED_DYNAMIC(MORTEVIELLE) + REGISTER_PLUGIN_DYNAMIC(MORTEVIELLE, PLUGIN_TYPE_ENGINE, MortevielleMetaEngine); +#else + REGISTER_PLUGIN_STATIC(MORTEVIELLE, PLUGIN_TYPE_ENGINE, MortevielleMetaEngine); +#endif diff --git a/engines/mortevielle/detection_tables.h b/engines/mortevielle/detection_tables.h new file mode 100644 index 0000000000..4ea062b2b2 --- /dev/null +++ b/engines/mortevielle/detection_tables.h @@ -0,0 +1,38 @@ +/* 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 Mortevielle { + +static const ADGameDescription gameDescriptions[] = { + { + "mortevielle", + "", + AD_ENTRY1s("mortvielle.txt", "d41d8cd98f00b204e9800998ecf8427e", 0), + Common::FR_FRA, + Common::kPlatformPC, + ADGF_UNSTABLE, + GUIO1(GUIO_NOASPECT) + }, + AD_TABLE_END_MARKER +}; + +} // End of namespace Mortevielle diff --git a/engines/mortevielle/module.mk b/engines/mortevielle/module.mk index 3213d15b49..50ec3f0197 100644 --- a/engines/mortevielle/module.mk +++ b/engines/mortevielle/module.mk @@ -4,6 +4,7 @@ MODULE_OBJS := \ actions.o \ alert.o \ boite.o \ + detection.o \ disk.o \ droite.o \ keyboard.o \ @@ -12,6 +13,7 @@ MODULE_OBJS := \ mor.o \ mor2.o \ mort.o \ + mortevielle.o \ mouse.o \ outtext.o \ ovd1.o \ diff --git a/engines/mortevielle/mort.cpp b/engines/mortevielle/mort.cpp index f3b0ac73ab..3a4df46ea5 100644 --- a/engines/mortevielle/mort.cpp +++ b/engines/mortevielle/mort.cpp @@ -66,7 +66,7 @@ void divers(int np, bool b) { /* NIVEAU 0 */ -int main(int argc, const char *argv[]) { +int mortevielle_main(int argc, const char *argv[]) { /*init_debug;*/ /* ecri_seg;*/ //pio_initialize(argc, argv); diff --git a/engines/mortevielle/mort.h b/engines/mortevielle/mort.h index fa42288963..8523774da6 100644 --- a/engines/mortevielle/mort.h +++ b/engines/mortevielle/mort.h @@ -32,7 +32,8 @@ namespace Mortevielle { extern void divers(int np, bool b); /* NIVEAU 0 */ -extern int main(int argc, const char *argv[]); +extern int mortevielle_main(int argc, const char *argv[]); + } // End of namespace Mortevielle #endif diff --git a/engines/mortevielle/mortevielle.cpp b/engines/mortevielle/mortevielle.cpp new file mode 100644 index 0000000000..dd93555ee3 --- /dev/null +++ b/engines/mortevielle/mortevielle.cpp @@ -0,0 +1,47 @@ +/* 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 "mortevielle/mortevielle.h" +#include "mortevielle/mort.h" + +namespace Mortevielle { + +MortevielleEngine::MortevielleEngine(OSystem *system, const ADGameDescription *gameDesc): + Engine(system), _gameDescription(gameDesc) { +} + +MortevielleEngine::~MortevielleEngine() { +} + +bool MortevielleEngine::hasFeature(EngineFeature f) const { + return false; +} + +Common::Error MortevielleEngine::run() { + // Dispatch to the game's main routine + const char *argv[] = { "" }; + mortevielle_main(1, argv); + + return Common::kNoError; +} + +} // End of namespace Mortevielle diff --git a/engines/mortevielle/mortevielle.h b/engines/mortevielle/mortevielle.h new file mode 100644 index 0000000000..406f8fe6d2 --- /dev/null +++ b/engines/mortevielle/mortevielle.h @@ -0,0 +1,55 @@ +/* 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 MORTEVIELLE_H +#define MORTEVIELLE_H + +#include "engines/advancedDetector.h" +#include "engines/engine.h" +#include "common/error.h" + +namespace Mortevielle { + +enum { + kMortevielleCore = 1 << 0 +}; + +#define SCREEN_WIDTH 320 +#define SCREEN_HEIGHT 200 + +class MortevielleEngine : public Engine { +private: + const ADGameDescription *_gameDescription; +public: + MortevielleEngine(OSystem *system, const ADGameDescription *gameDesc); + ~MortevielleEngine(); + virtual bool hasFeature(EngineFeature f) const; + virtual Common::Error run(); + + uint32 getGameFlags() const; +}; + +extern MortevielleEngine *g_vm; + +} // End of namespace Mortevielle + +#endif |