diff options
author | Strangerke | 2019-11-07 22:16:43 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2019-11-13 22:07:08 +0100 |
commit | a4ffe2cf559cef835ca267d02018c48376857393 (patch) | |
tree | c1fdde2958b9b351854806fc28491fced2041972 | |
parent | 417678ce41e658a6bcd73c4d0054fcfdc3fa88a4 (diff) | |
download | scummvm-rg350-a4ffe2cf559cef835ca267d02018c48376857393.tar.gz scummvm-rg350-a4ffe2cf559cef835ca267d02018c48376857393.tar.bz2 scummvm-rg350-a4ffe2cf559cef835ca267d02018c48376857393.zip |
GRIFFON: Reduce the scope of two variables
-rw-r--r-- | engines/griffon/dialogs.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/engines/griffon/dialogs.cpp b/engines/griffon/dialogs.cpp index 870de81c41..7c83639bdc 100644 --- a/engines/griffon/dialogs.cpp +++ b/engines/griffon/dialogs.cpp @@ -319,12 +319,11 @@ void GriffonEngine::configMenu() { _itemImg[15]->blit(*_videoBuffer, rc.left, rc.top); - float yy = 255.0; if (_ticks < ticks1 + 1000) { - yy = 255.0 * ((float)(_ticks - ticks1) / 1000.0); + float yy = 255.0 * ((float)(_ticks - ticks1) / 1000.0); yy = CLIP<float>(yy, 0.0, 255.0); - _videoBuffer->setAlpha((int)yy); + _videoBuffer->setAlpha((uint8)yy); } _videoBuffer->blit(*_videoBuffer2); @@ -716,12 +715,11 @@ void GriffonEngine::saveLoadNew() { _itemImg[15]->blit(*_videoBuffer, rcDest.left, rcDest.top); } - int yy = 255; if (_ticks < ticks1 + 1000) { - yy = 255 * (_ticks - ticks1) / 1000; + int yy = 255 * (_ticks - ticks1) / 1000; yy = CLIP(yy, 0, 255); - _videoBuffer->setAlpha((int)yy); + _videoBuffer->setAlpha((uint8)yy); } _videoBuffer3->fillRect(Common::Rect(0, 0, _videoBuffer3->w, _videoBuffer3->h), 0); |