[Scummvm-git-logs] scummvm master -> 743d64bf539881c3850c79573d92a58c3c36b166

digitall 547637+digitall at users.noreply.github.com
Thu Oct 3 05:00:43 CEST 2019


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
743d64bf53 SLUDGE: Further Fixes for MSVC Warnings


Commit: 743d64bf539881c3850c79573d92a58c3c36b166
    https://github.com/scummvm/scummvm/commit/743d64bf539881c3850c79573d92a58c3c36b166
Author: D G Turner (digitall at scummvm.org)
Date: 2019-10-03T03:56:31+01:00

Commit Message:
SLUDGE: Further Fixes for MSVC Warnings

This _should_ fix the remaining issues with signed vs. unsigned
warnings in the TransparentSurface blit method calls.

Changed paths:
    engines/sludge/backdrop.cpp
    engines/sludge/sprites.cpp
    engines/sludge/thumbnail.cpp


diff --git a/engines/sludge/backdrop.cpp b/engines/sludge/backdrop.cpp
index dfb570f..618e8e9 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 e7d0005..4b63fee 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 dcbcd91..2c086b3 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();
 	}
 }





More information about the Scummvm-git-logs mailing list