[Scummvm-cvs-logs] SF.net SVN: scummvm: [30827] scummvm/trunk
jvprat at users.sourceforge.net
jvprat at users.sourceforge.net
Fri Feb 8 02:45:46 CET 2008
Revision: 30827
http://scummvm.svn.sourceforge.net/scummvm/?rev=30827&view=rev
Author: jvprat
Date: 2008-02-07 17:45:46 -0800 (Thu, 07 Feb 2008)
Log Message:
-----------
Remove undesired spaces and an old TODO
Modified Paths:
--------------
scummvm/trunk/backends/plugins/dynamic-plugin.h
scummvm/trunk/base/plugins.cpp
scummvm/trunk/base/plugins.h
scummvm/trunk/engines/metaengine.h
Modified: scummvm/trunk/backends/plugins/dynamic-plugin.h
===================================================================
--- scummvm/trunk/backends/plugins/dynamic-plugin.h 2008-02-08 01:02:25 UTC (rev 30826)
+++ scummvm/trunk/backends/plugins/dynamic-plugin.h 2008-02-08 01:45:46 UTC (rev 30827)
@@ -39,39 +39,39 @@
public:
virtual bool loadPlugin() {
- // Validate the plugin API version
- IntFunc verFunc = (IntFunc)findSymbol("PLUGIN_getVersion");
- if (!verFunc) {
- unloadPlugin();
- return false;
- }
- if (verFunc() != PLUGIN_VERSION) {
- unloadPlugin();
- return false;
- }
+ // Validate the plugin API version
+ IntFunc verFunc = (IntFunc)findSymbol("PLUGIN_getVersion");
+ if (!verFunc) {
+ unloadPlugin();
+ return false;
+ }
+ if (verFunc() != PLUGIN_VERSION) {
+ unloadPlugin();
+ return false;
+ }
- // Get the type of the plugin
- IntFunc typeFunc = (IntFunc)findSymbol("PLUGIN_getType");
- if (!typeFunc) {
- unloadPlugin();
- return false;
- }
- _type = (PluginType)typeFunc();
- if (_type >= PLUGIN_TYPE_MAX) {
- unloadPlugin();
- return false;
- }
+ // Get the type of the plugin
+ IntFunc typeFunc = (IntFunc)findSymbol("PLUGIN_getType");
+ if (!typeFunc) {
+ unloadPlugin();
+ return false;
+ }
+ _type = (PluginType)typeFunc();
+ if (_type >= PLUGIN_TYPE_MAX) {
+ unloadPlugin();
+ return false;
+ }
- // Validate the plugin type API version
- IntFunc typeVerFunc = (IntFunc)findSymbol("PLUGIN_getTypeVersion");
- if (!typeVerFunc) {
- unloadPlugin();
- return false;
- }
- if (typeVerFunc() != pluginTypeVersions[_type]) {
- unloadPlugin();
- return false;
- }
+ // Validate the plugin type API version
+ IntFunc typeVerFunc = (IntFunc)findSymbol("PLUGIN_getTypeVersion");
+ if (!typeVerFunc) {
+ unloadPlugin();
+ return false;
+ }
+ if (typeVerFunc() != pluginTypeVersions[_type]) {
+ unloadPlugin();
+ return false;
+ }
// Get the plugin's instantiator object
GetObjectFunc getObject = (GetObjectFunc)findSymbol("PLUGIN_getObject");
Modified: scummvm/trunk/base/plugins.cpp
===================================================================
--- scummvm/trunk/base/plugins.cpp 2008-02-08 01:02:25 UTC (rev 30826)
+++ scummvm/trunk/base/plugins.cpp 2008-02-08 01:45:46 UTC (rev 30827)
@@ -93,7 +93,7 @@
PluginList pl;
#define LINK_PLUGIN(ID) \
- extern PluginType g_##ID##_type; \
+ extern PluginType g_##ID##_type; \
extern PluginObject *g_##ID##_getObject(); \
pl.push_back(new StaticPlugin(g_##ID##_getObject(), g_##ID##_type));
Modified: scummvm/trunk/base/plugins.h
===================================================================
--- scummvm/trunk/base/plugins.h 2008-02-08 01:02:25 UTC (rev 30826)
+++ scummvm/trunk/base/plugins.h 2008-02-08 01:45:46 UTC (rev 30827)
@@ -111,7 +111,7 @@
#ifndef DYNAMIC_MODULES
#define REGISTER_PLUGIN(ID,TYPE,PLUGINCLASS) \
- PluginType g_##ID##_type = TYPE; \
+ PluginType g_##ID##_type = TYPE; \
PluginObject *g_##ID##_getObject() { \
return new PLUGINCLASS(); \
} \
@@ -119,9 +119,9 @@
#else
#define REGISTER_PLUGIN(ID,TYPE,PLUGINCLASS) \
extern "C" { \
- PLUGIN_EXPORT int32 PLUGIN_getVersion() { return PLUGIN_VERSION; } \
- PLUGIN_EXPORT int32 PLUGIN_getType() { return TYPE; } \
- PLUGIN_EXPORT int32 PLUGIN_getTypeVersion() { return TYPE##_VERSION; } \
+ PLUGIN_EXPORT int32 PLUGIN_getVersion() { return PLUGIN_VERSION; } \
+ PLUGIN_EXPORT int32 PLUGIN_getType() { return TYPE; } \
+ PLUGIN_EXPORT int32 PLUGIN_getTypeVersion() { return TYPE##_VERSION; } \
PLUGIN_EXPORT PluginObject *PLUGIN_getObject() { \
return new PLUGINCLASS(); \
} \
Modified: scummvm/trunk/engines/metaengine.h
===================================================================
--- scummvm/trunk/engines/metaengine.h 2008-02-08 01:02:25 UTC (rev 30826)
+++ scummvm/trunk/engines/metaengine.h 2008-02-08 01:45:46 UTC (rev 30827)
@@ -51,8 +51,6 @@
/** Returns some copyright information about the engine. */
virtual const char *getCopyright() const = 0;
-// virtual int getVersion() const = 0; // TODO!
-
/** Returns a list of games supported by this engine. */
virtual GameList getSupportedGames() const = 0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list