aboutsummaryrefslogtreecommitdiff
path: root/engines/sludge
diff options
context:
space:
mode:
authorD G Turner2019-10-03 03:56:31 +0100
committerD G Turner2019-10-03 03:56:31 +0100
commit743d64bf539881c3850c79573d92a58c3c36b166 (patch)
tree150d143d8d8cce25cb7136dc7a9641af0cde6fd6 /engines/sludge
parent9308f802f3d753c4feecf00c1728bbb8a4190bd6 (diff)
downloadscummvm-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')
-rw-r--r--engines/sludge/backdrop.cpp3
-rw-r--r--engines/sludge/sprites.cpp15
-rw-r--r--engines/sludge/thumbnail.cpp3
3 files changed, 14 insertions, 7 deletions
diff --git a/engines/sludge/backdrop.cpp b/engines/sludge/backdrop.cpp
index dfb570fb3f..618e8e9f59 100644
--- a/engines/sludge/backdrop.cpp
+++ b/engines/sludge/backdrop.cpp
@@ -388,7 +388,8 @@ bool GraphicsManager::loadLightMap(int v) {
if (_lightMapMode == LIGHTMAPMODE_HOTSPOT) {
return fatal("Light map width and height don't match scene width and height. That is required for lightmaps in HOTSPOT mode.");
} else if (_lightMapMode == LIGHTMAPMODE_PIXEL) {
- tmp.blit(_lightMap, 0, 0, Graphics::FLIP_NONE, nullptr, TS_ARGB(255, 255, 255, 255), (int)_sceneWidth, (int)_sceneHeight);
+ uint tmpColor = TS_ARGB(255, 255, 255, 255);
+ tmp.blit(_lightMap, 0, 0, Graphics::FLIP_NONE, nullptr, tmpColor, (int)_sceneWidth, (int)_sceneHeight);
} else {
_lightMap.copyFrom(tmp);
}
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;
diff --git a/engines/sludge/thumbnail.cpp b/engines/sludge/thumbnail.cpp
index dcbcd91db3..2c086b3a34 100644
--- a/engines/sludge/thumbnail.cpp
+++ b/engines/sludge/thumbnail.cpp
@@ -120,7 +120,8 @@ void GraphicsManager::showThumbnail(const Common::String &filename, int atX, int
if (fileHeight + atY > (int)_sceneHeight)
fileHeight = _sceneHeight - atY;
- thumbnail.blit(_backdropSurface, atX, atY, Graphics::FLIP_NONE, nullptr, TS_ARGB(255, 255, 255, 255), fileWidth, fileHeight);
+ uint tmpColor = TS_ARGB(255, 255, 255, 255);
+ thumbnail.blit(_backdropSurface, atX, atY, Graphics::FLIP_NONE, nullptr, tmpColor, fileWidth, fileHeight);
thumbnail.free();
}
}