[Scummvm-cvs-logs] SF.net SVN: scummvm: [23510] scummvm/trunk/engines/kyra/plugin.cpp
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Thu Jul 20 22:49:53 CEST 2006
Revision: 23510
http://svn.sourceforge.net/scummvm/?rev=23510&view=rev
Author: lordhoto
Date: 2006-07-15 13:09:45 -0700 (Sat, 15 Jul 2006)
Log Message:
-----------
A little cleanup (merges kyra1_games, kyra2_games, kyra3_games into kyra_games)
Modified Paths:
--------------
scummvm/trunk/engines/kyra/plugin.cpp
Modified: scummvm/trunk/engines/kyra/plugin.cpp
===================================================================
--- scummvm/trunk/engines/kyra/plugin.cpp 2006-07-15 20:00:08 UTC (rev 23509)
+++ scummvm/trunk/engines/kyra/plugin.cpp 2006-07-15 20:09:45 UTC (rev 23510)
@@ -53,7 +53,7 @@
};
namespace {
-const GameSettings kyra1_games[] = {
+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,
@@ -80,18 +80,15 @@
"b037c41768b652a040360ffa3556fd2a", "GEMCUT.PAK" },
{ "kyra1", "The Legend of Kyrandia Demo", GI_KYRA1, GF_DEMO | GF_ENGLISH,
"fb722947d94897512b13b50cc84fd648", "DEMO1.WSA" },
- { 0, 0, 0, 0, 0, 0 }
-};
-const GameSettings kyra2_games[] = {
+ // kyra 2 games
{ "kyra2", "The Legend of Kyrandia: The Hand of Fate", GI_KYRA2, GF_ENGLISH, // CD version? Floppy version?
"28cbad1c5bf06b2d3825ae57d760d032", "FATE.PAK" },
- { 0, 0, 0, 0, 0, 0 }
-};
-
-const GameSettings kyra3_games[] = {
+
+ // kyra 3 games
{ "kyra3", "The Legend of Kyrandia: Malcolm's Revenge",
GI_KYRA3, GF_LNGUNK, "3833ff312757b8e6147f464cca0a6587", "ONETIME.PAK" },
+
{ 0, 0, 0, 0, 0, 0 }
};
@@ -125,7 +122,10 @@
return Common::DE_DEU;
} else if (features & GF_SPANISH) {
return Common::ES_ESP;
+ } else if (features & GF_ITALIAN) {
+ return Common::IT_ITA;
}
+
return Common::UNK_LANG;
}
@@ -148,8 +148,6 @@
}
} // End of anonymous namespace
-using namespace Kyra;
-
GameList Engine_KYRA_gameIDList() {
GameList games;
const PlainGameDescriptor *g = kyra_list;
@@ -182,30 +180,13 @@
if (file->isDirectory())
continue;
- // TODO: cleanup
- for (g = kyra1_games; g->gameid; g++) {
+ for (g = kyra_games; g->gameid; g++) {
if (scumm_stricmp(file->displayName().c_str(), g->checkFile) == 0)
isFound = true;
}
if (isFound)
break;
-
- for (g = kyra2_games; g->gameid; g++) {
- if (scumm_stricmp(file->displayName().c_str(), g->checkFile) == 0)
- isFound = true;
- }
-
- if (isFound)
- break;
-
- for (g = kyra3_games; g->gameid; g++) {
- if (scumm_stricmp(file->displayName().c_str(), g->checkFile) == 0)
- isFound = true;
- }
-
- if (isFound)
- break;
}
if (file == fslist.end())
@@ -219,8 +200,7 @@
sprintf(md5str + i * 2, "%02x", (int)md5sum[i]);
}
- // TODO: cleanup
- for (g = kyra1_games; g->gameid; g++) {
+ for (g = kyra_games; g->gameid; g++) {
if (strcmp(g->md5sum, (char *)md5str) == 0) {
DetectedGame dg(*g, convertKyraLang(g->features), convertKyraPlatform(g->features));
dg.updateDesc(getKyraVersion(g->features));
@@ -229,24 +209,6 @@
}
}
- for (g = kyra2_games; g->gameid; g++) {
- if (strcmp(g->md5sum, (char *)md5str) == 0) {
- DetectedGame dg(*g, convertKyraLang(g->features), convertKyraPlatform(g->features));
- dg.updateDesc(getKyraVersion(g->features));
-
- detectedGames.push_back(dg);
- }
- }
-
- for (g = kyra3_games; g->gameid; g++) {
- if (strcmp(g->md5sum, (char *)md5str) == 0) {
- DetectedGame dg(*g, convertKyraLang(g->features), convertKyraPlatform(g->features));
- dg.updateDesc(getKyraVersion(g->features));
-
- detectedGames.push_back(dg);
- }
- }
-
if (detectedGames.empty()) {
printf("Unknown MD5 (%s)! Please report the details (language, platform, etc.) of this game to the ScummVM team\n", md5str);
@@ -306,7 +268,9 @@
_features = 0;
memset(md5str, 0, sizeof(md5str));
- for (g = kyra1_games; g->gameid; g++) {
+ for (g = kyra_games; g->gameid; g++) {
+ if (scumm_stricmp(g->gameid, "kyra1"))
+ continue;
if (!Common::File::exists(g->checkFile))
continue;
More information about the Scummvm-git-logs
mailing list