aboutsummaryrefslogtreecommitdiff
path: root/engines/sword2/sword2.cpp
diff options
context:
space:
mode:
authorTorbjörn Andersson2008-05-29 20:32:27 +0000
committerTorbjörn Andersson2008-05-29 20:32:27 +0000
commit7833dd87a5f3247681d6f51e45ee2f6da1ab91fd (patch)
treef6273db663c74e443cd2bd57f2acc403a32bc80e /engines/sword2/sword2.cpp
parent3a43916e2022210b4de9a865f44df67157a0e004 (diff)
downloadscummvm-rg350-7833dd87a5f3247681d6f51e45ee2f6da1ab91fd.tar.gz
scummvm-rg350-7833dd87a5f3247681d6f51e45ee2f6da1ab91fd.tar.bz2
scummvm-rg350-7833dd87a5f3247681d6f51e45ee2f6da1ab91fd.zip
Rewrote dimPalette() so that the dimming is now a "filter" between the Screen
class and the backend, i.e. as far as the game engine is concerned the palette remains unchanged. (This is similar how to the SCUMM engine handles the "noir" mode in Sam & Max.) This is one small step towards allowing the game to be paused anywhere. svn-id: r32369
Diffstat (limited to 'engines/sword2/sword2.cpp')
-rw-r--r--engines/sword2/sword2.cpp22
1 files changed, 3 insertions, 19 deletions
diff --git a/engines/sword2/sword2.cpp b/engines/sword2/sword2.cpp
index 26fd598d9d..7331d1f761 100644
--- a/engines/sword2/sword2.cpp
+++ b/engines/sword2/sword2.cpp
@@ -225,7 +225,6 @@ Sword2Engine::Sword2Engine(OSystem *syst) : Engine(syst) {
#endif
_gamePaused = false;
- _graphicsLevelFudged = false;
_gameCycle = 0;
_gameSpeed = 1;
@@ -701,22 +700,14 @@ void Sword2Engine::pauseEngineIntern(bool pause) {
_sound->pauseAllSound();
_mouse->pauseEngine(true);
- // If render level is at max, turn it down because palette-
- // matching won't work when the palette is dimmed.
-
- if (_screen->getRenderLevel() == 3) {
- _screen->setRenderLevel(2);
- _graphicsLevelFudged = true;
- }
-
#ifdef SWORD2_DEBUG
// Don't dim it if we're single-stepping through frames
// dim the palette during the pause
if (!_stepOneCycle)
- _screen->dimPalette();
+ _screen->dimPalette(true);
#else
- _screen->dimPalette();
+ _screen->dimPalette(true);
#endif
_gamePaused = true;
@@ -724,14 +715,7 @@ void Sword2Engine::pauseEngineIntern(bool pause) {
_mouse->pauseEngine(false);
_sound->unpauseAllSound();
- // Put back game screen palette; see screen.cpp
- _screen->setFullPalette(-1);
-
- // If graphics level at max, turn up again
- if (_graphicsLevelFudged) {
- _screen->setRenderLevel(3);
- _graphicsLevelFudged = false;
- }
+ _screen->dimPalette(false);
_gamePaused = false;