[Scummvm-git-logs] scummvm master -> f005cad3180e3a50b6fd9c5afe9ab7ff4c5d7610

bluegr noreply at scummvm.org
Sun Jun 1 20:41:12 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:
f005cad318 WINTERMUTE: Avoid unneeded pixel format conversion for fadeToColor()


Commit: f005cad3180e3a50b6fd9c5afe9ab7ff4c5d7610
    https://github.com/scummvm/scummvm/commit/f005cad3180e3a50b6fd9c5afe9ab7ff4c5d7610
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2025-06-01T23:41:10+03:00

Commit Message:
WINTERMUTE: Avoid unneeded pixel format conversion for fadeToColor()

Changed paths:
    engines/wintermute/ui/ui_window.cpp


diff --git a/engines/wintermute/ui/ui_window.cpp b/engines/wintermute/ui/ui_window.cpp
index 58ebf692c55..7b5b8360f3f 100644
--- a/engines/wintermute/ui/ui_window.cpp
+++ b/engines/wintermute/ui/ui_window.cpp
@@ -152,13 +152,10 @@ bool UIWindow::display(int offsetX, int offsetY) {
 	}
 
 	if (_fadeBackground) {
-		// TODO: This should be handled on renderer side
-		Graphics::PixelFormat format = _gameRef->_renderer->getPixelFormat();
-		byte fadeR, fadeG, fadeB, fadeA;
-		// First convert from the internal format to the screen-format
-		uint32 fadeColor = format.ARGBToColor(RGBCOLGetA(_fadeColor), RGBCOLGetR(_fadeColor), RGBCOLGetG(_fadeColor), RGBCOLGetB(_fadeColor));
-		// Then get components
-		format.colorToARGB(fadeColor, fadeA, fadeR, fadeG, fadeB);
+		byte fadeR = RGBCOLGetR(_fadeColor);
+		byte fadeG = RGBCOLGetG(_fadeColor);
+		byte fadeB = RGBCOLGetB(_fadeColor);
+		byte fadeA = RGBCOLGetA(_fadeColor);
 		_gameRef->_renderer->fadeToColor(fadeR, fadeG, fadeB, fadeA);
 	}
 




More information about the Scummvm-git-logs mailing list