- Added operator-> to Plugin subclasses so they don't have to reimplement the PluginObject subclass interfaces (thanks to Fingolfin for suggesting it)

- Added the PluginSubclass template to help creating Plugin subclasses

svn-id: r32082
This commit is contained in:
Jordi Vilalta Prat 2008-05-13 09:30:23 +00:00
parent 3db45cc0c8
commit fe58f0ee4b
5 changed files with 33 additions and 56 deletions

View file

@ -32,6 +32,7 @@
*/
#include "engines/engine.h"
#include "engines/metaengine.h"
#include "base/commandLine.h"
#include "base/plugins.h"
#include "base/version.h"
@ -138,7 +139,7 @@ static int runGame(const EnginePlugin *plugin, OSystem &system, const Common::St
// Create the game engine
Engine *engine = 0;
PluginError err = plugin->createInstance(&system, &engine);
PluginError err = (*plugin)->createInstance(&system, &engine);
if (!engine || err != kNoError) {
// TODO: Show an error dialog or so?
// TODO: Also take 'err' into consideration...