[Scummvm-git-logs] scummvm master -> 5daedb9a8fef6797685ba5083b2e0ea98b1741e1

dreammaster dreammaster at scummvm.org
Mon Feb 15 18:40:19 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:
5daedb9a8f AGS: Fix draw_trans_sprite to use transBlitFrom


Commit: 5daedb9a8fef6797685ba5083b2e0ea98b1741e1
    https://github.com/scummvm/scummvm/commit/5daedb9a8fef6797685ba5083b2e0ea98b1741e1
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2021-02-15T10:39:49-08:00

Commit Message:
AGS: Fix draw_trans_sprite to use transBlitFrom

Changed paths:
    engines/ags/lib/allegro/gfx.cpp


diff --git a/engines/ags/lib/allegro/gfx.cpp b/engines/ags/lib/allegro/gfx.cpp
index bc7d401417..05fdd096df 100644
--- a/engines/ags/lib/allegro/gfx.cpp
+++ b/engines/ags/lib/allegro/gfx.cpp
@@ -310,7 +310,8 @@ void draw_trans_sprite(BITMAP *bmp, const BITMAP *sprite, int x, int y) {
 	assert(sprite->format.bytesPerPixel == 4);
 
 	if (trans_blend_alpha == -1) {
-		bmp->getSurface().blitFrom(sprite->getSurface(), Common::Point(x, y));
+		bmp->getSurface().transBlitFrom(sprite->getSurface(), Common::Point(x, y),
+			TRANSPARENT_COLOR(*sprite));
 
 	} else {
 		// Create a temporary ManagedSurface with a pointer to the sprite's pixels,
@@ -326,7 +327,7 @@ void draw_trans_sprite(BITMAP *bmp, const BITMAP *sprite, int x, int y) {
 		spr.pitch = sprite->pitch;
 
 		bmp->getSurface().transBlitFrom(spr, Common::Rect(0, 0, spr.w, spr.h),
-			Common::Rect(x, y, x + spr.w, y + spr.h), NO_TRANSPARENT_COLOR,
+			Common::Rect(x, y, x + spr.w, y + spr.h), TRANSPARENT_COLOR(*sprite),
 			false, 0, trans_blend_alpha);
 	}
 }




More information about the Scummvm-git-logs mailing list