From 81798556dbd38fb829557cbe6a04132cc5edf75c Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 18 Feb 2006 00:12:36 +0000 Subject: - Removed the 'features' field from GameSettings - Removed GF_DEFAULT_TO_1X_SCALER svn-id: r20747 --- engines/gob/gob.cpp | 8 ++++---- engines/kyra/kyra.cpp | 4 ++-- engines/lure/lure.cpp | 4 ++-- engines/queen/queen.cpp | 8 ++++---- engines/saga/game.cpp | 12 ++++++------ engines/saga/saga.cpp | 6 +++--- engines/saga/saga.h | 2 +- engines/scumm/scumm.cpp | 27 +++++++++++---------------- engines/simon/simon.cpp | 36 ++++++++++++++++++------------------ engines/simon/simon.h | 2 +- engines/sky/sky.cpp | 2 +- engines/sword1/sword1.cpp | 10 +++++++--- engines/sword2/sword2.cpp | 12 ++++++++---- 13 files changed, 68 insertions(+), 65 deletions(-) (limited to 'engines') diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp index f97bc527ef..4fd60175f1 100644 --- a/engines/gob/gob.cpp +++ b/engines/gob/gob.cpp @@ -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} }; diff --git a/engines/kyra/kyra.cpp b/engines/kyra/kyra.cpp index d918b5a2a7..c6c5df604f 100644 --- a/engines/kyra/kyra.cpp +++ b/engines/kyra/kyra.cpp @@ -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 { diff --git a/engines/lure/lure.cpp b/engines/lure/lure.cpp index d7f2f932a0..96f15a7240 100644 --- a/engines/lure/lure.cpp +++ b/engines/lure/lure.cpp @@ -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() { diff --git a/engines/queen/queen.cpp b/engines/queen/queen.cpp index e529a12711..d7f3a80491 100644 --- a/engines/queen/queen.cpp +++ b/engines/queen/queen.cpp @@ -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() { diff --git a/engines/saga/game.cpp b/engines/saga/game.cpp index 86526fe267..5a6ffd88b9 100644 --- a/engines/saga/game.cpp +++ b/engines/saga/game.cpp @@ -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, }, diff --git a/engines/saga/saga.cpp b/engines/saga/saga.cpp index 70d4f2bf71..45c12f616d 100644 --- a/engines/saga/saga.cpp +++ b/engines/saga/saga.cpp @@ -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() { diff --git a/engines/saga/saga.h b/engines/saga/saga.h index f2111265bd..2e2c1358f0 100644 --- a/engines/saga/saga.h +++ b/engines/saga/saga.h @@ -518,7 +518,7 @@ struct GameDescription { Common::Platform platform; GameSettings toGameSettings() const { - GameSettings dummy = { name, title, features }; + GameSettings dummy = { name, title }; return dummy; } }; diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index 1c3b8b36ae..c09fefc143 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -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. diff --git a/engines/simon/simon.cpp b/engines/simon/simon.cpp index ba8bb58dcb..2ef92cb3e1 100644 --- a/engines/simon/simon.cpp +++ b/engines/simon/simon.cpp @@ -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}, - - {"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}, - - {NULL, NULL, 0} + {"feeble", "The Feeble Files"}, + {"simon1", "Simon the Sorcerer 1"}, + {"simon2", "Simon the Sorcerer 2"}, + + {"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} }; GameList Engine_SIMON_gameList() { diff --git a/engines/simon/simon.h b/engines/simon/simon.h index c2b58f03b6..1c0e2a1c84 100644 --- a/engines/simon/simon.h +++ b/engines/simon/simon.h @@ -128,7 +128,7 @@ struct GameDescription { Common::Platform platform; GameSettings toGameSettings() const { - GameSettings dummy = { name, title, features }; + GameSettings dummy = { name, title }; return dummy; } }; diff --git a/engines/sky/sky.cpp b/engines/sky/sky.cpp index 1c5f97c29c..71cc74dc00 100644 --- a/engines/sky/sky.cpp +++ b/engines/sky/sky.cpp @@ -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; diff --git a/engines/sword1/sword1.cpp b/engines/sword1/sword1.cpp index 8c8ab2dc0d..689c4625c3 100644 --- a/engines/sword1/sword1.cpp +++ b/engines/sword1/sword1.cpp @@ -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"); diff --git a/engines/sword2/sword2.cpp b/engines/sword2/sword2.cpp index b4d7838b93..bcc1e36e86 100644 --- a/engines/sword2/sword2.cpp +++ b/engines/sword2/sword2.cpp @@ -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"); -- cgit v1.2.3