diff options
author | Max Horn | 2006-07-31 13:41:21 +0000 |
---|---|---|
committer | Max Horn | 2006-07-31 13:41:21 +0000 |
commit | 4a80db4c7b75ca58b7a2c02a740e0ed7e19c52f4 (patch) | |
tree | 25b4b111b4a9bbc712a5f53335b0e9ce5b5c9abd /base/plugins.h | |
parent | a1bb64e24b3fdcd8983a479fe9b6c0d88f650e30 (diff) | |
download | scummvm-rg350-4a80db4c7b75ca58b7a2c02a740e0ed7e19c52f4.tar.gz scummvm-rg350-4a80db4c7b75ca58b7a2c02a740e0ed7e19c52f4.tar.bz2 scummvm-rg350-4a80db4c7b75ca58b7a2c02a740e0ed7e19c52f4.zip |
* Added copyright string to all engine plugins
* Modified about dialog to list all available plugins with their resp. copyright
* Modified about dialog credits to show the GPL last (like movie end credits do with their legal text, too)
svn-id: r23645
Diffstat (limited to 'base/plugins.h')
-rw-r--r-- | base/plugins.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/base/plugins.h b/base/plugins.h index b0178f3e89..944f4b0aa8 100644 --- a/base/plugins.h +++ b/base/plugins.h @@ -92,6 +92,7 @@ public: virtual void unloadPlugin() {} virtual const char *getName() const = 0; + virtual const char *getCopyright() const = 0; virtual int getVersion() const { return 0; } // TODO! virtual GameList getSupportedGames() const = 0; @@ -127,10 +128,10 @@ public: */ #ifndef DYNAMIC_MODULES -#define REGISTER_PLUGIN(ID,name) \ +#define REGISTER_PLUGIN(ID,name,copyright) \ PluginRegistrator *g_##ID##_PluginReg; \ void g_##ID##_PluginReg_alloc() { \ - g_##ID##_PluginReg = new PluginRegistrator(name, \ + g_##ID##_PluginReg = new PluginRegistrator(name, copyright, \ Engine_##ID##_gameIDList(), \ Engine_##ID##_findGameID, \ Engine_##ID##_create, \ @@ -139,9 +140,10 @@ public: } \ void dummyFuncToAllowTrailingSemicolon() #else -#define REGISTER_PLUGIN(ID,name) \ +#define REGISTER_PLUGIN(ID,name,copyright) \ extern "C" { \ PLUGIN_EXPORT const char *PLUGIN_name() { return name; } \ + PLUGIN_EXPORT const char *PLUGIN_copyright() { return copyright; } \ PLUGIN_EXPORT GameList PLUGIN_gameIDList() { return Engine_##ID##_gameIDList(); } \ PLUGIN_EXPORT GameDescriptor PLUGIN_findGameID(const char *gameid) { return Engine_##ID##_findGameID(gameid); } \ PLUGIN_EXPORT PluginError PLUGIN_createEngine(OSystem *syst, Engine **engine) { return Engine_##ID##_create(syst, engine); } \ @@ -164,13 +166,14 @@ public: protected: const char *_name; + const char *_copyright; GameIDQueryFunc _qf; EngineFactory _ef; DetectFunc _df; GameList _games; public: - PluginRegistrator(const char *name, GameList games, GameIDQueryFunc qf, EngineFactory ef, DetectFunc df); + PluginRegistrator(const char *name, const char *copyright, GameList games, GameIDQueryFunc qf, EngineFactory ef, DetectFunc df); }; #endif |