[Scummvm-cvs-logs] SF.net SVN: scummvm: [21686] scummvm/trunk/engines/gob
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Sat Apr 8 04:22:13 CEST 2006
Revision: 21686
Author: fingolfin
Date: 2006-04-08 04:21:04 -0700 (Sat, 08 Apr 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=21686&view=rev
Log Message:
-----------
Renamed various *GameSettings to GameSettings (our namespaces are enough to distinguish them)
Modified Paths:
--------------
scummvm/trunk/engines/cine/cine.cpp
scummvm/trunk/engines/gob/gob.cpp
scummvm/trunk/engines/kyra/kyra.cpp
scummvm/trunk/engines/lure/lure.cpp
scummvm/trunk/engines/sword2/sword2.cpp
Modified: scummvm/trunk/engines/cine/cine.cpp
===================================================================
--- scummvm/trunk/engines/cine/cine.cpp 2006-04-08 08:43:28 UTC (rev 21685)
+++ scummvm/trunk/engines/cine/cine.cpp 2006-04-08 11:21:04 UTC (rev 21686)
@@ -57,7 +57,7 @@
-struct CINEGameSettings {
+struct GameSettings {
const char *name;
const char *description;
byte id;
@@ -68,7 +68,7 @@
}
};
-static const CINEGameSettings cine_settings[] = {
+static const GameSettings cine_settings[] = {
{"fw", "Future Wars", Cine::GID_FW, MDT_ADLIB, "AUTO00.PRC"},
{"os", "Operation Stealth", Cine::GID_OS, MDT_ADLIB, "PROCS00"},
{NULL, NULL, 0, 0, NULL}
@@ -76,7 +76,7 @@
GameList Engine_CINE_gameIDList() {
GameList games;
- const CINEGameSettings *g = cine_settings;
+ const GameSettings *g = cine_settings;
while (g->name) {
games.push_back(g->toGameDescriptor());
@@ -87,7 +87,7 @@
}
GameDescriptor Engine_CINE_findGameID(const char *gameid) {
- const CINEGameSettings *g = cine_settings;
+ const GameSettings *g = cine_settings;
while (g->name) {
if (0 == scumm_stricmp(gameid, g->name))
break;
@@ -98,7 +98,7 @@
DetectedGameList Engine_CINE_detectGames(const FSList &fslist) {
DetectedGameList detectedGames;
- const CINEGameSettings *g;
+ const GameSettings *g;
for (g = cine_settings; g->name; ++g) {
// Iterate over all files in the given directory
@@ -134,7 +134,7 @@
_mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume"));
_mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume"));
- const CINEGameSettings *g;
+ const GameSettings *g;
for (g = cine_settings; g->name; ++g)
if (!scumm_stricmp(g->name, detector->_targetName.c_str()))
Modified: scummvm/trunk/engines/gob/gob.cpp
===================================================================
--- scummvm/trunk/engines/gob/gob.cpp 2006-04-08 08:43:28 UTC (rev 21685)
+++ scummvm/trunk/engines/gob/gob.cpp 2006-04-08 11:21:04 UTC (rev 21686)
@@ -55,14 +55,14 @@
kMD5FileSizeLimit = 1024 * 1024
};
-struct GobGameSettings {
+struct GameSettings {
const char *gameid;
const char *description;
uint32 features;
const char *md5sum;
};
-static const GobGameSettings gob_games[] = {
+static const GameSettings gob_games[] = {
// Supplied by Florian Zeitz on scummvm-devel
{"gob1", "Gobliiins (DOS EGA)", GF_GOB1 | GF_EGA, "82aea70ef26f41fa963dfae270993e49"},
{"gob1", "Gobliiins (DOS EGA)", GF_GOB1 | GF_EGA, "1f499458837008058b8ba6ae07057214"},
@@ -297,7 +297,7 @@
DetectedGameList Engine_GOB_detectGames(const FSList &fslist) {
DetectedGameList detectedGames;
- const GobGameSettings *g;
+ const GameSettings *g;
FSList::const_iterator file;
// Iterate over all files in the given directory
@@ -351,7 +351,7 @@
error("Engine_GOB_create(): Cannot find intro.stk");
}
- const GobGameSettings *g;
+ const GameSettings *g;
bool found = false;
// TODO
Modified: scummvm/trunk/engines/kyra/kyra.cpp
===================================================================
--- scummvm/trunk/engines/kyra/kyra.cpp 2006-04-08 08:43:28 UTC (rev 21685)
+++ scummvm/trunk/engines/kyra/kyra.cpp 2006-04-08 11:21:04 UTC (rev 21686)
@@ -50,7 +50,7 @@
#include "kyra/text.h"
#include "kyra/debugger.h"
-using namespace Kyra;
+namespace Kyra {
enum {
// We only compute MD5 of the first megabyte of our data files.
@@ -58,7 +58,7 @@
};
// Kyra MD5 detection brutally ripped from the Gobliins engine.
-struct KyraGameSettings {
+struct GameSettings {
const char *gameid;
const char *description;
byte id;
@@ -69,7 +69,7 @@
// We could get rid of md5 detection at least for kyra 1 since we can locate all
// needed files for detecting the right language and version (Floppy, Talkie)
-static const KyraGameSettings kyra_games[] = {
+static const GameSettings kyra_games[] = {
{ "kyra1", "The Legend of Kyrandia", GI_KYRA1, GF_ENGLISH | GF_FLOPPY, // english floppy 1.0 from Malice
"3c244298395520bb62b5edfe41688879", "GEMCUT.EMC" },
{ "kyra1", "The Legend of Kyrandia", GI_KYRA1, GF_ENGLISH | GF_FLOPPY,
@@ -118,6 +118,10 @@
{ 0, 0, Common::UNK_LANG }
};
+} // End of namespace Kyra
+
+using namespace Kyra;
+
static Common::Language convertKyraLang(uint32 features) {
if (features & GF_ENGLISH) {
return Common::EN_USA;
@@ -154,7 +158,7 @@
DetectedGameList Engine_KYRA_detectGames(const FSList &fslist) {
DetectedGameList detectedGames;
- const KyraGameSettings *g;
+ const GameSettings *g;
FSList::const_iterator file;
// Iterate over all files in the given directory
@@ -264,7 +268,7 @@
uint8 md5sum[16];
char md5str[32 + 1];
- const KyraGameSettings *g;
+ const GameSettings *g;
bool found = false;
// TODO
@@ -1266,4 +1270,5 @@
_scriptInterpreter->runScript(_npcScript);
}
}
+
} // End of namespace Kyra
Modified: scummvm/trunk/engines/lure/lure.cpp
===================================================================
--- scummvm/trunk/engines/lure/lure.cpp 2006-04-08 08:43:28 UTC (rev 21685)
+++ scummvm/trunk/engines/lure/lure.cpp 2006-04-08 11:21:04 UTC (rev 21686)
@@ -44,14 +44,14 @@
#include "lure/game.h"
#include "lure/system.h"
-using namespace Lure;
+namespace Lure {
enum {
// We only compute MD5 of the first megabyte of our data files.
kMD5FileSizeLimit = 1024 * 1024
};
-struct LureGameSettings {
+struct GameSettings {
const char *gameid;
const char *description;
byte id;
@@ -62,7 +62,7 @@
};
//
-static const LureGameSettings lure_games[] = {
+static const GameSettings lure_games[] = {
{ "lure", "Lure of the Temptress", GI_LURE, GF_FLOPPY, Common::EN_USA,
"e45ea5d279a268c7d3c6524c2f63a2d2", "disk1.vga" },
/*
@@ -81,6 +81,10 @@
{ 0, 0 }
};
+} // End of namespace Lure
+
+using namespace Lure;
+
GameList Engine_LURE_gameIDList() {
GameList games;
const PlainGameDescriptor *g = lure_list;
@@ -104,7 +108,7 @@
DetectedGameList Engine_LURE_detectGames(const FSList &fslist) {
DetectedGameList detectedGames;
- const LureGameSettings *g;
+ const GameSettings *g;
FSList::const_iterator file;
// Iterate over all files in the given directory
@@ -213,7 +217,7 @@
uint8 md5sum[16];
char md5str[32 + 1];
- const LureGameSettings *g;
+ const GameSettings *g;
bool found = false;
*md5str = 0;
Modified: scummvm/trunk/engines/sword2/sword2.cpp
===================================================================
--- scummvm/trunk/engines/sword2/sword2.cpp 2006-04-08 08:43:28 UTC (rev 21685)
+++ scummvm/trunk/engines/sword2/sword2.cpp 2006-04-08 11:21:04 UTC (rev 21686)
@@ -48,14 +48,16 @@
extern bool isSmartphone();
#endif
-struct Sword2GameSettings {
+namespace Sword2 {
+
+struct GameSettings {
const char *gameid;
const char *description;
uint32 features;
const char *detectname;
};
-static const Sword2GameSettings sword2_settings[] = {
+static const GameSettings sword2_settings[] = {
/* Broken Sword 2 */
{"sword2", "Broken Sword 2: The Smoking Mirror", 0, "players.clu" },
{"sword2alt", "Broken Sword 2: The Smoking Mirror (alt)", 0, "r2ctlns.ocx" },
@@ -63,8 +65,10 @@
{NULL, NULL, 0, NULL}
};
+} // End of namespace Sword2
+
GameList Engine_SWORD2_gameIDList() {
- const Sword2GameSettings *g = sword2_settings;
+ const Sword2::GameSettings *g = Sword2::sword2_settings;
GameList games;
while (g->gameid) {
games.push_back(*g);
@@ -74,7 +78,7 @@
}
GameDescriptor Engine_SWORD2_findGameID(const char *gameid) {
- const Sword2GameSettings *g = sword2_settings;
+ const Sword2::GameSettings *g = Sword2::sword2_settings;
while (g->gameid) {
if (0 == scumm_stricmp(gameid, g->gameid))
break;
@@ -85,13 +89,13 @@
DetectedGameList Engine_SWORD2_detectGames(const FSList &fslist) {
DetectedGameList detectedGames;
- const Sword2GameSettings *g;
+ const Sword2::GameSettings *g;
// TODO: It would be nice if we had code here which distinguishes
// between the 'sword2' and 'sword2demo' targets. The current code
// can't do that since they use the same detectname.
- for (g = sword2_settings; g->gameid; ++g) {
+ for (g = Sword2::sword2_settings; g->gameid; ++g) {
// Iterate over all files in the given directory
for (FSList::const_iterator file = fslist.begin(); file != fslist.end(); ++file) {
if (!file->isDirectory()) {
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