[Scummvm-git-logs] scummvm master -> 70b2ff0afa68bb18691071c602fa19f08a759433

aquadran noreply at scummvm.org
Wed Dec 29 22:43:24 UTC 2021


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:
70b2ff0afa WME3D: Corrected access to surface buffer


Commit: 70b2ff0afa68bb18691071c602fa19f08a759433
    https://github.com/scummvm/scummvm/commit/70b2ff0afa68bb18691071c602fa19f08a759433
Author: Paweł Kołodziejski (aquadran at gmail.com)
Date: 2021-12-29T23:43:18+01:00

Commit Message:
WME3D: Corrected access to surface buffer

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 8fb5eac6b06..aedafb2aef0 100644
--- a/engines/wintermute/base/gfx/opengl/base_surface_opengl3d.cpp
+++ b/engines/wintermute/base/gfx/opengl/base_surface_opengl3d.cpp
@@ -289,9 +289,9 @@ bool BaseSurfaceOpenGL3D::isTransparentAtLite(int x, int y) {
 		return false;
 	}
 
-	//TODO: Check for endianness issues
-	uint8 alpha = reinterpret_cast<uint8 *>(_imageData->getPixels())[y * _width * 4 + x * 4 + 3];
-	return alpha == 0;
+	uint8 a, r, g, b;
+	_imageData->format.colorToARGB(_imageData->getPixel(x, y), a, r, g, b);
+	return a == 0;
 }
 
 void BaseSurfaceOpenGL3D::setTexture() {




More information about the Scummvm-git-logs mailing list