diff options
author | Max Horn | 2005-11-19 17:57:24 +0000 |
---|---|---|
committer | Max Horn | 2005-11-19 17:57:24 +0000 |
commit | 8262b6dc2ac542b84d8ef2304df0f549039f411c (patch) | |
tree | 20ef39226253d54aac0b21562870e3e7d6805d83 /base/plugins.h | |
parent | b12138458de29908847974091fc5f2188ef9fecc (diff) | |
download | scummvm-rg350-8262b6dc2ac542b84d8ef2304df0f549039f411c.tar.gz scummvm-rg350-8262b6dc2ac542b84d8ef2304df0f549039f411c.tar.bz2 scummvm-rg350-8262b6dc2ac542b84d8ef2304df0f549039f411c.zip |
Tried to unify plugin code for PalmOS and non-PalmOS (hopefully I didn't break the PalmOS code this way, please verify)
svn-id: r19670
Diffstat (limited to 'base/plugins.h')
-rw-r--r-- | base/plugins.h | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/base/plugins.h b/base/plugins.h index 8812c44f27..6b4fba01e1 100644 --- a/base/plugins.h +++ b/base/plugins.h @@ -26,12 +26,12 @@ #include "common/array.h" #include "common/singleton.h" #include "common/util.h" +#include "base/gameDetector.h" // For GameSettings class Engine; class FSList; class GameDetector; class OSystem; -struct GameSettings; /** List of games. */ typedef Common::Array<GameSettings> GameList; @@ -84,21 +84,15 @@ public: * both as a static and a dynamic plugin. * * @todo add some means to query the plugin API version etc. - * @todo on Windows, we might need __declspec(dllexport) ? */ -#if defined(PALMOS_ARM) || defined(PALMOS_DEBUG) +#ifndef DYNAMIC_MODULES #define REGISTER_PLUGIN(ID,name) \ PluginRegistrator *g_##ID##_PluginReg; \ void g_##ID##_PluginReg_alloc() { \ g_##ID##_PluginReg = new PluginRegistrator(name, Engine_##ID##_gameList(), Engine_##ID##_create, Engine_##ID##_detectGames);\ } #else - -#ifndef DYNAMIC_MODULES -#define REGISTER_PLUGIN(ID,name) \ - PluginRegistrator g_##ID##_PluginReg(name, Engine_##ID##_gameList(), Engine_##ID##_create, Engine_##ID##_detectGames); -#else #define REGISTER_PLUGIN(ID,name) \ extern "C" { \ PLUGIN_EXPORT const char *PLUGIN_name() { return name; } \ @@ -107,7 +101,6 @@ public: PLUGIN_EXPORT DetectedGameList PLUGIN_detectGames(const FSList &fslist) { return Engine_##ID##_detectGames(fslist); } \ } #endif -#endif #ifndef DYNAMIC_MODULES /** @@ -115,7 +108,7 @@ public: * to allow static 'plugins' to register with the PluginManager. */ class PluginRegistrator { - friend class PluginManager; + friend class StaticPlugin; public: typedef Engine *(*EngineFactory)(GameDetector *detector, OSystem *syst); typedef DetectedGameList (*DetectFunc)(const FSList &fslist); |