From 6c21737f50d39d1b30a752d86e9776adb6494288 Mon Sep 17 00:00:00 2001 From: Kaloyan Chehlarski Date: Thu, 23 Nov 2023 01:07:15 +0200 Subject: [PATCH] AGS: Properly pre-flip surface when blitting Fixed an error in the arguments when pre-flipping a blit prior to blitting. --- engines/ags/lib/allegro/surface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/ags/lib/allegro/surface.cpp b/engines/ags/lib/allegro/surface.cpp index 2d0748ed942..66df5d13b52 100644 --- a/engines/ags/lib/allegro/surface.cpp +++ b/engines/ags/lib/allegro/surface.cpp @@ -191,7 +191,7 @@ void BITMAP::draw(const BITMAP *srcBitmap, const Common::Rect &srcRect, } BITMAP temp(&flipped); - auto args = DrawInnerArgs(this, (horizFlip || vertFlip) ? &temp : srcBitmap, srcRect, Common::Rect(dstX, dstY, dstX+1, dstY+1), skipTrans, srcAlpha, false, false, tintRed, tintGreen, tintBlue, false); + auto args = DrawInnerArgs(this, (horizFlip || vertFlip) ? &temp : srcBitmap, (horizFlip || vertFlip) ? flipped.getBounds() : srcRect, Common::Rect(dstX, dstY, dstX + 1, dstY + 1), skipTrans, srcAlpha, false, false, tintRed, tintGreen, tintBlue, false); if (!args.shouldDraw) return; if (!args.sameFormat && args.src.format.bytesPerPixel == 1) { if (format.bytesPerPixel == 4)