[Scummvm-git-logs] scummvm master -> 56377af2ae78a00bae133a019b7cb29e68e97b9d

fracturehill noreply at scummvm.org
Fri Dec 1 21:03:18 UTC 2023


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:
56377af2ae AGS: Fix tinting in SSE path, 4bpp


Commit: 56377af2ae78a00bae133a019b7cb29e68e97b9d
    https://github.com/scummvm/scummvm/commit/56377af2ae78a00bae133a019b7cb29e68e97b9d
Author: Kaloyan Chehlarski (strahy at outlook.com)
Date: 2023-12-01T23:03:07+02:00

Commit Message:
AGS: Fix tinting in SSE path, 4bpp

The code for tinting in the SSE path was incorrect, and
produced blue tinting in multiple games (bugtracker #14634)

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


diff --git a/engines/ags/lib/allegro/surface_sse2.cpp b/engines/ags/lib/allegro/surface_sse2.cpp
index 5dd7bc0b831..7f15705880e 100644
--- a/engines/ags/lib/allegro/surface_sse2.cpp
+++ b/engines/ags/lib/allegro/surface_sse2.cpp
@@ -479,9 +479,9 @@ static void drawInner4BppWithConv(BITMAP::DrawInnerArgs &args) {
 	const int xDir = args.horizFlip ? -1 : 1;
 	byte rSrc, gSrc, bSrc, aSrc;
 	byte rDest = 0, gDest = 0, bDest = 0, aDest = 0;
-	__m128i tint = _mm_sll_epi32(_mm_set1_epi32(args.srcAlpha), _mm_set1_epi32(24));
-	tint = _mm_or_si128(tint, _mm_sll_epi32(_mm_set1_epi32(args.tintRed), _mm_set1_epi32(16)));
-	tint = _mm_or_si128(tint, _mm_sll_epi32(_mm_set1_epi32(args.tintGreen), _mm_set1_epi32(8)));
+    __m128i tint = _mm_slli_epi32(_mm_set1_epi32(args.srcAlpha), 24);
+	tint = _mm_or_si128(tint, _mm_slli_epi32(_mm_set1_epi32(args.tintRed), 16));
+	tint = _mm_or_si128(tint, _mm_slli_epi32(_mm_set1_epi32(args.tintGreen), 8));
 	tint = _mm_or_si128(tint, _mm_set1_epi32(args.tintBlue));
 	__m128i maskedAlphas = _mm_set1_epi32(args.alphaMask);
 	__m128i transColors = _mm_set1_epi32(args.transColor);




More information about the Scummvm-git-logs mailing list