aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2012-04-25 12:49:49 +1000
committerPaul Gilbert2012-04-25 12:49:49 +1000
commitbc08a919d2b58930c99818ec1d629c4c712c02ae (patch)
tree835622c0811a2c9e3e4f14154f8d020c649f5264 /engines
parenta322ee83dd281de93d2ab564366d474821132d90 (diff)
downloadscummvm-rg350-bc08a919d2b58930c99818ec1d629c4c712c02ae.tar.gz
scummvm-rg350-bc08a919d2b58930c99818ec1d629c4c712c02ae.tar.bz2
scummvm-rg350-bc08a919d2b58930c99818ec1d629c4c712c02ae.zip
TONY: Created skeleton engine
Diffstat (limited to 'engines')
-rw-r--r--engines/configure.engines1
-rw-r--r--engines/engines.mk5
-rw-r--r--engines/plugins_table.h3
-rw-r--r--engines/tony/detection.cpp93
-rw-r--r--engines/tony/detection_tables.h43
-rw-r--r--engines/tony/module.mk13
-rw-r--r--engines/tony/tony.cpp39
-rw-r--r--engines/tony/tony.h80
8 files changed, 277 insertions, 0 deletions
diff --git a/engines/configure.engines b/engines/configure.engines
index 6e8db01e66..4d416381bf 100644
--- a/engines/configure.engines
+++ b/engines/configure.engines
@@ -43,5 +43,6 @@ add_engine tinsel "Tinsel" yes
add_engine toltecs "3 Skulls of the Toltecs" no
add_engine toon "Toonstruck" yes
add_engine touche "Touche: The Adventures of the Fifth Musketeer" yes
+add_engine tony "Tony Tough and the Night of Roasted Moths" no
add_engine tsage "TsAGE" yes
add_engine tucker "Bud Tucker in Double Trouble" yes
diff --git a/engines/engines.mk b/engines/engines.mk
index 9939506b86..bf6fa7a09d 100644
--- a/engines/engines.mk
+++ b/engines/engines.mk
@@ -197,6 +197,11 @@ DEFINES += -DENABLE_TOLTECS=$(ENABLE_TOLTECS)
MODULES += engines/toltecs
endif
+ifdef ENABLE_TONY
+DEFINES += -DENABLE_TONY=$(ENABLE_TONY)
+MODULES += engines/tony
+endif
+
ifdef ENABLE_TOON
DEFINES += -DENABLE_TOON=$(ENABLE_TOON)
MODULES += engines/toon
diff --git a/engines/plugins_table.h b/engines/plugins_table.h
index fac956755e..d75c4a78b9 100644
--- a/engines/plugins_table.h
+++ b/engines/plugins_table.h
@@ -89,6 +89,9 @@ LINK_PLUGIN(TINSEL)
#if PLUGIN_ENABLED_STATIC(TOLTECS)
LINK_PLUGIN(TOLTECS)
#endif
+#if PLUGIN_ENABLED_STATIC(TONY)
+LINK_PLUGIN(TONY)
+#endif
#if PLUGIN_ENABLED_STATIC(TOON)
LINK_PLUGIN(TOON)
#endif
diff --git a/engines/tony/detection.cpp b/engines/tony/detection.cpp
new file mode 100644
index 0000000000..58d16842d4
--- /dev/null
+++ b/engines/tony/detection.cpp
@@ -0,0 +1,93 @@
+/* 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 "common/system.h"
+
+#include "tony/tony.h"
+
+
+namespace Tony {
+
+struct TonyGameDescription {
+ ADGameDescription desc;
+};
+
+uint32 TonyEngine::getFeatures() const {
+ return _gameDescription->desc.flags;
+}
+
+Common::Language TonyEngine::getLanguage() const {
+ return _gameDescription->desc.language;
+}
+
+}
+
+static const PlainGameDescriptor tonyGames[] = {
+ {"tony", "Tony Tough and the Night of Roasted Moths"},
+ {0, 0}
+};
+
+#include "tony/detection_tables.h"
+
+class TonyMetaEngine : public AdvancedMetaEngine {
+public:
+ TonyMetaEngine() : AdvancedMetaEngine(Tony::gameDescriptions, sizeof(Tony::TonyGameDescription), tonyGames) {
+ }
+
+ virtual const char *getName() const {
+ return "Tony Engine";
+ }
+
+ virtual const char *getOriginalCopyright() const {
+ return "Tony Engine (C) Protonic Interactive";
+ }
+
+ virtual bool hasFeature(MetaEngineFeature f) const;
+ virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const;
+};
+
+bool TonyMetaEngine::hasFeature(MetaEngineFeature f) const {
+ return false;
+}
+
+bool Tony::TonyEngine::hasFeature(EngineFeature f) const {
+ return
+ (f == kSupportsRTL);
+}
+
+bool TonyMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
+ const Tony::TonyGameDescription *gd = (const Tony::TonyGameDescription *)desc;
+ if (gd) {
+ *engine = new Tony::TonyEngine(syst, gd);
+ }
+ return gd != 0;
+}
+
+#if PLUGIN_ENABLED_DYNAMIC(TONY)
+ REGISTER_PLUGIN_DYNAMIC(TONY, PLUGIN_TYPE_ENGINE, TonyMetaEngine);
+#else
+ REGISTER_PLUGIN_STATIC(TONY, PLUGIN_TYPE_ENGINE, TonyMetaEngine);
+#endif
diff --git a/engines/tony/detection_tables.h b/engines/tony/detection_tables.h
new file mode 100644
index 0000000000..bb660dd862
--- /dev/null
+++ b/engines/tony/detection_tables.h
@@ -0,0 +1,43 @@
+/* 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 Tony {
+
+static const TonyGameDescription gameDescriptions[] = {
+
+ {
+ // Tony Tough English Demo
+ {
+ "tony",
+ "Demo",
+ AD_ENTRY1s("roasted.mpr", "06203dbbc85fdd1e6dc8fc211c1a6207", 14972409),
+ Common::EN_ANY,
+ Common::kPlatformPC,
+ ADGF_DEMO,
+ GUIO1(GUIO_NONE)
+ },
+ },
+
+ { AD_TABLE_END_MARKER }
+};
+
+} // End of namespace Tony
diff --git a/engines/tony/module.mk b/engines/tony/module.mk
new file mode 100644
index 0000000000..840fbc0dbf
--- /dev/null
+++ b/engines/tony/module.mk
@@ -0,0 +1,13 @@
+MODULE := engines/tony
+
+MODULE_OBJS := \
+ detection.o \
+ tony.o
+
+# This module can be built as a plugin
+ifeq ($(ENABLE_TONY), DYNAMIC_PLUGIN)
+PLUGIN := 1
+endif
+
+# Include common rules
+include $(srcdir)/rules.mk
diff --git a/engines/tony/tony.cpp b/engines/tony/tony.cpp
new file mode 100644
index 0000000000..523147c848
--- /dev/null
+++ b/engines/tony/tony.cpp
@@ -0,0 +1,39 @@
+/* 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 "tony/tony.h"
+
+namespace Tony {
+
+TonyEngine *_vm;
+
+TonyEngine::TonyEngine(OSystem *syst, const TonyGameDescription *gameDesc) : Engine(syst), _gameDescription(gameDesc) {
+}
+
+TonyEngine::~TonyEngine() {
+}
+
+Common::Error TonyEngine::run() {
+ return Common::kNoError;
+}
+
+} // End of namespace Tony
diff --git a/engines/tony/tony.h b/engines/tony/tony.h
new file mode 100644
index 0000000000..5aa0de95a3
--- /dev/null
+++ b/engines/tony/tony.h
@@ -0,0 +1,80 @@
+/* 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 TONY_H
+#define TONY_H
+
+#include "common/scummsys.h"
+#include "common/system.h"
+#include "common/error.h"
+#include "common/events.h"
+#include "common/keyboard.h"
+#include "common/util.h"
+#include "engines/engine.h"
+
+/**
+ * This is the namespace of the Tony engine.
+ *
+ * Status of this engine: In Development
+ *
+ * Games using this engine:
+ * - Tony Tough
+ */
+namespace Tony {
+
+enum {
+ kTonyDebugAnimations = 1 << 0,
+ kTonyDebugActions = 1 << 1,
+ kTonyDebugSound = 1 << 2,
+ kTonyDebugMusic = 2 << 3
+};
+
+#define DEBUG_BASIC 1
+#define DEBUG_INTERMEDIATE 2
+#define DEBUG_DETAILED 3
+
+struct TonyGameDescription;
+
+class TonyEngine : public Engine {
+protected:
+ // Engine APIs
+ virtual Common::Error run();
+ virtual bool hasFeature(EngineFeature f) const;
+public:
+ TonyEngine(OSystem *syst, const TonyGameDescription *gameDesc);
+ virtual ~TonyEngine();
+
+ const TonyGameDescription *_gameDescription;
+ uint32 getGameID() const;
+ uint32 getFeatures() const;
+ Common::Language getLanguage() const;
+ uint16 getVersion() const;
+ uint32 getFlags() const;
+ Common::Platform getPlatform() const;
+};
+
+// Global reference to the TonyEngine object
+extern TonyEngine *_vm;
+
+} // End of namespace Tony
+
+#endif /* TONY_H */