diff options
author | Eugene Sandulenko | 2016-09-03 10:13:57 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-09-03 10:18:47 +0200 |
commit | 58096d909f2cbe77ff70fad6ac416c92bec2a1f6 (patch) | |
tree | 2b2718640d1ba89ce5ca79e8e5dd0e1c241ac780 /backends/graphics/gph/gph-graphics.cpp | |
parent | 2fa97f20e89147a9585b08af1505cdceb9c5c19f (diff) | |
download | scummvm-rg350-58096d909f2cbe77ff70fad6ac416c92bec2a1f6.tar.gz scummvm-rg350-58096d909f2cbe77ff70fad6ac416c92bec2a1f6.tar.bz2 scummvm-rg350-58096d909f2cbe77ff70fad6ac416c92bec2a1f6.zip |
GPH: Fix formatting
Diffstat (limited to 'backends/graphics/gph/gph-graphics.cpp')
-rw-r--r-- | backends/graphics/gph/gph-graphics.cpp | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/backends/graphics/gph/gph-graphics.cpp b/backends/graphics/gph/gph-graphics.cpp index e698db83f7..4aae11d6e4 100644 --- a/backends/graphics/gph/gph-graphics.cpp +++ b/backends/graphics/gph/gph-graphics.cpp @@ -278,35 +278,35 @@ void GPHGraphicsManager::internUpdateScreen() { } #ifdef USE_OSD -// OSD visible (i.e. non-transparent)? -if (_osdMessageAlpha != SDL_ALPHA_TRANSPARENT) { - // Updated alpha value - const int diff = SDL_GetTicks() - _osdMessageFadeStartTime; - if (diff > 0) { - if (diff >= kOSDFadeOutDuration) { - // Back to full transparency - _osdMessageAlpha = SDL_ALPHA_TRANSPARENT; - } else { - // Do a linear fade out... - const int startAlpha = SDL_ALPHA_TRANSPARENT + kOSDInitialAlpha * (SDL_ALPHA_OPAQUE - SDL_ALPHA_TRANSPARENT) / 100; - _osdMessageAlpha = startAlpha + diff * (SDL_ALPHA_TRANSPARENT - startAlpha) / kOSDFadeOutDuration; + // OSD visible (i.e. non-transparent)? + if (_osdMessageAlpha != SDL_ALPHA_TRANSPARENT) { + // Updated alpha value + const int diff = SDL_GetTicks() - _osdMessageFadeStartTime; + if (diff > 0) { + if (diff >= kOSDFadeOutDuration) { + // Back to full transparency + _osdMessageAlpha = SDL_ALPHA_TRANSPARENT; + } else { + // Do a linear fade out... + const int startAlpha = SDL_ALPHA_TRANSPARENT + kOSDInitialAlpha * (SDL_ALPHA_OPAQUE - SDL_ALPHA_TRANSPARENT) / 100; + _osdMessageAlpha = startAlpha + diff * (SDL_ALPHA_TRANSPARENT - startAlpha) / kOSDFadeOutDuration; + } + _forceFull = true; } - _forceFull = true; - } - if (_osdMessageAlpha == SDL_ALPHA_TRANSPARENT) { - removeOSDMessage(); - } else { - if (_osdMessageSurface && _osdSurface) { - SDL_Rect dstRect; - dstRect.x = (_osdSurface->w - _osdMessageSurface->w) / 2; - dstRect.y = (_osdSurface->h - _osdMessageSurface->h) / 2; - dstRect.w = _osdMessageSurface->w; - dstRect.h = _osdMessageSurface->h; - blitOSDMessage(dstRect); + if (_osdMessageAlpha == SDL_ALPHA_TRANSPARENT) { + removeOSDMessage(); + } else { + if (_osdMessageSurface && _osdSurface) { + SDL_Rect dstRect; + dstRect.x = (_osdSurface->w - _osdMessageSurface->w) / 2; + dstRect.y = (_osdSurface->h - _osdMessageSurface->h) / 2; + dstRect.w = _osdMessageSurface->w; + dstRect.h = _osdMessageSurface->h; + blitOSDMessage(dstRect); + } } } -} #endif if (!_overlayVisible) { |