[Scummvm-git-logs] scummvm master -> 9a1d796ff2e6db3e01e02eeb1be44c425265fa1a
aquadran
noreply at scummvm.org
Thu Jun 12 04:49:56 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:
9a1d796ff2 WINTERMUTE: Synced with 2D renderer
Commit: 9a1d796ff2e6db3e01e02eeb1be44c425265fa1a
https://github.com/scummvm/scummvm/commit/9a1d796ff2e6db3e01e02eeb1be44c425265fa1a
Author: PaweÅ KoÅodziejski (aquadran at gmail.com)
Date: 2025-06-12T06:49:53+02:00
Commit Message:
WINTERMUTE: Synced with 2D renderer
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 25845f3b106..e70e7e04ab6 100644
--- a/engines/wintermute/base/gfx/opengl/base_surface_opengl3d.cpp
+++ b/engines/wintermute/base/gfx/opengl/base_surface_opengl3d.cpp
@@ -172,15 +172,15 @@ bool BaseSurfaceOpenGL3D::create(const Common::String &filename, bool defaultCK,
// 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;
+ uint32 mask = _imageData->format.ARGBToColor(255, 0, 0, 0);
+ uint32 treshold = _imageData->format.ARGBToColor(16, 0, 0, 0);
+ uint32 blank = _imageData->format.ARGBToColor(0, 0, 0, 0);
+
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);
+ if ((pixel & mask) > blank && (pixel & mask) < treshold) {
+ _imageData->setPixel(x, y, blank);
}
}
}
More information about the Scummvm-git-logs
mailing list