aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--base/commandLine.cpp8
-rw-r--r--base/plugins.cpp17
-rw-r--r--base/plugins.h11
-rw-r--r--engines/agi/agi.cpp2
-rw-r--r--engines/cine/cine.cpp2
-rw-r--r--engines/gob/gob.cpp2
-rw-r--r--engines/kyra/plugin.cpp2
-rw-r--r--engines/lure/lure.cpp2
-rw-r--r--engines/queen/queen.cpp2
-rw-r--r--engines/saga/game.cpp2
-rw-r--r--engines/scumm/plugin.cpp4
-rw-r--r--engines/simon/game.cpp2
-rw-r--r--engines/sky/sky.cpp2
-rw-r--r--engines/sword1/sword1.cpp2
-rw-r--r--engines/sword2/sword2.cpp2
-rw-r--r--gui/about.cpp50
16 files changed, 70 insertions, 42 deletions
diff --git a/base/commandLine.cpp b/base/commandLine.cpp
index 8372b976fb..bfa3424822 100644
--- a/base/commandLine.cpp
+++ b/base/commandLine.cpp
@@ -519,11 +519,10 @@ unknownOption:
/** List all supported game IDs, i.e. all games which any loaded plugin supports. */
static void listGames() {
- const PluginList &plugins = PluginManager::instance().getPlugins();
-
printf("Game ID Full Title \n"
"-------------------- ------------------------------------------------------\n");
+ const PluginList &plugins = PluginManager::instance().getPlugins();
PluginList::const_iterator iter = plugins.begin();
for (iter = plugins.begin(); iter != plugins.end(); ++iter) {
GameList list = (*iter)->getSupportedGames();
@@ -535,12 +534,11 @@ static void listGames() {
/** List all targets which are configured in the config file. */
static void listTargets() {
- using namespace Common;
- const ConfigManager::DomainMap &domains = ConfMan.getGameDomains();
-
printf("Target Description \n"
"-------------------- ------------------------------------------------------\n");
+ using namespace Common;
+ const ConfigManager::DomainMap &domains = ConfMan.getGameDomains();
ConfigManager::DomainMap::const_iterator iter = domains.begin();
for (iter = domains.begin(); iter != domains.end(); ++iter) {
Common::String name(iter->_key);
diff --git a/base/plugins.cpp b/base/plugins.cpp
index d16ad791c8..25b8a7a5f8 100644
--- a/base/plugins.cpp
+++ b/base/plugins.cpp
@@ -60,8 +60,8 @@ typedef DetectedGameList (*DetectFunc)(const FSList &fslist);
#else
-PluginRegistrator::PluginRegistrator(const char *name, GameList games, GameIDQueryFunc qf, EngineFactory ef, DetectFunc df)
- : _name(name), _qf(qf), _ef(ef), _df(df), _games(games) {
+PluginRegistrator::PluginRegistrator(const char *name, const char *copyright, GameList games, GameIDQueryFunc qf, EngineFactory ef, DetectFunc df)
+ : _name(name), _copyright(copyright), _qf(qf), _ef(ef), _df(df), _games(games) {
//printf("Automatically registered plugin '%s'\n", name);
}
@@ -115,6 +115,7 @@ public:
}
const char *getName() const { return _plugin->_name; }
+ const char *getCopyright() const { return _plugin->_copyright; }
PluginError createInstance(OSystem *syst, Engine **engine) const {
assert(_plugin->_ef);
@@ -144,6 +145,7 @@ class DynamicPlugin : public Plugin {
Common::String _filename;
Common::String _name;
+ Common::String _copyright;
GameIDQueryFunc _qf;
EngineFactory _ef;
DetectFunc _df;
@@ -156,6 +158,7 @@ public:
: _dlHandle(0), _filename(filename), _qf(0), _ef(0), _df(0), _games() {}
const char *getName() const { return _name.c_str(); }
+ const char *getCopyright() const { return _copyright.c_str(); }
PluginError createInstance(OSystem *syst, Engine **engine) const {
assert(_ef);
@@ -226,6 +229,14 @@ bool DynamicPlugin::loadPlugin() {
}
_name = nameFunc();
+ // Query the plugin's copyright
+ nameFunc = (NameFunc)findSymbol("PLUGIN_copyright");
+ if (!nameFunc) {
+ unloadPlugin();
+ return false;
+ }
+ _copyright = nameFunc();
+
// Query the plugin for the game ids it supports
GameIDListFunc gameListFunc = (GameIDListFunc)findSymbol("PLUGIN_gameIDList");
if (!gameListFunc) {
@@ -316,7 +327,7 @@ void PluginManager::loadPlugins() {
}
for (FSList::const_iterator i = files.begin(); i != files.end(); ++i) {
- Common::String name(i->displayName());
+ Common::String name(i->name());
if (name.hasPrefix(PLUGIN_PREFIX) && name.hasSuffix(PLUGIN_SUFFIX)) {
tryLoadPlugin(new DynamicPlugin(i->path()));
}
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
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp
index c4b6f59ca1..0ba9f7c122 100644
--- a/engines/agi/agi.cpp
+++ b/engines/agi/agi.cpp
@@ -640,4 +640,4 @@ PluginError Engine_AGI_create(OSystem *syst, Engine **engine) {
return kNoError;
}
-REGISTER_PLUGIN(AGI, "AGI Engine");
+REGISTER_PLUGIN(AGI, "AGI Engine", "TODO (C) TODO");
diff --git a/engines/cine/cine.cpp b/engines/cine/cine.cpp
index 57f16e7002..6223c64398 100644
--- a/engines/cine/cine.cpp
+++ b/engines/cine/cine.cpp
@@ -117,7 +117,7 @@ PluginError Engine_CINE_create(OSystem *syst, Engine **engine) {
return kNoError;
}
-REGISTER_PLUGIN(CINE, "CINE Engine");
+REGISTER_PLUGIN(CINE, "CINE Engine", "TODO (C) TODO");
namespace Cine {
diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp
index 6d5841502b..e6016b1442 100644
--- a/engines/gob/gob.cpp
+++ b/engines/gob/gob.cpp
@@ -419,4 +419,4 @@ PluginError Engine_GOB_create(OSystem *syst, Engine **engine) {
return kNoError;
}
-REGISTER_PLUGIN(GOB, "Gob Engine");
+REGISTER_PLUGIN(GOB, "Gob Engine", "Goblins Games (C) Coktel Vision");
diff --git a/engines/kyra/plugin.cpp b/engines/kyra/plugin.cpp
index 9ffcd08209..d9908c396e 100644
--- a/engines/kyra/plugin.cpp
+++ b/engines/kyra/plugin.cpp
@@ -255,7 +255,7 @@ PluginError Engine_KYRA_create(OSystem *syst, Engine **engine) {
return kNoError;
}
-REGISTER_PLUGIN(KYRA, "Legend of Kyrandia Engine");
+REGISTER_PLUGIN(KYRA, "Legend of Kyrandia Engine", "The Legend of Kyrandia (C) Westwood Studios");
#pragma mark -
diff --git a/engines/lure/lure.cpp b/engines/lure/lure.cpp
index 2d0f69ecdd..1605a4e7aa 100644
--- a/engines/lure/lure.cpp
+++ b/engines/lure/lure.cpp
@@ -159,7 +159,7 @@ PluginError Engine_LURE_create(OSystem *syst, Engine **engine) {
return kNoError;
}
-REGISTER_PLUGIN(LURE, "Lure of the Temptress Engine");
+REGISTER_PLUGIN(LURE, "Lure of the Temptress Engine", "Lure of the Temptress (C) Revolution");
namespace Lure {
diff --git a/engines/queen/queen.cpp b/engines/queen/queen.cpp
index fd46351370..df854bf5fe 100644
--- a/engines/queen/queen.cpp
+++ b/engines/queen/queen.cpp
@@ -130,7 +130,7 @@ PluginError Engine_QUEEN_create(OSystem *syst, Engine **engine) {
return kNoError;
}
-REGISTER_PLUGIN(QUEEN, "Flight of the Amazon Queen");
+REGISTER_PLUGIN(QUEEN, "Flight of the Amazon Queen", "Flight of the Amazon Queen (C) John Passfield and Steve Stamatiadis");
namespace Queen {
diff --git a/engines/saga/game.cpp b/engines/saga/game.cpp
index 2b66e42bf5..a1bdda6b57 100644
--- a/engines/saga/game.cpp
+++ b/engines/saga/game.cpp
@@ -82,7 +82,7 @@ PluginError Engine_SAGA_create(OSystem *syst, Engine **engine) {
return kNoError;
}
-REGISTER_PLUGIN(SAGA, "SAGA Engine");
+REGISTER_PLUGIN(SAGA, "SAGA Engine", "Inherit the Earth (C) Wyrmkeep Entertainment");
namespace Saga {
#include "sagagame.cpp"
diff --git a/engines/scumm/plugin.cpp b/engines/scumm/plugin.cpp
index fa469517ae..df8312b603 100644
--- a/engines/scumm/plugin.cpp
+++ b/engines/scumm/plugin.cpp
@@ -1508,7 +1508,9 @@ PluginError Engine_SCUMM_create(OSystem *syst, Engine **engine) {
return kNoError;
}
-REGISTER_PLUGIN(SCUMM, "Scumm Engine");
+REGISTER_PLUGIN(SCUMM, "Scumm Engine",
+ "LucasArts SCUMM Games (C) LucasArts\n"
+ "Humongous SCUMM Games (C) Humongous" );
#ifdef PALMOS_68K
#include "scumm_globals.h"
diff --git a/engines/simon/game.cpp b/engines/simon/game.cpp
index 75d31c90d2..5cde35c824 100644
--- a/engines/simon/game.cpp
+++ b/engines/simon/game.cpp
@@ -135,7 +135,7 @@ PluginError Engine_SIMON_create(OSystem *syst, Engine **engine) {
return kNoError;
}
-REGISTER_PLUGIN(SIMON, "Simon the Sorcerer");
+REGISTER_PLUGIN(SIMON, "Simon the Sorcerer", "Simon the Sorcerer (C) Adventure Soft");
namespace Simon {
diff --git a/engines/sky/sky.cpp b/engines/sky/sky.cpp
index c04af74794..48b3b1515b 100644
--- a/engines/sky/sky.cpp
+++ b/engines/sky/sky.cpp
@@ -115,7 +115,7 @@ PluginError Engine_SKY_create(OSystem *syst, Engine **engine) {
return kNoError;
}
-REGISTER_PLUGIN(SKY, "Beneath a Steel Sky");
+REGISTER_PLUGIN(SKY, "Beneath a Steel Sky", "Beneath a Steel Sky (C) Revolution");
namespace Sky {
diff --git a/engines/sword1/sword1.cpp b/engines/sword1/sword1.cpp
index b20a49fce4..137c9242b2 100644
--- a/engines/sword1/sword1.cpp
+++ b/engines/sword1/sword1.cpp
@@ -125,7 +125,7 @@ PluginError Engine_SWORD1_create(OSystem *syst, Engine **engine) {
return kNoError;
}
-REGISTER_PLUGIN(SWORD1, "Broken Sword");
+REGISTER_PLUGIN(SWORD1, "Broken Sword", "Broken Sword Games (C) Revolution");
namespace Sword1 {
diff --git a/engines/sword2/sword2.cpp b/engines/sword2/sword2.cpp
index 9454b69644..be0f02a407 100644
--- a/engines/sword2/sword2.cpp
+++ b/engines/sword2/sword2.cpp
@@ -116,7 +116,7 @@ PluginError Engine_SWORD2_create(OSystem *syst, Engine **engine) {
return kNoError;
}
-REGISTER_PLUGIN(SWORD2, "Broken Sword 2");
+REGISTER_PLUGIN(SWORD2, "Broken Sword 2", "Broken Sword Games (C) Revolution");
namespace Sword2 {
diff --git a/gui/about.cpp b/gui/about.cpp
index 981a50aef5..55319bdc46 100644
--- a/gui/about.cpp
+++ b/gui/about.cpp
@@ -21,6 +21,7 @@
#include "common/stdafx.h"
#include "base/engine.h"
+#include "base/plugins.h"
#include "base/version.h"
#include "common/system.h"
#include "common/util.h"
@@ -50,21 +51,7 @@ enum {
//
// TODO: Add different font sizes (for bigger headlines)
// TODO: Allow color change in the middle of a line...
-static const char *credits_intro[] = {
-"\\C""Copyright (C) 2002-2006 The ScummVM project",
-"\\C""http://www.scummvm.org",
-"\\C""",
-"\\C""LucasArts SCUMM Games (C) LucasArts",
-"\\C""Humongous SCUMM Games (C) Humongous",
-"\\C""Simon the Sorcerer (C) Adventure Soft",
-"\\C""Beneath a Steel Sky (C) Revolution",
-"\\C""Broken Sword Games (C) Revolution",
-"\\C""Flight of the Amazon Queen (C) John Passfield",
-"\\C""and Steve Stamatiadis",
-"\\C""Inherit the Earth (C) Wyrmkeep Entertainment",
-"\\C""Goblins Games (C) Coktel Vision",
-"\\C""The Legend of Kyrandia (C) Westwood Studios",
-"\\C""",
+static const char *gpl_text[] = {
"\\C""This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.",
"\\C""",
"\\C""This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.",
@@ -116,18 +103,45 @@ AboutDialog::AboutDialog()
date += ')';
_lines.push_back(date);
- Common::String features("\\C\\c2""Supports: ");
+
+ addLine("");
+ addLine("\\C""Copyright (C) 2002-2006 The ScummVM project");
+ addLine("\\C""http://www.scummvm.org");
+ addLine("");
+
+ addLine("\\C\\c1""Features compiled in:");
+ Common::String features("\\C");
features += gScummVMFeatures;
addLine(features.c_str());
_lines.push_back("");
- for (i = 0; i < ARRAYSIZE(credits_intro); i++)
- addLine(credits_intro[i]);
+ addLine("\\C\\c1""Available engines:");
+ const PluginList &plugins = PluginManager::instance().getPlugins();
+ PluginList::const_iterator iter = plugins.begin();
+ for (; iter != plugins.end(); ++iter) {
+ Common::String str;
+ str = "\\C";
+ str += (**iter).getName();
+ addLine(str.c_str());
+
+ str = "\\C\\c2";
+ str += (**iter).getCopyright();
+ addLine(str.c_str());
+
+ //addLine("");
+ }
+
+ _lines.push_back("");
for (i = 0; i < ARRAYSIZE(credits); i++)
addLine(credits[i]);
+ _lines.push_back("");
+
+ for (i = 0; i < ARRAYSIZE(gpl_text); i++)
+ addLine(gpl_text[i]);
+
// Center the dialog
_x = (screenW - _w) / 2;
_y = (screenH - _h) / 2;