diff options
author | Florian Kagerer | 2009-12-26 14:12:38 +0000 |
---|---|---|
committer | Florian Kagerer | 2009-12-26 14:12:38 +0000 |
commit | 193b23bcad887fc3d6e5343f755e236936b9c969 (patch) | |
tree | 380703ff20dcd9983781026cae564ed7506dbec2 /engines | |
parent | 657b881c4ec1d39bf9d504bd135ee30b91fab6bb (diff) | |
download | scummvm-rg350-193b23bcad887fc3d6e5343f755e236936b9c969.tar.gz scummvm-rg350-193b23bcad887fc3d6e5343f755e236936b9c969.tar.bz2 scummvm-rg350-193b23bcad887fc3d6e5343f755e236936b9c969.zip |
LOL: fixed minor bug in lamp code
svn-id: r46587
Diffstat (limited to 'engines')
-rw-r--r-- | engines/kyra/lol.cpp | 2 | ||||
-rw-r--r-- | engines/kyra/lol.h | 4 | ||||
-rw-r--r-- | engines/kyra/scene_lol.cpp | 4 | ||||
-rw-r--r-- | engines/kyra/timer_lol.cpp | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/engines/kyra/lol.cpp b/engines/kyra/lol.cpp index e56876ec07..c44f5b8e8d 100644 --- a/engines/kyra/lol.cpp +++ b/engines/kyra/lol.cpp @@ -1705,7 +1705,7 @@ void LoLEngine::setPaletteBrightness(const Palette &srcPal, int brightness, int _screen->_fadeFlag = 0; } -void LoLEngine::generateBrightnessPalette(const Palette &src, Palette &dst, int brightness, int modifier) { +void LoLEngine::generateBrightnessPalette(const Palette &src, Palette &dst, int brightness, int16 modifier) { dst.copy(src); if (_flags.use16ColorMode) { if (!brightness) diff --git a/engines/kyra/lol.h b/engines/kyra/lol.h index 8d4d937981..2fa916ce94 100644 --- a/engines/kyra/lol.h +++ b/engines/kyra/lol.h @@ -889,7 +889,7 @@ private: void fadeText(); void transformRegion(int x1, int y1, int x2, int y2, int w, int h, int srcPage, int dstPage); void setPaletteBrightness(const Palette &srcPal, int brightness, int modifier); - void generateBrightnessPalette(const Palette &src, Palette &dst, int brightness, int modifier); + void generateBrightnessPalette(const Palette &src, Palette &dst, int brightness, int16 modifier); void generateFlashPalette(const Palette &src, Palette &dst, int colorFlags); void createTransparencyTables(); void updateSequenceBackgroundAnimations(); @@ -972,7 +972,7 @@ private: void setLampMode(bool lampOn); void updateLampStatus(); - int _lampEffect; + int8 _lampEffect; int _brightness; int _lampOilStatus; uint32 _lampStatusTimer; diff --git a/engines/kyra/scene_lol.cpp b/engines/kyra/scene_lol.cpp index 537fc0422b..c16f18ae36 100644 --- a/engines/kyra/scene_lol.cpp +++ b/engines/kyra/scene_lol.cpp @@ -596,7 +596,7 @@ void LoLEngine::resetLampStatus() { void LoLEngine::setLampMode(bool lampOn) { _flagsTable[31] &= 0xFB; - if (!(_flagsTable[30] & 0x08) || !lampOn) + if (!(_flagsTable[31] & 0x08) || !lampOn) return; _screen->drawShape(0, _gameShapes[_flags.isTalkie ? 43 : 41], 291, 56, 0, 0); @@ -604,7 +604,7 @@ void LoLEngine::setLampMode(bool lampOn) { } void LoLEngine::updateLampStatus() { - uint8 newLampEffect = 0; + int8 newLampEffect = 0; uint8 tmpOilStatus = 0; if ((_updateFlags & 4) || !(_flagsTable[31] & 0x08)) diff --git a/engines/kyra/timer_lol.cpp b/engines/kyra/timer_lol.cpp index fb3aa40672..90cfc1af78 100644 --- a/engines/kyra/timer_lol.cpp +++ b/engines/kyra/timer_lol.cpp @@ -245,7 +245,7 @@ void LoLEngine::timerUpdatePortraitAnimations(int skipUpdate) { } void LoLEngine::timerUpdateLampState(int timerNum) { - if ((_flagsTable[31] & 0x08) && (_flagsTable[31] & 0x04) && _lampOilStatus > 0) + if ((_flagsTable[31] & 0x08) && (_flagsTable[31] & 0x04) && _brightness && _lampOilStatus) _lampOilStatus--; } |