[Scummvm-git-logs] scummvm master -> 5b343764e2921ae238c730235e1c38c90f6799dd

aquadran noreply at scummvm.org
Tue Jun 10 20:56:29 UTC 2025


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

Summary:
5b343764e2 WINTERMUTE: Ported workaround for sprite glitch at Rosemary game


Commit: 5b343764e2921ae238c730235e1c38c90f6799dd
    https://github.com/scummvm/scummvm/commit/5b343764e2921ae238c730235e1c38c90f6799dd
Author: Paweł Kołodziejski (aquadran at gmail.com)
Date: 2025-06-10T22:56:25+02:00

Commit Message:
WINTERMUTE: Ported workaround for sprite glitch at Rosemary game

Changed paths:
    engines/wintermute/base/gfx/opengl/base_surface_opengl3d.cpp


diff --git a/engines/wintermute/base/gfx/opengl/base_surface_opengl3d.cpp b/engines/wintermute/base/gfx/opengl/base_surface_opengl3d.cpp
index d6cbbf7df1e..dd9eee3e20b 100644
--- a/engines/wintermute/base/gfx/opengl/base_surface_opengl3d.cpp
+++ b/engines/wintermute/base/gfx/opengl/base_surface_opengl3d.cpp
@@ -169,6 +169,25 @@ bool BaseSurfaceOpenGL3D::create(const Common::String &filename, bool defaultCK,
 		_imageData->applyColorKey(ckRed, ckGreen, ckBlue, replaceAlpha, 0, 0, 0);
 	}
 
+	// Bug #6572 WME: Rosemary - Sprite flaw on going upwards
+	// Some Rosemary sprites have non-fully transparent pixels
+	// In original WME it wasn't seen because sprites were downscaled
+	// Let's set alpha to 0 if it is smaller then some treshold
+	if (BaseEngine::instance().getGameId() == "rosemary" && _filename.hasPrefix("actors") && _imageData->format.bytesPerPixel == 4) {
+		uint8 treshold = 16;
+		for (int x = 0; x < _imageData->w; x++) {
+			for (int y = 0; y < _imageData->h; y++) {
+				uint32 pixel = _imageData->getPixel(x, y);
+				uint8 r, g, b, a;
+				_imageData->format.colorToARGB(pixel, a, r, g, b);
+				if (a > 0 && a < treshold) {
+					uint32 *p = (uint32 *)_imageData->getBasePtr(x, y);
+					*p = _imageData->format.ARGBToColor(0, 0, 0, 0);
+				}
+			}
+		}
+	}
+
 	putSurface(*_imageData);
 
 	if (_lifeTime == 0 || lifeTime == -1 || lifeTime > _lifeTime) {




More information about the Scummvm-git-logs mailing list