diff options
author | D G Turner | 2019-10-03 03:56:31 +0100 |
---|---|---|
committer | D G Turner | 2019-10-03 03:56:31 +0100 |
commit | 743d64bf539881c3850c79573d92a58c3c36b166 (patch) | |
tree | 150d143d8d8cce25cb7136dc7a9641af0cde6fd6 /engines/sludge/sprites.cpp | |
parent | 9308f802f3d753c4feecf00c1728bbb8a4190bd6 (diff) | |
download | scummvm-rg350-743d64bf539881c3850c79573d92a58c3c36b166.tar.gz scummvm-rg350-743d64bf539881c3850c79573d92a58c3c36b166.tar.bz2 scummvm-rg350-743d64bf539881c3850c79573d92a58c3c36b166.zip |
SLUDGE: Further Fixes for MSVC Warnings
This _should_ fix the remaining issues with signed vs. unsigned
warnings in the TransparentSurface blit method calls.
Diffstat (limited to 'engines/sludge/sprites.cpp')
-rw-r--r-- | engines/sludge/sprites.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/engines/sludge/sprites.cpp b/engines/sludge/sprites.cpp index e7d0005ade..4b63fee96b 100644 --- a/engines/sludge/sprites.cpp +++ b/engines/sludge/sprites.cpp @@ -339,7 +339,8 @@ void GraphicsManager::blendColor(Graphics::Surface *blitted, uint32 color, Graph Graphics::TransparentSurface tmp; tmp.create(blitted->w, blitted->h, blitted->format); tmp.fillRect(Common::Rect(0, 0, tmp.w, tmp.h), color); - tmp.blit(*blitted, 0, 0, Graphics::FLIP_NONE, nullptr, TS_ARGB(255, 255, 255, 255), (int)blitted->w, (int)blitted->h, mode); + uint tmpColor = TS_ARGB(255, 255, 255, 255); + tmp.blit(*blitted, 0, 0, Graphics::FLIP_NONE, nullptr, tmpColor, (int)blitted->w, (int)blitted->h, mode); tmp.free(); } @@ -372,10 +373,11 @@ Graphics::Surface *GraphicsManager::applyLightmapToSprite(Graphics::Surface *&bl Graphics::TransparentSurface tmp(_lightMap, false); Common::Rect rect_none(x1, y1, x1 + diffX, y1 + diffY); Common::Rect rect_h(_sceneWidth - x1 - diffX, y1, _sceneWidth - x1, y1 + diffY); + uint tmpColor = TS_ARGB(255, 255, 255, 255); tmp.blit(*blitted, 0, 0, (mirror ? Graphics::FLIP_H : Graphics::FLIP_NONE), (mirror ? &rect_h : &rect_none), - TS_ARGB(255, 255, 255, 255), + tmpColor, (int)blitted->w, (int)blitted->h, Graphics::BLEND_MULTIPLY); } } else { @@ -459,7 +461,8 @@ bool GraphicsManager::scaleSprite(Sprite &single, const SpritePalette &fontPal, // Use Transparent surface to scale and blit if (!_zBuffer->numPanels) { Graphics::TransparentSurface tmp(*blitted, false); - tmp.blit(_renderSurface, x1, y1, (mirror ? Graphics::FLIP_H : Graphics::FLIP_NONE), nullptr, TS_ARGB(255, 255, 255, 255), diffX, diffY); + uint tmpColor = TS_ARGB(255, 255, 255, 255); + tmp.blit(_renderSurface, x1, y1, (mirror ? Graphics::FLIP_H : Graphics::FLIP_NONE), nullptr, tmpColor, diffX, diffY); if (ptr) { ptr->free(); delete ptr; @@ -520,7 +523,8 @@ void GraphicsManager::displaySpriteLayers() { SpriteLayer::iterator it; for (it = _spriteLayers->layer[i].begin(); it != _spriteLayers->layer[i].end(); ++it) { Graphics::TransparentSurface tmp(*(*it)->surface, false); - tmp.blit(_renderSurface, (*it)->x, (*it)->y, (*it)->flip, nullptr, TS_ARGB(255, 255, 255, 255), (*it)->width, (*it)->height); + uint tmpColor = TS_ARGB(255, 255, 255, 255); + tmp.blit(_renderSurface, (*it)->x, (*it)->y, (*it)->flip, nullptr, tmpColor, (*it)->width, (*it)->height); } } killSpriteLayers(); @@ -575,7 +579,8 @@ void GraphicsManager::fixScaleSprite(int x, int y, Sprite &single, const SpriteP // draw sprite if (!_zBuffer->numPanels) { Graphics::TransparentSurface tmp(single.surface, false); - tmp.blit(_renderSurface, x1, y1, (mirror ? Graphics::FLIP_H : Graphics::FLIP_NONE), nullptr, TS_ARGB(255, 255, 255, 255), diffX, diffY); + uint tmpColor = TS_ARGB(255, 255, 255, 255); + tmp.blit(_renderSurface, x1, y1, (mirror ? Graphics::FLIP_H : Graphics::FLIP_NONE), nullptr, tmpColor, diffX, diffY); if (ptr) { ptr->free(); delete ptr; |