diff options
author | Filippos Karapetis | 2012-04-19 01:15:31 -0700 |
---|---|---|
committer | Filippos Karapetis | 2012-04-19 01:15:31 -0700 |
commit | 754bde663be1cd2c6dc1ac03fe2ee5ff74bd0da5 (patch) | |
tree | dc9a78bdcf301e02985124edfc3b3a62e2936ffd | |
parent | a1618c215ba4b731c61df39a0eb31fc8028d34ed (diff) | |
parent | c638730fbcbcfff5fb86b36b5331794672944bf9 (diff) | |
download | scummvm-rg350-754bde663be1cd2c6dc1ac03fe2ee5ff74bd0da5.tar.gz scummvm-rg350-754bde663be1cd2c6dc1ac03fe2ee5ff74bd0da5.tar.bz2 scummvm-rg350-754bde663be1cd2c6dc1ac03fe2ee5ff74bd0da5.zip |
Merge pull request #232 from fingolfin/refactor-plugins
Refactor plugins
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | base/plugins.cpp | 103 | ||||
-rwxr-xr-x | configure | 48 | ||||
-rw-r--r-- | devtools/create_project/create_project.cpp | 2 | ||||
-rw-r--r-- | engines/configure.engines | 47 | ||||
-rw-r--r-- | engines/plugins_table.h | 103 |
6 files changed, 155 insertions, 150 deletions
@@ -75,7 +75,7 @@ EXECUTABLE := $(EXEPRE)scummvm$(EXEEXT) include $(srcdir)/Makefile.common # check if configure has been run or has been changed since last run -config.h config.mk: $(srcdir)/configure +config.h config.mk: $(srcdir)/configure $(srcdir)/engines/configure.engines ifeq "$(findstring config.mk,$(MAKEFILE_LIST))" "config.mk" @echo "Running $(srcdir)/configure with the last specified parameters" @sleep 2 diff --git a/base/plugins.cpp b/base/plugins.cpp index db8a5d8817..c19b60782d 100644 --- a/base/plugins.cpp +++ b/base/plugins.cpp @@ -85,108 +85,7 @@ public: // Iterate over all registered (static) plugins and load them. // Engine plugins - #if PLUGIN_ENABLED_STATIC(SCUMM) - LINK_PLUGIN(SCUMM) - #endif - #if PLUGIN_ENABLED_STATIC(AGI) - LINK_PLUGIN(AGI) - #endif - #if PLUGIN_ENABLED_STATIC(AGOS) - LINK_PLUGIN(AGOS) - #endif - #if PLUGIN_ENABLED_STATIC(CGE) - LINK_PLUGIN(CGE) - #endif - #if PLUGIN_ENABLED_STATIC(CINE) - LINK_PLUGIN(CINE) - #endif - #if PLUGIN_ENABLED_STATIC(COMPOSER) - LINK_PLUGIN(COMPOSER) - #endif - #if PLUGIN_ENABLED_STATIC(CRUISE) - LINK_PLUGIN(CRUISE) - #endif - #if PLUGIN_ENABLED_STATIC(DRACI) - LINK_PLUGIN(DRACI) - #endif - #if PLUGIN_ENABLED_STATIC(DRASCULA) - LINK_PLUGIN(DRASCULA) - #endif - #if PLUGIN_ENABLED_STATIC(DREAMWEB) - LINK_PLUGIN(DREAMWEB) - #endif - #if PLUGIN_ENABLED_STATIC(GOB) - LINK_PLUGIN(GOB) - #endif - #if PLUGIN_ENABLED_STATIC(GROOVIE) - LINK_PLUGIN(GROOVIE) - #endif - #if PLUGIN_ENABLED_STATIC(HUGO) - LINK_PLUGIN(HUGO) - #endif - #if PLUGIN_ENABLED_STATIC(KYRA) - LINK_PLUGIN(KYRA) - #endif - #if PLUGIN_ENABLED_STATIC(LASTEXPRESS) - LINK_PLUGIN(LASTEXPRESS) - #endif - #if PLUGIN_ENABLED_STATIC(LURE) - LINK_PLUGIN(LURE) - #endif - #if PLUGIN_ENABLED_STATIC(MADE) - LINK_PLUGIN(MADE) - #endif - #if PLUGIN_ENABLED_STATIC(MOHAWK) - LINK_PLUGIN(MOHAWK) - #endif - #if PLUGIN_ENABLED_STATIC(PARALLACTION) - LINK_PLUGIN(PARALLACTION) - #endif - #if PLUGIN_ENABLED_STATIC(QUEEN) - LINK_PLUGIN(QUEEN) - #endif - #if PLUGIN_ENABLED_STATIC(SAGA) - LINK_PLUGIN(SAGA) - #endif - #if PLUGIN_ENABLED_STATIC(SCI) - LINK_PLUGIN(SCI) - #endif - #if PLUGIN_ENABLED_STATIC(SKY) - LINK_PLUGIN(SKY) - #endif - #if PLUGIN_ENABLED_STATIC(SWORD1) - LINK_PLUGIN(SWORD1) - #endif - #if PLUGIN_ENABLED_STATIC(SWORD2) - LINK_PLUGIN(SWORD2) - #endif - #if PLUGIN_ENABLED_STATIC(SWORD25) - LINK_PLUGIN(SWORD25) - #endif - #if PLUGIN_ENABLED_STATIC(TEENAGENT) - LINK_PLUGIN(TEENAGENT) - #endif - #if PLUGIN_ENABLED_STATIC(TESTBED) - LINK_PLUGIN(TESTBED) - #endif - #if PLUGIN_ENABLED_STATIC(TINSEL) - LINK_PLUGIN(TINSEL) - #endif - #if PLUGIN_ENABLED_STATIC(TOLTECS) - LINK_PLUGIN(TOLTECS) - #endif - #if PLUGIN_ENABLED_STATIC(TOON) - LINK_PLUGIN(TOON) - #endif - #if PLUGIN_ENABLED_STATIC(TSAGE) - LINK_PLUGIN(TSAGE) - #endif - #if PLUGIN_ENABLED_STATIC(TOUCHE) - LINK_PLUGIN(TOUCHE) - #endif - #if PLUGIN_ENABLED_STATIC(TUCKER) - LINK_PLUGIN(TUCKER) - #endif + #include "engines/plugins_table.h" // Music plugins // TODO: Use defines to disable or enable each MIDI driver as a @@ -77,52 +77,8 @@ add_engine() { done } -add_engine scumm "SCUMM" yes "scumm_7_8 he" -add_engine scumm_7_8 "v7 & v8 games" yes -add_engine he "HE71+ games" yes -add_engine agi "AGI" yes -add_engine agos "AGOS" yes "agos2" -add_engine agos2 "AGOS 2 games" yes -add_engine cge "CGE" yes -add_engine cine "Cinematique evo 1" yes -add_engine composer "Magic Composer" no -add_engine cruise "Cinematique evo 2" yes -add_engine draci "Dragon History" yes -add_engine drascula "Drascula: The Vampire Strikes Back" yes -add_engine dreamweb "Dreamweb" no -add_engine gob "Gobli*ns" yes -add_engine groovie "Groovie" yes "groovie2" -add_engine groovie2 "Groovie 2 games" no -add_engine hugo "Hugo Trilogy" yes -add_engine kyra "Legend of Kyrandia" yes "lol eob" -add_engine lol "Lands of Lore" yes -add_engine eob "Eye of the Beholder" no -add_engine lastexpress "The Last Express" no -add_engine lure "Lure of the Temptress" yes -add_engine made "MADE" yes -add_engine mohawk "Mohawk" yes "cstime myst riven" -add_engine cstime "Where in Time is Carmen Sandiego?" no -add_engine riven "Riven: The Sequel to Myst" no -add_engine myst "Myst" no -add_engine parallaction "Parallaction" yes -add_engine queen "Flight of the Amazon Queen" yes -add_engine saga "SAGA" yes "ihnm saga2" -add_engine ihnm "IHNM" yes -add_engine saga2 "SAGA 2 games" no -add_engine sci "SCI" yes "sci32" -add_engine sci32 "SCI32 games" no -add_engine sky "Beneath a Steel Sky" yes -add_engine sword1 "Broken Sword" yes -add_engine sword2 "Broken Sword II" yes -add_engine sword25 "Broken Sword 2.5" no -add_engine teenagent "Teen Agent" yes -add_engine testbed "TestBed: the Testing framework" no -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 tsage "TsAGE" yes -add_engine tucker "Bud Tucker in Double Trouble" yes +# Read list of engines +. engines/configure.engines # # Default settings diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp index 062c03b648..293cc0b2de 100644 --- a/devtools/create_project/create_project.cpp +++ b/devtools/create_project/create_project.cpp @@ -693,7 +693,7 @@ bool parseEngine(const std::string &line, EngineDesc &engine); } // End of anonymous namespace EngineDescList parseConfigure(const std::string &srcDir) { - std::string configureFile = srcDir + "/configure"; + std::string configureFile = srcDir + "/engines/configure.engines"; std::ifstream configure(configureFile.c_str()); if (!configure) diff --git a/engines/configure.engines b/engines/configure.engines new file mode 100644 index 0000000000..6e8db01e66 --- /dev/null +++ b/engines/configure.engines @@ -0,0 +1,47 @@ +# This file is included from the main "configure" script +add_engine scumm "SCUMM" yes "scumm_7_8 he" +add_engine scumm_7_8 "v7 & v8 games" yes +add_engine he "HE71+ games" yes +add_engine agi "AGI" yes +add_engine agos "AGOS" yes "agos2" +add_engine agos2 "AGOS 2 games" yes +add_engine cge "CGE" yes +add_engine cine "Cinematique evo 1" yes +add_engine composer "Magic Composer" no +add_engine cruise "Cinematique evo 2" yes +add_engine draci "Dragon History" yes +add_engine drascula "Drascula: The Vampire Strikes Back" yes +add_engine dreamweb "Dreamweb" no +add_engine gob "Gobli*ns" yes +add_engine groovie "Groovie" yes "groovie2" +add_engine groovie2 "Groovie 2 games" no +add_engine hugo "Hugo Trilogy" yes +add_engine kyra "Legend of Kyrandia" yes "lol eob" +add_engine lol "Lands of Lore" yes +add_engine eob "Eye of the Beholder" no +add_engine lastexpress "The Last Express" no +add_engine lure "Lure of the Temptress" yes +add_engine made "MADE" yes +add_engine mohawk "Mohawk" yes "cstime myst riven" +add_engine cstime "Where in Time is Carmen Sandiego?" no +add_engine riven "Riven: The Sequel to Myst" no +add_engine myst "Myst" no +add_engine parallaction "Parallaction" yes +add_engine queen "Flight of the Amazon Queen" yes +add_engine saga "SAGA" yes "ihnm saga2" +add_engine ihnm "IHNM" yes +add_engine saga2 "SAGA 2 games" no +add_engine sci "SCI" yes "sci32" +add_engine sci32 "SCI32 games" no +add_engine sky "Beneath a Steel Sky" yes +add_engine sword1 "Broken Sword" yes +add_engine sword2 "Broken Sword II" yes +add_engine sword25 "Broken Sword 2.5" no +add_engine teenagent "Teen Agent" yes +add_engine testbed "TestBed: the Testing framework" no +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 tsage "TsAGE" yes +add_engine tucker "Bud Tucker in Double Trouble" yes diff --git a/engines/plugins_table.h b/engines/plugins_table.h new file mode 100644 index 0000000000..fac956755e --- /dev/null +++ b/engines/plugins_table.h @@ -0,0 +1,103 @@ +// This file is being included by "base/plugins.cpp" +#if PLUGIN_ENABLED_STATIC(SCUMM) +LINK_PLUGIN(SCUMM) +#endif +#if PLUGIN_ENABLED_STATIC(AGI) +LINK_PLUGIN(AGI) +#endif +#if PLUGIN_ENABLED_STATIC(AGOS) +LINK_PLUGIN(AGOS) +#endif +#if PLUGIN_ENABLED_STATIC(CGE) +LINK_PLUGIN(CGE) +#endif +#if PLUGIN_ENABLED_STATIC(CINE) +LINK_PLUGIN(CINE) +#endif +#if PLUGIN_ENABLED_STATIC(COMPOSER) +LINK_PLUGIN(COMPOSER) +#endif +#if PLUGIN_ENABLED_STATIC(CRUISE) +LINK_PLUGIN(CRUISE) +#endif +#if PLUGIN_ENABLED_STATIC(DRACI) +LINK_PLUGIN(DRACI) +#endif +#if PLUGIN_ENABLED_STATIC(DRASCULA) +LINK_PLUGIN(DRASCULA) +#endif +#if PLUGIN_ENABLED_STATIC(DREAMWEB) +LINK_PLUGIN(DREAMWEB) +#endif +#if PLUGIN_ENABLED_STATIC(GOB) +LINK_PLUGIN(GOB) +#endif +#if PLUGIN_ENABLED_STATIC(GROOVIE) +LINK_PLUGIN(GROOVIE) +#endif +#if PLUGIN_ENABLED_STATIC(HUGO) +LINK_PLUGIN(HUGO) +#endif +#if PLUGIN_ENABLED_STATIC(KYRA) +LINK_PLUGIN(KYRA) +#endif +#if PLUGIN_ENABLED_STATIC(LASTEXPRESS) +LINK_PLUGIN(LASTEXPRESS) +#endif +#if PLUGIN_ENABLED_STATIC(LURE) +LINK_PLUGIN(LURE) +#endif +#if PLUGIN_ENABLED_STATIC(MADE) +LINK_PLUGIN(MADE) +#endif +#if PLUGIN_ENABLED_STATIC(MOHAWK) +LINK_PLUGIN(MOHAWK) +#endif +#if PLUGIN_ENABLED_STATIC(PARALLACTION) +LINK_PLUGIN(PARALLACTION) +#endif +#if PLUGIN_ENABLED_STATIC(QUEEN) +LINK_PLUGIN(QUEEN) +#endif +#if PLUGIN_ENABLED_STATIC(SAGA) +LINK_PLUGIN(SAGA) +#endif +#if PLUGIN_ENABLED_STATIC(SCI) +LINK_PLUGIN(SCI) +#endif +#if PLUGIN_ENABLED_STATIC(SKY) +LINK_PLUGIN(SKY) +#endif +#if PLUGIN_ENABLED_STATIC(SWORD1) +LINK_PLUGIN(SWORD1) +#endif +#if PLUGIN_ENABLED_STATIC(SWORD2) +LINK_PLUGIN(SWORD2) +#endif +#if PLUGIN_ENABLED_STATIC(SWORD25) +LINK_PLUGIN(SWORD25) +#endif +#if PLUGIN_ENABLED_STATIC(TEENAGENT) +LINK_PLUGIN(TEENAGENT) +#endif +#if PLUGIN_ENABLED_STATIC(TESTBED) +LINK_PLUGIN(TESTBED) +#endif +#if PLUGIN_ENABLED_STATIC(TINSEL) +LINK_PLUGIN(TINSEL) +#endif +#if PLUGIN_ENABLED_STATIC(TOLTECS) +LINK_PLUGIN(TOLTECS) +#endif +#if PLUGIN_ENABLED_STATIC(TOON) +LINK_PLUGIN(TOON) +#endif +#if PLUGIN_ENABLED_STATIC(TSAGE) +LINK_PLUGIN(TSAGE) +#endif +#if PLUGIN_ENABLED_STATIC(TOUCHE) +LINK_PLUGIN(TOUCHE) +#endif +#if PLUGIN_ENABLED_STATIC(TUCKER) +LINK_PLUGIN(TUCKER) +#endif |