[Scummvm-cvs-logs] CVS: scummvm/base engine.cpp,1.7,1.8 gameDetector.cpp,1.48,1.49 gameDetector.h,1.19,1.20 main.cpp,1.24,1.25 plugins.cpp,1.21,1.22
Pawel Kolodziejski
aquadran at users.sourceforge.net
Sat Nov 8 14:07:10 CET 2003
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm charset.cpp,2.68,2.69 debugger.cpp,1.97,1.98 dialogs.cpp,1.83,1.84 gfx.cpp,2.230,2.231 imuse.cpp,2.110,2.111 imuse_digi.cpp,1.53,1.54 imuse_internal.h,2.32,2.33 imuse_player.cpp,2.37,2.38 intern.h,2.116,2.117 midiparser_eup.cpp,1.10,1.11 nut_renderer.cpp,1.35,1.36 object.cpp,1.146,1.147 player_mod.h,2.8,2.9 player_v1.cpp,1.14,1.15 player_v2.cpp,2.40,2.41 player_v2.h,2.21,2.22 player_v2a.cpp,2.13,2.14 player_v2a.h,2.6,2.7 player_v3a.cpp,1.15,1.16 player_v3a.h,1.14,1.15 resource.cpp,1.171,1.172 script_v2.cpp,2.209,2.210 scummvm.cpp,2.470,2.471 sound.cpp,1.268,1.269 string.cpp,1.164,1.165
- Next message: [Scummvm-cvs-logs] CVS: scummvm/common config-manager.cpp,1.11,1.12 map.h,1.19,1.20 rect.h,1.14,1.15 savefile.cpp,1.4,1.5 scaler.cpp,1.52,1.53 scaler.h,1.20,1.21 scummsys.h,1.39,1.40 str.cpp,1.26,1.27 str.h,1.17,1.18 system.h,1.47,1.48 timer.cpp,1.23,1.24 timer.h,1.14,1.15 util.cpp,1.24,1.25 util.h,1.30,1.31
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/base
In directory sc8-pr-cvs1:/tmp/cvs-serv24397
Modified Files:
engine.cpp gameDetector.cpp gameDetector.h main.cpp
plugins.cpp
Log Message:
cleanup whitespaces
Index: engine.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/base/engine.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- engine.cpp 12 Oct 2003 13:03:34 -0000 1.7
+++ engine.cpp 8 Nov 2003 22:05:58 -0000 1.8
@@ -38,7 +38,7 @@
_mixer = detector->createMixer();
_timer = g_timer;
-
+
// Set default file directory
File::setDefaultDirectory(_gameDataPath);
}
@@ -121,7 +121,7 @@
// Finally exit. quit() will terminate the program if g_system iss present
if (g_system)
g_system->quit();
-
+
exit(1);
}
Index: gameDetector.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/base/gameDetector.cpp,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- gameDetector.cpp 7 Nov 2003 02:31:44 -0000 1.48
+++ gameDetector.cpp 8 Nov 2003 22:05:58 -0000 1.49
@@ -225,7 +225,7 @@
// Find the GameSettings for this target
const PluginList &plugins = PluginManager::instance().getPlugins();
GameSettings result = {NULL, NULL, MDT_NONE, 0, NULL};
-
+
PluginList::ConstIterator iter = plugins.begin();
for (iter = plugins.begin(); iter != plugins.end(); ++iter) {
result = (*iter)->findGame(gameName.c_str());
@@ -238,7 +238,6 @@
return result;
}
-
//
// Various macros used by the command line parser.
//
@@ -280,7 +279,6 @@
continue; \
}
-
void GameDetector::parseCommandLine(int argc, char **argv) {
int i;
char *s;
@@ -292,7 +290,7 @@
// Iterate over all command line arguments, backwards.
for (i = argc - 1; i >= 1; i--) {
s = argv[i];
-
+
if (s[0] != '-' || s[1] == '\0') {
// Last argument: this could be a target name.
// To verify this, check if there is either a game domain (i.e
@@ -307,12 +305,12 @@
goto ShowHelpAndExit;
}
} else {
-
+
shortCmdLower = tolower(s[1]);
isLongCmd = (s[0] == '-' && s[1] == '-');
cmdValue = (shortCmdLower == s[1]);
s += 2;
-
+
DO_OPTION('b', "boot-param")
ConfMan.set("boot_param", (int)strtol(option, 0, 10));
END_OPTION
@@ -335,11 +333,11 @@
goto ShowHelpAndExit;
ConfMan.set("music_driver", option);
END_OPTION
-
+
DO_OPTION_BOOL('f', "fullscreen")
ConfMan.set("fullscreen", cmdValue);
END_OPTION
-
+
DO_OPTION('g', "gfx-mode")
int gfx_mode = parseGraphicsMode(option);
// TODO: Instead of just showing the generic help text,
@@ -350,90 +348,90 @@
goto ShowHelpAndExit;
ConfMan.set("gfx_mode", option);
END_OPTION
-
+
DO_OPTION_CMD('h', "help")
printf(USAGE_STRING);
exit(0);
END_OPTION
-
+
DO_OPTION('m', "music-volume")
ConfMan.set("music_volume", (int)strtol(option, 0, 10));
END_OPTION
-
+
DO_OPTION_BOOL('n', "nosubtitles")
ConfMan.set("nosubtitles", cmdValue);
END_OPTION
-
+
DO_OPTION('o', "master-volume")
ConfMan.set("master_volume", (int)strtol(option, 0, 10));
END_OPTION
-
+
DO_OPTION('p', "path")
// TODO: Verify whether the path is valid
ConfMan.set("path", option);
END_OPTION
-
+
DO_OPTION('q', "language")
if (Common::parseLanguage(option) == Common::UNK_LANG)
goto ShowHelpAndExit;
ConfMan.set("language", option);
END_OPTION
-
+
DO_OPTION('s', "sfx-volume")
ConfMan.set("sfx_volume", (int)strtol(option, 0, 10));
END_OPTION
-
+
DO_OPTION_CMD('t', "list-targets")
listTargets();
exit(0);
END_OPTION
-
+
DO_OPTION_BOOL('u', "dump-scripts")
_dumpScripts = true;
END_OPTION
-
+
DO_OPTION_CMD('v', "version")
printf("%s\n", gScummVMFullVersion);
exit(0);
END_OPTION
-
+
DO_OPTION('x', "save-slot")
ConfMan.set("save_slot", (option != NULL) ? (int)strtol(option, 0, 10) : 0);
END_OPTION
-
+
DO_OPTION_CMD('z', "list-games")
listGames();
exit(0);
END_OPTION
-
+
DO_LONG_OPTION("cdrom")
ConfMan.set("cdrom", (int)strtol(option, 0, 10));
END_OPTION
-
+
DO_LONG_OPTION_OPT("joystick")
ConfMan.set("joystick_num", (option != NULL) ? (int)strtol(option, 0, 10) : 0);
END_OPTION
-
+
DO_LONG_OPTION("platform")
int platform = Common::parsePlatform(option);
if (platform == Common::kPlatformUnknown)
goto ShowHelpAndExit;
-
+
ConfMan.set("platform", platform);
END_OPTION
-
+
DO_LONG_OPTION_BOOL("multi-midi")
ConfMan.set("multi_midi", cmdValue);
END_OPTION
-
+
DO_LONG_OPTION_BOOL("native-mt32")
ConfMan.set("native_mt32", cmdValue);
END_OPTION
-
+
DO_LONG_OPTION_BOOL("aspect-ratio")
ConfMan.set("aspect_ratio", cmdValue);
END_OPTION
-
+
#ifndef DISABLE_SCUMM
DO_LONG_OPTION("tempo")
// Use the special value '0' for the base in (int)strtol.
@@ -441,7 +439,7 @@
// as "0x1234", but also decimal values ("123").
ConfMan.set("tempo", (int)strtol(option, 0, 0));
END_OPTION
-
+
DO_LONG_OPTION("talkspeed")
ConfMan.set("talkspeed", (int)strtol(option, 0, 10));
END_OPTION
@@ -450,18 +448,18 @@
ConfMan.set("demo_mode", cmdValue);
END_OPTION
#endif
-
+
#ifndef DISABLE_SKY
DO_LONG_OPTION_BOOL("floppy-intro")
ConfMan.set("floppy_intro", cmdValue);
END_OPTION
#endif
-
+
// If we get till here, the option is unhandled and hence unknown.
goto ShowHelpAndExit;
}
}
-
+
if (current_option) {
ShowHelpAndExit:
printf(USAGE_STRING);
@@ -498,9 +496,9 @@
else
realGame = _targetName;
printf("Looking for %s\n", realGame.c_str());
-
+
_game = findGame(realGame, &_plugin);
-
+
if (_game.gameName) {
printf("Trying to start game '%s'\n", _game.description);
return true;
@@ -534,7 +532,7 @@
// whether a sequencer is available, and use it instead.
musicDriver = MD_ADLIB;
#else
- musicDriver = MD_NULL;
+ musicDriver = MD_NULL;
#endif
} else
musicDriver = MD_ADLIB;
Index: gameDetector.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/base/gameDetector.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- gameDetector.h 2 Nov 2003 02:18:12 -0000 1.19
+++ gameDetector.h 8 Nov 2003 22:05:58 -0000 1.20
@@ -79,7 +79,7 @@
static int parseGraphicsMode(const String &s); // Used in main()
static int detectMusicDriver(int midiFlags);
-
+
static GameSettings findGame(const String &gameName, const Plugin **plugin = NULL);
protected:
Index: main.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/base/main.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- main.cpp 7 Nov 2003 14:17:34 -0000 1.24
+++ main.cpp 8 Nov 2003 22:05:58 -0000 1.25
@@ -232,7 +232,7 @@
// Update the config file
ConfMan.set("versioninfo", gScummVMVersion, Common::ConfigManager::kApplicationDomain);
-
+
// Load the plugins
PluginManager::instance().loadPlugins();
@@ -242,7 +242,7 @@
// Create the system object
OSystem *system = OSystem::instance();
-
+
// Create the timer services
g_timer = new Timer(system);
@@ -270,7 +270,7 @@
// See if the game should default to 1x scaler
if (!ConfMan.hasKey("gfx_mode", detector._targetName) &&
- (detector._game.features & GF_DEFAULT_TO_1X_SCALER)) {
+ (detector._game.features & GF_DEFAULT_TO_1X_SCALER)) {
prop.gfx_mode = GFX_NORMAL;
system->property(OSystem::PROP_SET_GFX_MODE, &prop);
} else
@@ -279,7 +279,7 @@
prop.gfx_mode = detector.parseGraphicsMode(ConfMan.get("gfx_mode"));
system->property(OSystem::PROP_SET_GFX_MODE, &prop);
}
-
+
// (De)activate fullscreen mode as determined by the config settings
if (ConfMan.getBool("fullscreen") != (system->property(OSystem::PROP_GET_FULLSCREEN, 0) != 0))
system->property(OSystem::PROP_TOGGLE_FULLSCREEN, 0);
Index: plugins.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/base/plugins.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- plugins.cpp 7 Nov 2003 02:31:44 -0000 1.21
+++ plugins.cpp 8 Nov 2003 22:05:58 -0000 1.22
@@ -48,7 +48,6 @@
#pragma mark -
-
GameSettings Plugin::findGame(const char *gameName) const {
// Find the GameSettings for this game
assert(gameName);
@@ -63,10 +62,8 @@
return result;
}
-
#pragma mark -
-
class StaticPlugin : public Plugin {
const char *_name;
EngineFactory _ef;
@@ -89,10 +86,8 @@
}
};
-
#pragma mark -
-
#ifdef DYNAMIC_MODULES
class DynamicPlugin : public Plugin {
@@ -103,13 +98,13 @@
EngineFactory _ef;
DetectFunc _df;
GameList _games;
-
+
void *findSymbol(const char *symbol);
public:
DynamicPlugin(const char *filename)
: _dlHandle(0), _filename(filename), _ef(0), _df(0), _games() {}
-
+
const char *getName() const { return _name.c_str(); }
Engine *createInstance(GameDetector *detector, OSystem *syst) const {
@@ -148,12 +143,12 @@
bool DynamicPlugin::loadPlugin() {
assert(!_dlHandle);
_dlHandle = dlopen(_filename.c_str(), RTLD_LAZY);
-
+
if (!_dlHandle) {
warning("Failed loading plugin '%s' (%s)", _filename.c_str(), dlerror());
return false;
}
-
+
// Query the plugin's name
NameFunc nameFunc = (NameFunc)findSymbol("PLUGIN_name");
if (!nameFunc) {
@@ -161,7 +156,7 @@
return false;
}
_name = nameFunc();
-
+
// Query the plugin for the targets it supports
TargetListFunc gameListFunc = (TargetListFunc)findSymbol("PLUGIN_getSupportedGames");
if (!gameListFunc) {
@@ -169,14 +164,14 @@
return false;
}
_games = gameListFunc();
-
+
// Retrieve the factory function
_ef = (EngineFactory)findSymbol("PLUGIN_createEngine");
if (!_ef) {
unloadPlugin();
return false;
}
-
+
// Retrieve the detector function
_df = (DetectFunc)findSymbol("PLUGIN_detectGames");
if (!_df) {
@@ -197,7 +192,6 @@
#endif // DYNAMIC_MODULES
#pragma mark -
-
PluginManager::PluginManager() {
}
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm charset.cpp,2.68,2.69 debugger.cpp,1.97,1.98 dialogs.cpp,1.83,1.84 gfx.cpp,2.230,2.231 imuse.cpp,2.110,2.111 imuse_digi.cpp,1.53,1.54 imuse_internal.h,2.32,2.33 imuse_player.cpp,2.37,2.38 intern.h,2.116,2.117 midiparser_eup.cpp,1.10,1.11 nut_renderer.cpp,1.35,1.36 object.cpp,1.146,1.147 player_mod.h,2.8,2.9 player_v1.cpp,1.14,1.15 player_v2.cpp,2.40,2.41 player_v2.h,2.21,2.22 player_v2a.cpp,2.13,2.14 player_v2a.h,2.6,2.7 player_v3a.cpp,1.15,1.16 player_v3a.h,1.14,1.15 resource.cpp,1.171,1.172 script_v2.cpp,2.209,2.210 scummvm.cpp,2.470,2.471 sound.cpp,1.268,1.269 string.cpp,1.164,1.165
- Next message: [Scummvm-cvs-logs] CVS: scummvm/common config-manager.cpp,1.11,1.12 map.h,1.19,1.20 rect.h,1.14,1.15 savefile.cpp,1.4,1.5 scaler.cpp,1.52,1.53 scaler.h,1.20,1.21 scummsys.h,1.39,1.40 str.cpp,1.26,1.27 str.h,1.17,1.18 system.h,1.47,1.48 timer.cpp,1.23,1.24 timer.h,1.14,1.15 util.cpp,1.24,1.25 util.h,1.30,1.31
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list