[Scummvm-git-logs] scummvm master -> 19ee0d04aa924f8475eb8853e7b825926e425717

whoozle noreply at scummvm.org
Fri Sep 4 08:02:24 UTC 2026


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

Summary:
0281df91fa GRAPHICS: Fix converting opaque pixels in alphaBlit()
19ee0d04aa PHOENIXVR: Use simpleBlitFrom() for rendering cursors with alpha transparency


Commit: 0281df91fa8d4dbe433990ae7b5e211c6def198a
    https://github.com/scummvm/scummvm/commit/0281df91fa8d4dbe433990ae7b5e211c6def198a
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2026-09-04T09:02:14+01:00

Commit Message:
GRAPHICS: Fix converting opaque pixels in alphaBlit()

Changed paths:
    graphics/blit/blit-alpha.cpp


diff --git a/graphics/blit/blit-alpha.cpp b/graphics/blit/blit-alpha.cpp
index 8e7c998072b..51622560389 100644
--- a/graphics/blit/blit-alpha.cpp
+++ b/graphics/blit/blit-alpha.cpp
@@ -64,7 +64,7 @@ static inline void alphaBlitLogic(byte *dst, const byte *src, const byte *mask,
 						const int srcInc, const int dstInc, const int maskInc,
 						const uint32 key, const byte flip, const byte aMod) {
 	const uint32 alphaMask = srcFmt.ARGBToColor(255, 0, 0, 0);
-	const bool convert = hasMap ? false : ((SrcSize != DstSize) ? true : srcFmt == dstFmt);
+	const bool convert = hasMap ? false : ((SrcSize != DstSize) ? true : srcFmt != dstFmt);
 
 	for (uint y = 0; y < h; ++y) {
 		for (uint x = 0; x < w; ++x) {


Commit: 19ee0d04aa924f8475eb8853e7b825926e425717
    https://github.com/scummvm/scummvm/commit/19ee0d04aa924f8475eb8853e7b825926e425717
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2026-09-04T09:02:14+01:00

Commit Message:
PHOENIXVR: Use simpleBlitFrom() for rendering cursors with alpha transparency

Changed paths:
    engines/phoenixvr/phoenixvr.cpp


diff --git a/engines/phoenixvr/phoenixvr.cpp b/engines/phoenixvr/phoenixvr.cpp
index 5395a65f0e3..673a3eb393f 100644
--- a/engines/phoenixvr/phoenixvr.cpp
+++ b/engines/phoenixvr/phoenixvr.cpp
@@ -1271,11 +1271,11 @@ Graphics::ManagedSurface *PhoenixVREngine::loadSurface(const Common::String &pat
 	if (dec->hasPalette())
 		s->setPalette(dec->getPalette().data(), 0, dec->getPalette().size());
 	// TODO: Skip conversion for surfaces with palettes?
-	if (version() == 1) {
+	if (s->format.aBits() == 0) {
 		s->convertToInPlace(_pixelFormat);
 		s->setTransparentColor(s->format.RGBToColor(0, 0, 0));
-	} else {
-		s->convertToInPlace(Graphics::BlendBlit::getSupportedPixelFormat());
+	} else if (_pixelFormat.aBits() >= s->format.aBits()) {
+		s->convertToInPlace(_pixelFormat);
 	}
 	return s;
 }
@@ -1539,6 +1539,7 @@ void PhoenixVREngine::renderLensflare() {
 		const int dstX = static_cast<int>(sourceX + (_screenCenter.x - sourceX) * lens.scale);
 		const int dstY = static_cast<int>(sourceY + (_screenCenter.y - sourceY) * lens.scale);
 
+		// TODO: Could ManagedSurface routines be used here?
 		for (int y = 0; y != src.h; ++y) {
 			const int screenY = dstY + y;
 			if (screenY < 0 || screenY >= _screen->h)
@@ -1903,8 +1904,8 @@ void PhoenixVREngine::tick(float dt) {
 	if (!cursor)
 		cursor = loadCursor(anyMatched ? _defaultCursor[1] : _defaultCursor[0]);
 	if (cursor) {
-		if (cursor->surface->format.aBits() != 0)
-			_screen->blendBlitFrom(*cursor->surface, _mousePos - cursor->offset);
+		if (!cursor->surface->hasTransparentColor())
+			_screen->simpleBlitFrom(*cursor->surface, _mousePos - cursor->offset, Graphics::FLIP_NONE, true);
 		else
 			_screen->simpleBlitFrom(*cursor->surface, _mousePos - cursor->offset);
 	}
@@ -1927,8 +1928,7 @@ Common::Error PhoenixVREngine::run() {
 		formats.push_back(_rgb565);
 		initGraphics(640, 480, formats);
 	} else {
-		_pixelFormat = Graphics::BlendBlit::getSupportedPixelFormat();
-		initGraphics(640, 480, &_pixelFormat);
+		initGraphics(640, 480, nullptr);
 	}
 
 	_pixelFormat = g_system->getScreenFormat();




More information about the Scummvm-git-logs mailing list