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
This commit is contained in:
parent
fde1da92f0
commit
a96760a2fd
13 changed files with 19 additions and 14 deletions
6
TODO
6
TODO
|
@ -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
|
||||
=====
|
||||
|
|
|
@ -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...
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -157,7 +157,7 @@ SwordEngine::~SwordEngine() {
|
|||
int SwordEngine::init(GameDetector &detector) {
|
||||
|
||||
_system->beginGFXTransaction();
|
||||
initCommonGFX(detector);
|
||||
initCommonGFX(detector, true);
|
||||
_system->initSize(640, 480);
|
||||
_system->endGFXTransaction();
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue