diff options
author | Max Horn | 2003-04-30 21:30:59 +0000 |
---|---|---|
committer | Max Horn | 2003-04-30 21:30:59 +0000 |
commit | 797c222ec7d69662ec504271df915713b9723432 (patch) | |
tree | c4d9a2a42d4babcc4888dc251584891eef0357f2 /scumm/gfx.cpp | |
parent | 0cacf945f290777369042413b7df4f5ef78eb0e1 (diff) | |
download | scummvm-rg350-797c222ec7d69662ec504271df915713b9723432.tar.gz scummvm-rg350-797c222ec7d69662ec504271df915713b9723432.tar.bz2 scummvm-rg350-797c222ec7d69662ec504271df915713b9723432.zip |
VAR_V5_DRAWFLAGS == VAR_CURRENT_LIGHTS; fixed bug #601139
svn-id: r7234
Diffstat (limited to 'scumm/gfx.cpp')
-rw-r--r-- | scumm/gfx.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp index cea2e593ff..215a9047bb 100644 --- a/scumm/gfx.cpp +++ b/scumm/gfx.cpp @@ -611,6 +611,9 @@ void Scumm::drawFlashlight() { _flashlight.x = x - _flashlight.w / 2 - _screenStartStrip * 8; _flashlight.y = y - _flashlight.h / 2; + if (_gameId == GID_LOOM || _gameId == GID_LOOM256) + _flashlight.y -= 12; + // Clip the flashlight at the borders if (_flashlight.x < 0) _flashlight.x = 0; @@ -737,6 +740,7 @@ void Scumm::restoreBG(int left, int top, int right, int bottom, byte backColor) VirtScreen *vs; int topline, height, width; byte *backbuff, *bgbak; + bool lightsOn; if (left == right || top == bottom) return; @@ -769,7 +773,10 @@ void Scumm::restoreBG(int left, int top, int right, int bottom, byte backColor) height = bottom - top; width = right - left; - if (vs->alloctwobuffers && _currentRoom != 0 /*&& _vars[VAR_V5_DRAWFLAGS]&2 */ ) { + // Check whether lights are turned on or not + lightsOn = (_features & GF_AFTER_V6) || (vs->number != 0) || (_vars[VAR_CURRENT_LIGHTS] & LIGHTMODE_screen); + + if (vs->alloctwobuffers && _currentRoom != 0 && lightsOn ) { blit(backbuff, bgbak, width, height); if (vs->number == 0 && _charset->_hasMask && height) { byte *mask; |