mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-29 14:42:26 +00:00
- Removed the 'features' field from GameSettings
- Removed GF_DEFAULT_TO_1X_SCALER svn-id: r20747
This commit is contained in:
parent
d13950dab2
commit
81798556db
@ -275,7 +275,7 @@ void listTargets() {
|
||||
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) {
|
||||
|
@ -34,17 +34,9 @@ namespace Audio {
|
||||
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 @@ struct GameSettings {
|
||||
*/
|
||||
template <class T>
|
||||
GameSettings toGameSettings(const T &g) {
|
||||
GameSettings dummy = { g.gameid, g.description, g.features };
|
||||
GameSettings dummy = { g.gameid, g.description };
|
||||
return dummy;
|
||||
}
|
||||
|
||||
|
@ -74,7 +74,7 @@ GameSettings Plugin::findGame(const char *gameName) const {
|
||||
// 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;
|
||||
|
@ -59,7 +59,7 @@ struct GobGameSettings {
|
||||
uint32 features;
|
||||
const char *md5sum;
|
||||
GameSettings toGameSettings() const {
|
||||
GameSettings dummy = { gameid, description, features };
|
||||
GameSettings dummy = { gameid, description };
|
||||
return dummy;
|
||||
}
|
||||
};
|
||||
@ -121,9 +121,9 @@ static const GobGameSettings gob_games[] = {
|
||||
|
||||
// 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}
|
||||
};
|
||||
|
||||
|
||||
|
@ -97,8 +97,8 @@ static const KyraGameSettings kyra_games[] = {
|
||||
|
||||
// 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 {
|
||||
|
@ -69,8 +69,8 @@ static const LureGameSettings lure_games[] = {
|
||||
// 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() {
|
||||
|
@ -56,10 +56,10 @@ bool isSmartphone();
|
||||
|
||||
/* 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() {
|
||||
|
@ -1417,7 +1417,7 @@ static GameDescription gameDescriptions[] = {
|
||||
NULL,
|
||||
0,
|
||||
NULL,
|
||||
GF_DEFAULT_TO_1X_SCALER,
|
||||
0,
|
||||
Common::EN_USA,
|
||||
Common::kPlatformPC,
|
||||
},
|
||||
@ -1440,7 +1440,7 @@ static GameDescription gameDescriptions[] = {
|
||||
NULL,
|
||||
0,
|
||||
NULL,
|
||||
GF_DEFAULT_TO_1X_SCALER,
|
||||
0,
|
||||
Common::EN_USA,
|
||||
Common::kPlatformPC,
|
||||
},
|
||||
@ -1463,7 +1463,7 @@ static GameDescription gameDescriptions[] = {
|
||||
NULL,
|
||||
0,
|
||||
NULL,
|
||||
GF_DEFAULT_TO_1X_SCALER,
|
||||
0,
|
||||
Common::DE_DEU,
|
||||
Common::kPlatformPC,
|
||||
},
|
||||
@ -1485,7 +1485,7 @@ static GameDescription gameDescriptions[] = {
|
||||
NULL,
|
||||
0,
|
||||
NULL,
|
||||
GF_DEFAULT_TO_1X_SCALER,
|
||||
0,
|
||||
Common::ES_ESP,
|
||||
Common::kPlatformPC,
|
||||
},
|
||||
@ -1507,7 +1507,7 @@ static GameDescription gameDescriptions[] = {
|
||||
NULL,
|
||||
0,
|
||||
NULL,
|
||||
GF_DEFAULT_TO_1X_SCALER,
|
||||
0,
|
||||
Common::RU_RUS,
|
||||
Common::kPlatformPC,
|
||||
},
|
||||
@ -1529,7 +1529,7 @@ static GameDescription gameDescriptions[] = {
|
||||
NULL,
|
||||
0,
|
||||
NULL,
|
||||
GF_DEFAULT_TO_1X_SCALER,
|
||||
0,
|
||||
Common::FR_FRA,
|
||||
Common::kPlatformPC,
|
||||
},
|
||||
|
@ -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() {
|
||||
|
@ -518,7 +518,7 @@ struct GameDescription {
|
||||
Common::Platform platform;
|
||||
|
||||
GameSettings toGameSettings() const {
|
||||
GameSettings dummy = { name, title, features };
|
||||
GameSettings dummy = { name, title };
|
||||
return dummy;
|
||||
}
|
||||
};
|
||||
|
@ -194,7 +194,7 @@ struct ScummGameSettings {
|
||||
Common::Platform platform;
|
||||
|
||||
GameSettings toGameSettings() const {
|
||||
GameSettings dummy = { gameid, findDescriptionFromGameID(gameid), features };
|
||||
GameSettings dummy = { gameid, findDescriptionFromGameID(gameid) };
|
||||
return dummy;
|
||||
}
|
||||
};
|
||||
@ -212,7 +212,7 @@ struct ObsoleteGameIDs {
|
||||
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 @@ static const ScummGameSettings scumm_settings[] = {
|
||||
|
||||
/* 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 @@ static const ScummGameSettings multiple_versions_md5_settings[] = {
|
||||
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 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS
|
||||
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 @@ int ScummEngine::init(GameDetector &detector) {
|
||||
|
||||
// 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 @@ Engine *Engine_SCUMM_create(GameDetector *detector, OSystem *syst) {
|
||||
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.
|
||||
|
@ -57,7 +57,7 @@ struct ObsoleteTargets {
|
||||
Common::Platform platform;
|
||||
|
||||
GameSettings toGameSettings() const {
|
||||
GameSettings dummy = { from, "Obsolete Target", 0 };
|
||||
GameSettings dummy = { from, "Obsolete Target" };
|
||||
return dummy;
|
||||
}
|
||||
};
|
||||
@ -83,23 +83,23 @@ static ObsoleteTargets obsoleteTargetsTable[] = {
|
||||
|
||||
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() {
|
||||
|
@ -128,7 +128,7 @@ struct GameDescription {
|
||||
Common::Platform platform;
|
||||
|
||||
GameSettings toGameSettings() const {
|
||||
GameSettings dummy = { name, title, features };
|
||||
GameSettings dummy = { name, title };
|
||||
return dummy;
|
||||
}
|
||||
};
|
||||
|
@ -78,7 +78,7 @@ extern bool isSmartphone(void);
|
||||
*/
|
||||
|
||||
static const GameSettings skySetting =
|
||||
{"sky", "Beneath a Steel Sky", 0 };
|
||||
{"sky", "Beneath a Steel Sky" };
|
||||
|
||||
GameList Engine_SKY_gameList() {
|
||||
GameList games;
|
||||
|
@ -49,9 +49,9 @@ using namespace Sword1;
|
||||
|
||||
/* 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 @@ void SwordEngine::errorString(const char *buf1, char *buf2) {
|
||||
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");
|
||||
|
@ -57,9 +57,9 @@ struct Sword2GameSettings {
|
||||
|
||||
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 @@ Sword2Engine::Sword2Engine(GameDetector *detector, OSystem *syst) : Engine(syst)
|
||||
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");
|
||||
|
Loading…
x
Reference in New Issue
Block a user