diff options
author | Filippos Karapetis | 2019-05-27 14:41:54 +0300 |
---|---|---|
committer | Filippos Karapetis | 2019-05-27 14:53:41 +0300 |
commit | 9da3d22703a0dc230d505e9839c3e33cc313b403 (patch) | |
tree | ace8fe6b3c9a5f6c0170745902e7048f0d67aec4 /engines/sci/graphics | |
parent | 87e13a50488fea398885eae8c46e01898a9fe41f (diff) | |
download | scummvm-rg350-9da3d22703a0dc230d505e9839c3e33cc313b403.tar.gz scummvm-rg350-9da3d22703a0dc230d505e9839c3e33cc313b403.tar.bz2 scummvm-rg350-9da3d22703a0dc230d505e9839c3e33cc313b403.zip |
SCI: Fix MSVC warnings
- Remove unused parameters
- Initialize potentially uninitialized variables
- Use Common::String instead of a fixed buffer
- Remove redundant parentheses
- Change float suffix to be uppercase
- Fix spacing
- Fix integer left shifts with boolean variables
- Fix potential division by zero
- Fix missing breaks
Diffstat (limited to 'engines/sci/graphics')
-rw-r--r-- | engines/sci/graphics/paint32.cpp | 3 | ||||
-rw-r--r-- | engines/sci/graphics/video32.cpp | 8 |
2 files changed, 7 insertions, 4 deletions
diff --git a/engines/sci/graphics/paint32.cpp b/engines/sci/graphics/paint32.cpp index f80f115e1b..fc2e4cf491 100644 --- a/engines/sci/graphics/paint32.cpp +++ b/engines/sci/graphics/paint32.cpp @@ -145,6 +145,7 @@ reg_t GfxPaint32::makeLineBitmap(const Common::Point &startPoint, const Common:: LineProperties properties; properties.bitmap = &bitmap; + properties.solid = true; switch (style) { case kLineStyleSolid: @@ -158,6 +159,8 @@ reg_t GfxPaint32::makeLineBitmap(const Common::Point &startPoint, const Common:: case kLineStylePattern: properties.solid = pattern == 0xFFFF; break; + default: + break; } // Change coordinates to be relative to the bitmap diff --git a/engines/sci/graphics/video32.cpp b/engines/sci/graphics/video32.cpp index b7b3c9ed78..0efb2570a0 100644 --- a/engines/sci/graphics/video32.cpp +++ b/engines/sci/graphics/video32.cpp @@ -578,8 +578,8 @@ void VMDPlayer::init(int16 x, int16 y, const PlayFlags flags, const int16 boostP _doublePixels = (flags & kPlayFlagDoublePixels) || upscaleVideos; _stretchVertical = flags & kPlayFlagStretchVertical; - const int16 width = _decoder->getWidth() << _doublePixels; - const int16 height = _decoder->getHeight() << (_doublePixels || _stretchVertical); + const int16 width = _decoder->getWidth() << (_doublePixels ? 1 : 0); + const int16 height = _decoder->getHeight() << (_doublePixels || _stretchVertical ? 1 : 0); if (getSciVersion() < SCI_VERSION_3) { x &= ~1; @@ -1052,8 +1052,8 @@ void DuckPlayer::open(const GuiResourceId resourceId, const int displayMode, con // SSCI seems to incorrectly calculate the draw rect by scaling the origin // in addition to the width/height for the BR point setDrawRect(x, y, - (_decoder->getWidth() << _doublePixels), - (_decoder->getHeight() << _doublePixels)); + (_decoder->getWidth() << (_doublePixels ? 1 : 0)), + (_decoder->getHeight() << (_doublePixels ? 1 : 0))); g_sci->_gfxCursor32->hide(); |