aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNipun Garg2019-08-16 11:08:56 +0530
committerEugene Sandulenko2019-09-03 17:17:34 +0200
commita5f66ed1fe6f90857de53d84ee0f56932445bfac (patch)
tree4dd135c41a5f278d7a1fc83bf9924fbbaa643adb
parenta411d35b20d4937aa707c34dcfccffec7d3f3276 (diff)
downloadscummvm-rg350-a5f66ed1fe6f90857de53d84ee0f56932445bfac.tar.gz
scummvm-rg350-a5f66ed1fe6f90857de53d84ee0f56932445bfac.tar.bz2
scummvm-rg350-a5f66ed1fe6f90857de53d84ee0f56932445bfac.zip
HDB: Fix warnings
-rw-r--r--engines/hdb/gfx.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/engines/hdb/gfx.cpp b/engines/hdb/gfx.cpp
index 4ddf82049a..4ebb052705 100644
--- a/engines/hdb/gfx.cpp
+++ b/engines/hdb/gfx.cpp
@@ -340,11 +340,10 @@ void Gfx::updateFade() {
if (!_fadeInfo.isBlack) {
// Black fade
for (int y = 0; y < g_hdb->_screenHeight; y++) {
- uint16 *ptr = (uint16 *)_fadeBuffer1.getBasePtr(0, y);
+ ptr = (uint16 *)_fadeBuffer1.getBasePtr(0, y);
for (int x = 0; x < g_hdb->_screenWidth; x++) {
- uint16 value = *ptr;
+ value = *ptr;
if (value) {
- uint8 r, g, b;
g_hdb->_format.colorToRGB(value, r, g, b);
r = (r * _fadeInfo.curStep) >> 8;
g = (g * _fadeInfo.curStep) >> 8;
@@ -358,10 +357,9 @@ void Gfx::updateFade() {
} else {
// White fade
for (int y = 0; y < g_hdb->_screenHeight; y++) {
- uint16 *ptr = (uint16 *)_fadeBuffer1.getBasePtr(0, y);
+ ptr = (uint16 *)_fadeBuffer1.getBasePtr(0, y);
for (int x = 0; x < g_hdb->_screenWidth; x++) {
- uint16 value = *ptr;
- uint8 r, g, b;
+ value = *ptr;
g_hdb->_format.colorToRGB(value, r, g, b);
r += (255 - r) * (256 - _fadeInfo.curStep) / 256;
g += (255 - g) * (256 - _fadeInfo.curStep) / 256;