diff options
author | Max Horn | 2006-02-17 00:01:18 +0000 |
---|---|---|
committer | Max Horn | 2006-02-17 00:01:18 +0000 |
commit | a96760a2fdf32a1dc3c6cb44cfd247e4b1b3ab79 (patch) | |
tree | 499b85db76c71d966c30aa0b35deb35a68642a0c | |
parent | fde1da92f068f700d82774360dd6cd05c6c0adcc (diff) | |
download | scummvm-rg350-a96760a2fdf32a1dc3c6cb44cfd247e4b1b3ab79.tar.gz scummvm-rg350-a96760a2fdf32a1dc3c6cb44cfd247e4b1b3ab79.tar.bz2 scummvm-rg350-a96760a2fdf32a1dc3c6cb44cfd247e4b1b3ab79.zip |
Reduced use of GF_DEFAULT_TO_1X_SCALER in favor of a new param to Engine::initCommonGFX; added a TODO stating that it should eventually be removed completly
svn-id: r20738
-rw-r--r-- | TODO | 6 | ||||
-rw-r--r-- | base/engine.cpp | 4 | ||||
-rw-r--r-- | base/engine.h | 2 | ||||
-rw-r--r-- | engines/gob/gob.cpp | 2 | ||||
-rw-r--r-- | engines/kyra/kyra.cpp | 2 | ||||
-rw-r--r-- | engines/lure/lure.cpp | 2 | ||||
-rw-r--r-- | engines/queen/queen.cpp | 2 | ||||
-rw-r--r-- | engines/saga/gfx.cpp | 2 | ||||
-rw-r--r-- | engines/scumm/scumm.cpp | 2 | ||||
-rw-r--r-- | engines/simon/simon.cpp | 3 | ||||
-rw-r--r-- | engines/sky/sky.cpp | 2 | ||||
-rw-r--r-- | engines/sword1/sword1.cpp | 2 | ||||
-rw-r--r-- | engines/sword2/sword2.cpp | 2 |
13 files changed, 19 insertions, 14 deletions
@@ -318,6 +318,12 @@ General ======= * Fix engines so they clean up after themselves, to allow proper re-entry to the launcher. See "FIXME: LAUNCHERHACK" in base/main.cpp +* Get rid of GF_DEFAULT_TO_1X_SCALER and the 'defaultTo1XScaler' parameter of + Engine::initCommonGFX. They form a crude hack to better support 640x480 games + and are meant to prevent those games from being accidentally scaled to a size + that won't fit on the screen. However, the proper fix would be to modify the + backends so that they simply fall back to a smaller scaler when a combination + is requested that can't be satisfied. SCUMM ===== diff --git a/base/engine.cpp b/base/engine.cpp index c92caacdc2..38e2b9e0dc 100644 --- a/base/engine.cpp +++ b/base/engine.cpp @@ -60,7 +60,7 @@ Engine::~Engine() { g_engine = NULL; } -void Engine::initCommonGFX(GameDetector &detector) { +void Engine::initCommonGFX(GameDetector &detector, bool defaultTo1XScaler) { const bool useDefaultGraphicsMode = !ConfMan.hasKey("gfx_mode", Common::ConfigManager::kTransientDomain) && ( @@ -70,7 +70,7 @@ void Engine::initCommonGFX(GameDetector &detector) { ); // See if the game should default to 1x scaler - if (useDefaultGraphicsMode && (detector._game.features & GF_DEFAULT_TO_1X_SCALER)) { + if (useDefaultGraphicsMode && defaultTo1XScaler) { // FIXME: As a hack, we use "1x" here. Would be nicer to use // getDefaultGraphicsMode() instead, but right now, we do not specify // whether that is a 1x scaler or not... diff --git a/base/engine.h b/base/engine.h index 6517d4bba1..da01a34eb9 100644 --- a/base/engine.h +++ b/base/engine.h @@ -72,7 +72,7 @@ public: /** Specific for each engine: prepare error string. */ virtual void errorString(const char *buf_input, char *buf_output); - void initCommonGFX(GameDetector &detector); + void initCommonGFX(GameDetector &detector, bool defaultTo1XScaler); /** On some systems, check if the game appears to be run from CD. */ void checkCD(); diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp index a3285b219f..7a8bbee3bb 100644 --- a/engines/gob/gob.cpp +++ b/engines/gob/gob.cpp @@ -316,7 +316,7 @@ int GobEngine::init(GameDetector &detector) { _music = new Music(this); _system->beginGFXTransaction(); - initCommonGFX(detector); + initCommonGFX(detector, false); _system->initSize(320, 200); _system->endGFXTransaction(); diff --git a/engines/kyra/kyra.cpp b/engines/kyra/kyra.cpp index a2f38669f5..469cf3d652 100644 --- a/engines/kyra/kyra.cpp +++ b/engines/kyra/kyra.cpp @@ -322,7 +322,7 @@ KyraEngine::KyraEngine(GameDetector *detector, OSystem *system) int KyraEngine::init(GameDetector &detector) { _system->beginGFXTransaction(); - initCommonGFX(detector); + initCommonGFX(detector, false); //for debug reasons (see Screen::updateScreen) //_system->initSize(640, 200); _system->initSize(320, 200); diff --git a/engines/lure/lure.cpp b/engines/lure/lure.cpp index ae60261e5c..f5dcc49e3c 100644 --- a/engines/lure/lure.cpp +++ b/engines/lure/lure.cpp @@ -244,7 +244,7 @@ void LureEngine::detectGame() { int LureEngine::init(GameDetector &detector) { _system->beginGFXTransaction(); - initCommonGFX(detector); + initCommonGFX(detector, false); _system->initSize(FULL_SCREEN_WIDTH, FULL_SCREEN_HEIGHT); _system->endGFXTransaction(); diff --git a/engines/queen/queen.cpp b/engines/queen/queen.cpp index b1081cf839..e529a12711 100644 --- a/engines/queen/queen.cpp +++ b/engines/queen/queen.cpp @@ -404,7 +404,7 @@ int QueenEngine::go() { int QueenEngine::init(GameDetector &detector) { _system->beginGFXTransaction(); - initCommonGFX(detector); + initCommonGFX(detector, false); _system->initSize(GAME_SCREEN_WIDTH, GAME_SCREEN_HEIGHT); _system->endGFXTransaction(); diff --git a/engines/saga/gfx.cpp b/engines/saga/gfx.cpp index 4de8c52de2..cdb445df8d 100644 --- a/engines/saga/gfx.cpp +++ b/engines/saga/gfx.cpp @@ -38,7 +38,7 @@ namespace Saga { Gfx::Gfx(SagaEngine *vm, OSystem *system, int width, int height, GameDetector &detector) : _vm(vm), _system(system) { _system->beginGFXTransaction(); - _vm->initCommonGFX(detector); + _vm->initCommonGFX(detector, (width > 320)); _system->initSize(width, height); _system->endGFXTransaction(); diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index 4d290108bc..1c3b8b36ae 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -1811,7 +1811,7 @@ int ScummEngine::init(GameDetector &detector) { } else { _system->initSize(_screenWidth, _screenHeight, (detector._force1xOverlay ? 1 : 2)); } - initCommonGFX(detector); + initCommonGFX(detector, (_features & GF_DEFAULT_TO_1X_SCALER) != 0); _system->endGFXTransaction(); // On some systems it's not safe to run CD audio games from the CD. diff --git a/engines/simon/simon.cpp b/engines/simon/simon.cpp index 3ff65572c1..ba8bb58dcb 100644 --- a/engines/simon/simon.cpp +++ b/engines/simon/simon.cpp @@ -540,7 +540,6 @@ int SimonEngine::init(GameDetector &detector) { if (getGameType() == GType_FF) { _screenWidth = 640; _screenHeight = 480; - detector._game.features |= GF_DEFAULT_TO_1X_SCALER; } else { _screenWidth = 320; _screenHeight = 200; @@ -554,7 +553,7 @@ int SimonEngine::init(GameDetector &detector) { _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume")); _system->beginGFXTransaction(); - initCommonGFX(detector); + initCommonGFX(detector, getGameType() == GType_FF); _system->initSize(_screenWidth, _screenHeight); _system->endGFXTransaction(); diff --git a/engines/sky/sky.cpp b/engines/sky/sky.cpp index d7eca3dc03..1c5f97c29c 100644 --- a/engines/sky/sky.cpp +++ b/engines/sky/sky.cpp @@ -302,7 +302,7 @@ int SkyEngine::go() { int SkyEngine::init(GameDetector &detector) { _system->beginGFXTransaction(); - initCommonGFX(detector); + initCommonGFX(detector, false); _system->initSize(320, 200); _system->endGFXTransaction(); diff --git a/engines/sword1/sword1.cpp b/engines/sword1/sword1.cpp index 1f49426262..8c8ab2dc0d 100644 --- a/engines/sword1/sword1.cpp +++ b/engines/sword1/sword1.cpp @@ -157,7 +157,7 @@ SwordEngine::~SwordEngine() { int SwordEngine::init(GameDetector &detector) { _system->beginGFXTransaction(); - initCommonGFX(detector); + initCommonGFX(detector, true); _system->initSize(640, 480); _system->endGFXTransaction(); diff --git a/engines/sword2/sword2.cpp b/engines/sword2/sword2.cpp index cf7178dcb7..5f4c11917e 100644 --- a/engines/sword2/sword2.cpp +++ b/engines/sword2/sword2.cpp @@ -232,7 +232,7 @@ int Sword2Engine::init(GameDetector &detector) { // away _system->beginGFXTransaction(); - initCommonGFX(detector); + initCommonGFX(detector, true); _screen = new Screen(this, 640, 480); _system->endGFXTransaction(); |