aboutsummaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
Diffstat (limited to 'base')
-rw-r--r--base/commandLine.cpp18
-rw-r--r--base/game.h1
-rw-r--r--base/main.cpp15
-rw-r--r--base/plugins.cpp16
-rw-r--r--base/plugins.h7
-rw-r--r--base/version.cpp3
6 files changed, 27 insertions, 33 deletions
diff --git a/base/commandLine.cpp b/base/commandLine.cpp
index b2cde4f7d9..20b6dfd053 100644
--- a/base/commandLine.cpp
+++ b/base/commandLine.cpp
@@ -23,8 +23,6 @@
*
*/
-#include "common/stdafx.h"
-
#include "engines/engine.h"
#include "base/commandLine.h"
#include "base/plugins.h"
@@ -297,7 +295,7 @@ void registerDefaults() {
Common::String parseCommandLine(Common::StringMap &settings, int argc, char **argv) {
const char *s, *s2;
-
+
// argv[0] contains the name of the executable.
if (argv && argv[0]) {
s = strrchr(argv[0], '/');
@@ -310,7 +308,7 @@ Common::String parseCommandLine(Common::StringMap &settings, int argc, char **ar
for (int i = 1; i < argc; ++i) {
s = argv[i];
s2 = (i < argc-1) ? argv[i+1] : 0;
-
+
if (s[0] != '-') {
// The argument doesn't start with a dash, so it's not an option.
// Hence it must be the target name. We currently enforce that
@@ -559,7 +557,7 @@ static void runDetectorTest() {
// engines. Basically, it loops over all targets, and calls the detector
// for the given path. It then prints out the result and also checks
// whether the result agrees with the settings of the target.
-
+
const Common::ConfigManager::DomainMap &domains = ConfMan.getGameDomains();
Common::ConfigManager::DomainMap::const_iterator iter = domains.begin();
int success = 0, failure = 0;
@@ -576,7 +574,7 @@ static void runDetectorTest() {
if (gameid.empty()) {
gameid = name;
}
-
+
FilesystemNode dir(path);
FSList files;
if (!dir.getChildren(files, FilesystemNode::kListAll)) {
@@ -590,7 +588,7 @@ static void runDetectorTest() {
for (x = candidates.begin(); x != candidates.end(); ++x) {
gameidDiffers |= (scumm_stricmp(gameid.c_str(), x->gameid().c_str()) != 0);
}
-
+
if (candidates.empty()) {
printf(" FAILURE: No games detected\n");
failure++;
@@ -608,7 +606,7 @@ static void runDetectorTest() {
printf(" SUCCESS: Game was detected correctly\n");
success++;
}
-
+
for (x = candidates.begin(); x != candidates.end(); ++x) {
printf(" gameid '%s', desc '%s', language '%s', platform '%s'\n",
x->gameid().c_str(),
@@ -680,7 +678,7 @@ bool processSettings(Common::String &command, Common::StringMap &settings) {
usage("Unrecognized game target '%s'", command.c_str());
}
}
-
+
// The user can override the savepath with the SCUMMVM_SAVEPATH
// environment variable. This is weaker than a --savepath on the
@@ -711,7 +709,7 @@ bool processSettings(Common::String &command, Common::StringMap &settings) {
for (Common::String::iterator c = key.begin(); c != key.end(); ++c)
if (*c == '-')
*c = '_';
-
+
// Store it into ConfMan.
ConfMan.set(key, value, Common::ConfigManager::kTransientDomain);
}
diff --git a/base/game.h b/base/game.h
index ab52601752..0764b7fbac 100644
--- a/base/game.h
+++ b/base/game.h
@@ -26,7 +26,6 @@
#ifndef BASE_GAME_H
#define BASE_GAME_H
-#include "common/stdafx.h"
#include "common/str.h"
#include "common/array.h"
#include "common/hash-str.h"
diff --git a/base/main.cpp b/base/main.cpp
index 7a90c15ec6..8030866e3d 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -31,7 +31,6 @@
* of almost all the classes, methods and variables, and how they interact.
*/
-#include "common/stdafx.h"
#include "engines/engine.h"
#include "base/commandLine.h"
#include "base/plugins.h"
@@ -99,9 +98,9 @@ static const Plugin *detectPlugin() {
return 0;
}
- // FIXME: Do we really need this one?
+ // FIXME: Do we really need this one?
printf("Trying to start game '%s'\n", game.description().c_str());
-
+
return plugin;
}
@@ -119,7 +118,7 @@ static int runGame(const Plugin *plugin, OSystem &system, const Common::String &
}
// We add the game "path" to the file search path via File::addDefaultDirectory(),
- // so that MD5-based detection will be able to properly find files with mixed case
+ // so that MD5-based detection will be able to properly find files with mixed case
// filenames.
// FIXME/TODO: Fingolfin still doesn't like this; if those MD5-based detectors used
// FSNodes instead of File::open, they wouldn't have to do this.
@@ -238,7 +237,7 @@ extern "C" int scummvm_main(int argc, char *argv[]) {
// Verify that the backend has been initialized (i.e. g_system has been set).
assert(g_system);
OSystem &system = *g_system;
-
+
// Register config manager defaults
Base::registerDefaults();
@@ -259,7 +258,7 @@ extern "C" int scummvm_main(int argc, char *argv[]) {
// Load and setup the debuglevel and the debug flags. We do this at the
- // soonest possible moment to ensure debug output starts early on, if
+ // soonest possible moment to ensure debug output starts early on, if
// requested.
if (settings.contains("debuglevel")) {
gDebugLevel = (int)strtol(settings["debuglevel"].c_str(), 0, 10);
@@ -275,7 +274,7 @@ extern "C" int scummvm_main(int argc, char *argv[]) {
// Load the plugins.
PluginManager::instance().loadPlugins();
-
+
// Process the remaining command line settings. Must be done after the
// config file and the plugins have been loaded.
if (!Base::processSettings(command, settings))
@@ -318,7 +317,7 @@ extern "C" int scummvm_main(int argc, char *argv[]) {
// Discard any command line options. It's unlikely that the user
// wanted to apply them to *all* games ever launched.
ConfMan.getDomain(Common::ConfigManager::kTransientDomain)->clear();
-
+
// Clear the active config domain
ConfMan.setActiveDomain("");
diff --git a/base/plugins.cpp b/base/plugins.cpp
index 84f1d22501..836ea14c41 100644
--- a/base/plugins.cpp
+++ b/base/plugins.cpp
@@ -35,7 +35,7 @@ public:
: _plugin(plugin) {
assert(_plugin);
}
-
+
~StaticPlugin() {
delete _plugin;
}
@@ -68,24 +68,24 @@ class StaticPluginProvider : public PluginProvider {
public:
StaticPluginProvider() {
}
-
+
~StaticPluginProvider() {
}
virtual PluginList getPlugins() {
PluginList pl;
-
+
#define LINK_PLUGIN(ID) \
extern PluginRegistrator *g_##ID##_PluginReg; \
extern void g_##ID##_PluginReg_alloc(); \
g_##ID##_PluginReg_alloc(); \
plugin = g_##ID##_PluginReg; \
pl.push_back(new StaticPlugin(plugin));
-
+
// "Loader" for the static plugins.
// Iterate over all registered (static) plugins and load them.
PluginRegistrator *plugin;
-
+
#ifndef DISABLE_SCUMM
LINK_PLUGIN(SCUMM)
#endif
@@ -157,7 +157,7 @@ PluginManager::PluginManager() {
PluginManager::~PluginManager() {
// Explicitly unload all loaded plugins
unloadPlugins();
-
+
// Delete the plugin providers
for (ProviderList::iterator pp = _providers.begin();
pp != _providers.end();
@@ -208,7 +208,7 @@ bool PluginManager::tryLoadPlugin(Plugin *plugin) {
if (plugin->loadPlugin()) {
// If successful, add it to the list of known plugins and return.
_plugins.push_back(plugin);
-
+
// TODO/FIXME: We should perform some additional checks here:
// * Check for some kind of "API version" (possibly derived from the
// SVN tree revision?)
@@ -216,7 +216,7 @@ bool PluginManager::tryLoadPlugin(Plugin *plugin) {
// To detect this situation, we could just compare the plugin name.
// To handle it, simply prefer modules loaded earlier to those coming.
// Or vice versa... to be determined... :-)
-
+
return true;
} else {
// Failed to load the plugin
diff --git a/base/plugins.h b/base/plugins.h
index 2ac87882af..c89b590a73 100644
--- a/base/plugins.h
+++ b/base/plugins.h
@@ -26,7 +26,6 @@
#ifndef BASE_PLUGINS_H
#define BASE_PLUGINS_H
-#include "common/stdafx.h"
#include "common/array.h"
#include "common/list.h"
#include "common/singleton.h"
@@ -46,7 +45,7 @@ enum PluginError {
kInvalidPathError,
kNoGameDataFoundError,
kUnsupportedGameidError,
-
+
kUnknownError // Catch-all error, used if no other error code matches
};
@@ -158,7 +157,7 @@ typedef Common::Array<Plugin *> PluginList;
class PluginProvider {
public:
virtual ~PluginProvider() {}
-
+
/**
* Return a list of Plugin objects. The caller is responsible for actually
* loading/unloading them (by invoking the appropriate methods).
@@ -189,7 +188,7 @@ private:
public:
~PluginManager();
-
+
void addPluginProvider(PluginProvider *pp);
void loadPlugins();
diff --git a/base/version.cpp b/base/version.cpp
index b41ec00ea0..8de96d0b78 100644
--- a/base/version.cpp
+++ b/base/version.cpp
@@ -23,7 +23,6 @@
*
*/
-#include "common/stdafx.h"
#include "common/scummsys.h"
#include "base/internal_version.h"
#include "base/version.h"
@@ -69,7 +68,7 @@ const char *gScummVMFeatures = ""
"Vorbis "
#endif
#endif
-
+
#ifdef USE_FLAC
"FLAC "
#endif