[Scummvm-git-logs] scummvm master -> 0b3b2a2dc3403fb3842e708b5a667ceb4397267f
dreammaster
dreammaster at scummvm.org
Tue Feb 23 04:11:21 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:
0b3b2a2dc3 AGS: Workaround for pink screen flash during Black Cauldron remake intro
Commit: 0b3b2a2dc3403fb3842e708b5a667ceb4397267f
https://github.com/scummvm/scummvm/commit/0b3b2a2dc3403fb3842e708b5a667ceb4397267f
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2021-02-22T20:11:08-08:00
Commit Message:
AGS: Workaround for pink screen flash during Black Cauldron remake intro
Changed paths:
engines/ags/lib/allegro/surface.cpp
diff --git a/engines/ags/lib/allegro/surface.cpp b/engines/ags/lib/allegro/surface.cpp
index 48ea400c74..ebcb9c9725 100644
--- a/engines/ags/lib/allegro/surface.cpp
+++ b/engines/ags/lib/allegro/surface.cpp
@@ -106,6 +106,7 @@ void BITMAP::draw(const BITMAP *srcBitmap, const Common::Rect &srcRect,
const int scaleX = SCALE_THRESHOLD * srcRect.width() / destRect.width();
const int scaleY = SCALE_THRESHOLD * srcRect.height() / destRect.height();
const int xDir = horizFlip ? -1 : 1;
+ bool isScreenDest = dynamic_cast<Graphics::Screen *>(_owner);
byte rSrc, gSrc, bSrc, aSrc;
byte rDest = 0, gDest = 0, bDest = 0, aDest = 0;
@@ -190,8 +191,13 @@ void BITMAP::draw(const BITMAP *srcBitmap, const Common::Rect &srcRect,
aDest = aSrc;
}
- if (!(IS_TRANSPARENT(rSrc, gSrc, bSrc) && skipTrans)) {
+ // FIXME: I had at least one case in Black Cauldron Remake when a screen
+ // clear was all the pink transparent color because blit was called,
+ // and in Allegro, blit doesn't skip transparent pixels. So for now,
+ // I hacked in an extra check to still skip them if blitting to screen
+ if (!IS_TRANSPARENT(rDest, gDest, bDest) || (!skipTrans && !isScreenDest)) {
uint32 pixel = format.ARGBToColor(aDest, rDest, gDest, bDest);
+
if (format.bytesPerPixel == 4)
*(uint32 *)destVal = pixel;
else
More information about the Scummvm-git-logs
mailing list