[Scummvm-git-logs] scummvm master -> 0bf3eabb2485b3e4821401024193a679f63c2b4d

aquadran noreply at scummvm.org
Sun Aug 10 07:42:26 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:
0bf3eabb24 WINTERMUTE: Fixed putPixel() in 2D rendeerer


Commit: 0bf3eabb2485b3e4821401024193a679f63c2b4d
    https://github.com/scummvm/scummvm/commit/0bf3eabb2485b3e4821401024193a679f63c2b4d
Author: Paweł Kołodziejski (aquadran at gmail.com)
Date: 2025-08-10T09:42:21+02:00

Commit Message:
WINTERMUTE: Fixed putPixel() in 2D rendeerer

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


diff --git a/engines/wintermute/base/gfx/opengl/base_surface_opengl3d.cpp b/engines/wintermute/base/gfx/opengl/base_surface_opengl3d.cpp
index 8884d8a19da..3fb9e6349e0 100644
--- a/engines/wintermute/base/gfx/opengl/base_surface_opengl3d.cpp
+++ b/engines/wintermute/base/gfx/opengl/base_surface_opengl3d.cpp
@@ -270,7 +270,7 @@ bool BaseSurfaceOpenGL3D::putSurface(const Graphics::Surface &surface, bool hasA
 }
 
 bool BaseSurfaceOpenGL3D::putPixel(int x, int y, byte r, byte g, byte b, byte a) {
-	if (!_pixelOpReady || !_valid) {
+	if (!_pixelOpReady) {
 		return false;
 	}
 
@@ -290,7 +290,7 @@ bool BaseSurfaceOpenGL3D::putPixel(int x, int y, byte r, byte g, byte b, byte a)
 }
 
 bool BaseSurfaceOpenGL3D::getPixel(int x, int y, byte *r, byte *g, byte *b, byte *a) const {
-	if (!_pixelOpReady || !_valid) {
+	if (!_pixelOpReady) {
 		return false;
 	}
 
diff --git a/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp b/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp
index f0b63e6549a..3472ce858ab 100644
--- a/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp
+++ b/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp
@@ -54,6 +54,7 @@ BaseSurfaceOSystem::BaseSurfaceOSystem(BaseGame *inGame) : BaseSurface(inGame) {
 	_alphaType = Graphics::ALPHA_FULL;
 	_alphaMaskType = Graphics::ALPHA_OPAQUE;
 	_rotation = 0;
+	_surfaceModified = false;
 }
 
 //////////////////////////////////////////////////////////////////////////
@@ -274,6 +275,11 @@ bool BaseSurfaceOSystem::startPixelOp() {
 bool BaseSurfaceOSystem::endPixelOp() {
 	_lastUsedTime = _gameRef->getLiveTimer()->getTime();
 	_pixelOpReady = false;
+	if (_surfaceModified) {
+		BaseRenderOSystem *renderer = static_cast<BaseRenderOSystem *>(_gameRef->_renderer);
+		renderer->invalidateTicketsFromSurface(this);
+		_surfaceModified = false;
+	}
 	return STATUS_OK;
 }
 
diff --git a/engines/wintermute/base/gfx/osystem/base_surface_osystem.h b/engines/wintermute/base/gfx/osystem/base_surface_osystem.h
index e3d5c0a94a3..f1a19e4ddff 100644
--- a/engines/wintermute/base/gfx/osystem/base_surface_osystem.h
+++ b/engines/wintermute/base/gfx/osystem/base_surface_osystem.h
@@ -77,6 +77,7 @@ public:
 		}
 		if (_surface) {
 			_surface->setPixel(x, y, _surface->format.ARGBToColor(a, r, g, b));
+			_surfaceModified = true;
 			return STATUS_OK;
 		}
 		return STATUS_FAILED;
@@ -100,6 +101,7 @@ private:
 	void writeAlpha(Graphics::Surface *surface, const Graphics::Surface *mask);
 
 	bool _pixelOpReady;
+	bool _surfaceModified;
 	float _rotation;
 	Graphics::AlphaType _alphaType;
 	Graphics::Surface *_alphaMask;




More information about the Scummvm-git-logs mailing list