[Scummvm-cvs-logs] SF.net SVN: scummvm: [20747] scummvm/trunk/base
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Fri Feb 17 16:14:01 CET 2006
Revision: 20747
Author: fingolfin
Date: 2006-02-17 16:12:36 -0800 (Fri, 17 Feb 2006)
ViewCVS: http://svn.sourceforge.net/scummvm?rev=20747&view=rev
Log Message:
-----------
- Removed the 'features' field from GameSettings
- Removed GF_DEFAULT_TO_1X_SCALER
Modified Paths:
--------------
scummvm/trunk/base/gameDetector.cpp
scummvm/trunk/base/gameDetector.h
scummvm/trunk/base/plugins.cpp
scummvm/trunk/engines/gob/gob.cpp
scummvm/trunk/engines/kyra/kyra.cpp
scummvm/trunk/engines/lure/lure.cpp
scummvm/trunk/engines/queen/queen.cpp
scummvm/trunk/engines/saga/game.cpp
scummvm/trunk/engines/saga/saga.cpp
scummvm/trunk/engines/saga/saga.h
scummvm/trunk/engines/scumm/scumm.cpp
scummvm/trunk/engines/simon/simon.cpp
scummvm/trunk/engines/simon/simon.h
scummvm/trunk/engines/sky/sky.cpp
scummvm/trunk/engines/sword1/sword1.cpp
scummvm/trunk/engines/sword2/sword2.cpp
Modified: scummvm/trunk/base/gameDetector.cpp
===================================================================
--- scummvm/trunk/base/gameDetector.cpp 2006-02-17 23:41:12 UTC (rev 20746)
+++ scummvm/trunk/base/gameDetector.cpp 2006-02-18 00:12:36 UTC (rev 20747)
@@ -275,7 +275,7 @@
GameSettings GameDetector::findGame(const String &gameName, const Plugin **plugin) {
// Find the GameSettings for this target
const PluginList &plugins = PluginManager::instance().getPlugins();
- GameSettings result = {NULL, NULL, 0};
+ GameSettings result = {NULL, NULL};
PluginList::const_iterator iter = plugins.begin();
for (iter = plugins.begin(); iter != plugins.end(); ++iter) {
Modified: scummvm/trunk/base/gameDetector.h
===================================================================
--- scummvm/trunk/base/gameDetector.h 2006-02-17 23:41:12 UTC (rev 20746)
+++ scummvm/trunk/base/gameDetector.h 2006-02-18 00:12:36 UTC (rev 20747)
@@ -34,17 +34,9 @@
class Mixer;
}
-/** Global (shared) game feature flags. */
-enum {
-// GF_HAS_SPEECH = 1 << 28,
-// GF_HAS_SUBTITLES = 1 << 29,
- GF_DEFAULT_TO_1X_SCALER = 1 << 30
-};
-
struct GameSettings {
const char *gameid;
const char *description; // TODO: Rename this to "title" or so
- uint32 features; // TODO: Probably should get rid of this field
};
/**
@@ -58,7 +50,7 @@
*/
template <class T>
GameSettings toGameSettings(const T &g) {
- GameSettings dummy = { g.gameid, g.description, g.features };
+ GameSettings dummy = { g.gameid, g.description };
return dummy;
}
Modified: scummvm/trunk/base/plugins.cpp
===================================================================
--- scummvm/trunk/base/plugins.cpp 2006-02-17 23:41:12 UTC (rev 20746)
+++ scummvm/trunk/base/plugins.cpp 2006-02-18 00:12:36 UTC (rev 20747)
@@ -74,7 +74,7 @@
// Find the GameSettings for this game
assert(gameName);
GameList games = getSupportedGames();
- GameSettings result = {NULL, NULL, 0};
+ GameSettings result = {NULL, NULL};
for (GameList::iterator g = games.begin(); g != games.end(); ++g) {
if (!scumm_stricmp(g->gameid, gameName)) {
result = *g;
Modified: scummvm/trunk/engines/gob/gob.cpp
===================================================================
--- scummvm/trunk/engines/gob/gob.cpp 2006-02-17 23:41:12 UTC (rev 20746)
+++ scummvm/trunk/engines/gob/gob.cpp 2006-02-18 00:12:36 UTC (rev 20747)
@@ -59,7 +59,7 @@
uint32 features;
const char *md5sum;
GameSettings toGameSettings() const {
- GameSettings dummy = { gameid, description, features };
+ GameSettings dummy = { gameid, description };
return dummy;
}
};
@@ -121,9 +121,9 @@
// Keep list of different supported games
static const GameSettings gob_list[] = {
- {"gob1", "Gobliiins", Gob::GF_GOB1},
- {"gob2", "Gobliins 2", Gob::GF_GOB2},
- {0, 0, 0}
+ {"gob1", "Gobliiins"},
+ {"gob2", "Gobliins 2"},
+ {0, 0}
};
Modified: scummvm/trunk/engines/kyra/kyra.cpp
===================================================================
--- scummvm/trunk/engines/kyra/kyra.cpp 2006-02-17 23:41:12 UTC (rev 20746)
+++ scummvm/trunk/engines/kyra/kyra.cpp 2006-02-18 00:12:36 UTC (rev 20747)
@@ -97,8 +97,8 @@
// Keep list of different supported games
static const GameSettings kyra_list[] = {
- { "kyra1", "The Legend of Kyrandia", 0 },
- { 0, 0, 0 }
+ { "kyra1", "The Legend of Kyrandia" },
+ { 0, 0 }
};
struct KyraLanguageTable {
Modified: scummvm/trunk/engines/lure/lure.cpp
===================================================================
--- scummvm/trunk/engines/lure/lure.cpp 2006-02-17 23:41:12 UTC (rev 20746)
+++ scummvm/trunk/engines/lure/lure.cpp 2006-02-18 00:12:36 UTC (rev 20747)
@@ -69,8 +69,8 @@
// Keep list of different supported games
static const GameSettings lure_list[] = {
- { "lure", "Lure of the Temptress", 0 },
- { 0, 0, 0 }
+ { "lure", "Lure of the Temptress" },
+ { 0, 0 }
};
GameList Engine_LURE_gameList() {
Modified: scummvm/trunk/engines/queen/queen.cpp
===================================================================
--- scummvm/trunk/engines/queen/queen.cpp 2006-02-17 23:41:12 UTC (rev 20746)
+++ scummvm/trunk/engines/queen/queen.cpp 2006-02-18 00:12:36 UTC (rev 20747)
@@ -56,10 +56,10 @@
/* Flight of the Amazon Queen */
static const GameSettings queen_setting[] = {
- { "queen", "Flight of the Amazon Queen", 0 },
- { "queen", "Flight of the Amazon Queen (Demo)", 0 },
- { "queen", "Flight of the Amazon Queen (Interview)", 0 },
- { 0, 0, 0 }
+ { "queen", "Flight of the Amazon Queen" },
+ { "queen", "Flight of the Amazon Queen (Demo)" },
+ { "queen", "Flight of the Amazon Queen (Interview)" },
+ { 0, 0 }
};
GameList Engine_QUEEN_gameList() {
Modified: scummvm/trunk/engines/saga/game.cpp
===================================================================
--- scummvm/trunk/engines/saga/game.cpp 2006-02-17 23:41:12 UTC (rev 20746)
+++ scummvm/trunk/engines/saga/game.cpp 2006-02-18 00:12:36 UTC (rev 20747)
@@ -1417,7 +1417,7 @@
NULL,
0,
NULL,
- GF_DEFAULT_TO_1X_SCALER,
+ 0,
Common::EN_USA,
Common::kPlatformPC,
},
@@ -1440,7 +1440,7 @@
NULL,
0,
NULL,
- GF_DEFAULT_TO_1X_SCALER,
+ 0,
Common::EN_USA,
Common::kPlatformPC,
},
@@ -1463,7 +1463,7 @@
NULL,
0,
NULL,
- GF_DEFAULT_TO_1X_SCALER,
+ 0,
Common::DE_DEU,
Common::kPlatformPC,
},
@@ -1485,7 +1485,7 @@
NULL,
0,
NULL,
- GF_DEFAULT_TO_1X_SCALER,
+ 0,
Common::ES_ESP,
Common::kPlatformPC,
},
@@ -1507,7 +1507,7 @@
NULL,
0,
NULL,
- GF_DEFAULT_TO_1X_SCALER,
+ 0,
Common::RU_RUS,
Common::kPlatformPC,
},
@@ -1529,7 +1529,7 @@
NULL,
0,
NULL,
- GF_DEFAULT_TO_1X_SCALER,
+ 0,
Common::FR_FRA,
Common::kPlatformPC,
},
Modified: scummvm/trunk/engines/saga/saga.cpp
===================================================================
--- scummvm/trunk/engines/saga/saga.cpp 2006-02-17 23:41:12 UTC (rev 20746)
+++ scummvm/trunk/engines/saga/saga.cpp 2006-02-18 00:12:36 UTC (rev 20747)
@@ -57,9 +57,9 @@
#include "saga/resnames.h"
static const GameSettings saga_games[] = {
- {"ite", "Inherit the Earth", 0},
- {"ihnm", "I Have No Mouth and I Must Scream", GF_DEFAULT_TO_1X_SCALER },
- {0, 0, 0}
+ {"ite", "Inherit the Earth"},
+ {"ihnm", "I Have No Mouth and I Must Scream"},
+ {0, 0}
};
GameList Engine_SAGA_gameList() {
Modified: scummvm/trunk/engines/saga/saga.h
===================================================================
--- scummvm/trunk/engines/saga/saga.h 2006-02-17 23:41:12 UTC (rev 20746)
+++ scummvm/trunk/engines/saga/saga.h 2006-02-18 00:12:36 UTC (rev 20747)
@@ -518,7 +518,7 @@
Common::Platform platform;
GameSettings toGameSettings() const {
- GameSettings dummy = { name, title, features };
+ GameSettings dummy = { name, title };
return dummy;
}
};
Modified: scummvm/trunk/engines/scumm/scumm.cpp
===================================================================
--- scummvm/trunk/engines/scumm/scumm.cpp 2006-02-17 23:41:12 UTC (rev 20746)
+++ scummvm/trunk/engines/scumm/scumm.cpp 2006-02-18 00:12:36 UTC (rev 20747)
@@ -194,7 +194,7 @@
Common::Platform platform;
GameSettings toGameSettings() const {
- GameSettings dummy = { gameid, findDescriptionFromGameID(gameid), features };
+ GameSettings dummy = { gameid, findDescriptionFromGameID(gameid) };
return dummy;
}
};
@@ -212,7 +212,7 @@
Common::Platform platform;
GameSettings toGameSettings() const {
- GameSettings dummy = { from, "Obsolete game ID", 0 };
+ GameSettings dummy = { from, "Obsolete game ID" };
return dummy;
}
};
@@ -307,7 +307,7 @@
/* Scumm Version 8 */
{"comi", 0, GID_CMI, 8, 0, MDT_NONE,
- GF_NEW_COSTUMES | GF_NEW_CAMERA | GF_DIGI_IMUSE | GF_DEFAULT_TO_1X_SCALER, Common::kPlatformWindows},
+ GF_NEW_COSTUMES | GF_NEW_CAMERA | GF_DIGI_IMUSE, Common::kPlatformWindows},
#endif
@@ -469,7 +469,7 @@
GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformWindows},
{"8fec68383202d38c0d25e9e3b757c5df", "Demo", GID_CMI, 8, 0, MDT_NONE,
- GF_NEW_COSTUMES | GF_NEW_CAMERA | GF_DIGI_IMUSE | GF_DEFAULT_TO_1X_SCALER | GF_DEMO, Common::kPlatformWindows},
+ GF_NEW_COSTUMES | GF_NEW_CAMERA | GF_DIGI_IMUSE | GF_DEMO, Common::kPlatformWindows},
{"362c1d281fb9899254cda66ad246c66a", "Demo", GID_DIG, 7, 0, MDT_NONE,
GF_NEW_COSTUMES | GF_NEW_CAMERA | GF_DIGI_IMUSE | GF_DEMO, Common::kPlatformPC},
@@ -1565,14 +1565,15 @@
if (_platform == Common::kPlatformFMTowns && _version == 3) { // FM-TOWNS V3 games use 320x240
_screenWidth = 320;
_screenHeight = 240;
- } else if (_features & GF_DEFAULT_TO_1X_SCALER) {
+ } else if (_version == 8 || _heversion >= 71) {
+ // COMI uses 640x480. Likewise starting from version 7.1, HE games use
+ // 640x480, too.
_screenWidth = 640;
_screenHeight = 480;
} else if (_platform == Common::kPlatformNES) {
_screenWidth = 256;
_screenHeight = 240;
} else if (_renderMode == Common::kRenderHercA || _renderMode == Common::kRenderHercG) {
- _features |= GF_DEFAULT_TO_1X_SCALER;
_screenWidth = 320;
_screenHeight = 200;
} else {
@@ -1804,14 +1805,15 @@
// Initialize backend
_system->beginGFXTransaction();
+ bool defaultTo1XScaler = false;
if (_renderMode == Common::kRenderHercA || _renderMode == Common::kRenderHercG) {
_system->initSize(Common::kHercW, Common::kHercH, 1);
- _features |= GF_DEFAULT_TO_1X_SCALER;
- detector._game.features |= GF_DEFAULT_TO_1X_SCALER;
+ defaultTo1XScaler = true;
} else {
_system->initSize(_screenWidth, _screenHeight, (detector._force1xOverlay ? 1 : 2));
+ defaultTo1XScaler = (_screenWidth > 320);
}
- initCommonGFX(detector, (_features & GF_DEFAULT_TO_1X_SCALER) != 0);
+ initCommonGFX(detector, defaultTo1XScaler);
_system->endGFXTransaction();
// On some systems it's not safe to run CD audio games from the CD.
@@ -3468,13 +3470,6 @@
g++;
}
- // Starting from version 7.1, HE games use 640x480. We check this here since multiple
- // versions _could_ use different resolutions (I haven't verified this, though).
- if (game.heversion >= 71) {
- game.features |= GF_DEFAULT_TO_1X_SCALER;
- }
-
-
// Check for a user override of the platform. We allow the user to override
// the platform, to make it possible to add games which are not yet in
// our MD5 database but require a specific platform setting.
Modified: scummvm/trunk/engines/simon/simon.cpp
===================================================================
--- scummvm/trunk/engines/simon/simon.cpp 2006-02-17 23:41:12 UTC (rev 20746)
+++ scummvm/trunk/engines/simon/simon.cpp 2006-02-18 00:12:36 UTC (rev 20747)
@@ -57,7 +57,7 @@
Common::Platform platform;
GameSettings toGameSettings() const {
- GameSettings dummy = { from, "Obsolete Target", 0 };
+ GameSettings dummy = { from, "Obsolete Target" };
return dummy;
}
};
@@ -83,23 +83,23 @@
static const GameSettings simonGames[] = {
// Simon the Sorcerer 1 & 2 (not SCUMM games)
- {"feeble", "The Feeble Files", 0},
- {"simon1", "Simon the Sorcerer 1", 0},
- {"simon2", "Simon the Sorcerer 2", 0},
+ {"feeble", "The Feeble Files"},
+ {"simon1", "Simon the Sorcerer 1"},
+ {"simon2", "Simon the Sorcerer 2"},
- {"simon1acorn", "Simon the Sorcerer 1 (Acorn)", 0},
- {"simon1amiga", "Simon the Sorcerer 1 (Amiga)", 0},
- {"simon1cd32", "Simon the Sorcerer 1 Talkie (Amiga CD32)", 0},
- {"simon1demo", "Simon the Sorcerer 1 (DOS Demo)", 0},
- {"simon1dos", "Simon the Sorcerer 1 (DOS)", 0},
- {"simon1talkie", "Simon the Sorcerer 1 Talkie", 0},
- {"simon1win", "Simon the Sorcerer 1 Talkie (Windows)", 0},
- {"simon2dos", "Simon the Sorcerer 2 (DOS)", 0},
- {"simon2talkie", "Simon the Sorcerer 2 Talkie", 0},
- {"simon2win", "Simon the Sorcerer 2 Talkie (Windows)", 0},
- {"simon2mac", "Simon the Sorcerer 2 Talkie (Amiga or Mac)", 0},
+ {"simon1acorn", "Simon the Sorcerer 1 (Acorn)"},
+ {"simon1amiga", "Simon the Sorcerer 1 (Amiga)"},
+ {"simon1cd32", "Simon the Sorcerer 1 Talkie (Amiga CD32)"},
+ {"simon1demo", "Simon the Sorcerer 1 (DOS Demo)"},
+ {"simon1dos", "Simon the Sorcerer 1 (DOS)"},
+ {"simon1talkie", "Simon the Sorcerer 1 Talkie"},
+ {"simon1win", "Simon the Sorcerer 1 Talkie (Windows)"},
+ {"simon2dos", "Simon the Sorcerer 2 (DOS)"},
+ {"simon2talkie", "Simon the Sorcerer 2 Talkie"},
+ {"simon2win", "Simon the Sorcerer 2 Talkie (Windows)"},
+ {"simon2mac", "Simon the Sorcerer 2 Talkie (Amiga or Mac)"},
- {NULL, NULL, 0}
+ {NULL, NULL}
};
GameList Engine_SIMON_gameList() {
Modified: scummvm/trunk/engines/simon/simon.h
===================================================================
--- scummvm/trunk/engines/simon/simon.h 2006-02-17 23:41:12 UTC (rev 20746)
+++ scummvm/trunk/engines/simon/simon.h 2006-02-18 00:12:36 UTC (rev 20747)
@@ -128,7 +128,7 @@
Common::Platform platform;
GameSettings toGameSettings() const {
- GameSettings dummy = { name, title, features };
+ GameSettings dummy = { name, title };
return dummy;
}
};
Modified: scummvm/trunk/engines/sky/sky.cpp
===================================================================
--- scummvm/trunk/engines/sky/sky.cpp 2006-02-17 23:41:12 UTC (rev 20746)
+++ scummvm/trunk/engines/sky/sky.cpp 2006-02-18 00:12:36 UTC (rev 20747)
@@ -78,7 +78,7 @@
*/
static const GameSettings skySetting =
- {"sky", "Beneath a Steel Sky", 0 };
+ {"sky", "Beneath a Steel Sky" };
GameList Engine_SKY_gameList() {
GameList games;
Modified: scummvm/trunk/engines/sword1/sword1.cpp
===================================================================
--- scummvm/trunk/engines/sword1/sword1.cpp 2006-02-17 23:41:12 UTC (rev 20746)
+++ scummvm/trunk/engines/sword1/sword1.cpp 2006-02-18 00:12:36 UTC (rev 20747)
@@ -49,9 +49,9 @@
/* Broken Sword 1 */
static const GameSettings sword1FullSettings =
- {"sword1", "Broken Sword 1: The Shadow of the Templars", GF_DEFAULT_TO_1X_SCALER};
+ {"sword1", "Broken Sword 1: The Shadow of the Templars"};
static const GameSettings sword1DemoSettings =
- {"sword1demo", "Broken Sword 1: The Shadow of the Templars (Demo)", GF_DEFAULT_TO_1X_SCALER | Sword1::GF_DEMO };
+ {"sword1demo", "Broken Sword 1: The Shadow of the Templars (Demo)"};
// check these subdirectories (if present)
static const char *g_dirNames[] = { "clusters", "speech" };
@@ -126,7 +126,11 @@
SwordEngine::SwordEngine(GameDetector *detector, OSystem *syst)
: Engine(syst) {
- _features = detector->_game.features;
+ if (0 == strcmp(detector->_game.gameid, "sword1demo"))
+ _features = GF_DEMO;
+ else
+ _features = 0;
+
if (!_mixer->isReady())
warning("Sound initialization failed");
Modified: scummvm/trunk/engines/sword2/sword2.cpp
===================================================================
--- scummvm/trunk/engines/sword2/sword2.cpp 2006-02-17 23:41:12 UTC (rev 20746)
+++ scummvm/trunk/engines/sword2/sword2.cpp 2006-02-18 00:12:36 UTC (rev 20747)
@@ -57,9 +57,9 @@
static const Sword2GameSettings sword2_settings[] = {
/* Broken Sword 2 */
- {"sword2", "Broken Sword 2: The Smoking Mirror", GF_DEFAULT_TO_1X_SCALER, "players.clu" },
- {"sword2alt", "Broken Sword 2: The Smoking Mirror (alt)", GF_DEFAULT_TO_1X_SCALER, "r2ctlns.ocx" },
- {"sword2demo", "Broken Sword 2: The Smoking Mirror (Demo)", GF_DEFAULT_TO_1X_SCALER | Sword2::GF_DEMO, "players.clu" },
+ {"sword2", "Broken Sword 2: The Smoking Mirror", 0, "players.clu" },
+ {"sword2alt", "Broken Sword 2: The Smoking Mirror (alt)", 0, "r2ctlns.ocx" },
+ {"sword2demo", "Broken Sword 2: The Smoking Mirror (Demo)", Sword2::GF_DEMO, "players.clu" },
{NULL, NULL, 0, NULL}
};
@@ -115,7 +115,11 @@
Common::File::addDefaultDirectory(_gameDataPath + "sword2/");
Common::File::addDefaultDirectory(_gameDataPath + "video/");
- _features = detector->_game.features;
+ if (0 == strcmp(detector->_game.gameid, "sword2demo"))
+ _features = GF_DEMO;
+ else
+ _features = 0;
+
_targetName = detector->_targetName;
_bootParam = ConfMan.getInt("boot_param");
More information about the Scummvm-git-logs
mailing list