[Scummvm-git-logs] scummvm master -> a1b36bf0de2779cf6d51eb552d9e17b7f7694983
criezy
criezy at scummvm.org
Sun Mar 21 23:16:29 UTC 2021
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
2b69eafd9a AGS: Cleanup get_filename
a1b36bf0de AGS: Fix rendering some sprites
Commit: 2b69eafd9ad764217727cdbfd4c8b1e570946712
https://github.com/scummvm/scummvm/commit/2b69eafd9ad764217727cdbfd4c8b1e570946712
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2021-03-21T23:13:05Z
Commit Message:
AGS: Cleanup get_filename
Changed paths:
engines/ags/shared/util/path.h
diff --git a/engines/ags/shared/util/path.h b/engines/ags/shared/util/path.h
index d33ac26371..adfd78e972 100644
--- a/engines/ags/shared/util/path.h
+++ b/engines/ags/shared/util/path.h
@@ -89,7 +89,7 @@ inline String get_filename(const String &pathAndName) {
size_t p = pathAndName.FindCharReverse('/');
if (p != String::npos)
return String(pathAndName.GetNullableCStr() + p + 1);
- return Common::FSNode(pathAndName).getName();
+ return pathAndName;
}
} // namespace Path
Commit: a1b36bf0de2779cf6d51eb552d9e17b7f7694983
https://github.com/scummvm/scummvm/commit/a1b36bf0de2779cf6d51eb552d9e17b7f7694983
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2021-03-21T23:13:05Z
Commit Message:
AGS: Fix rendering some sprites
The original interpreter only checks the mask color on the source
bitmap when blitting sprites. And I checked that if I remove the
check on the destination bitmap I still get the correct result in
all 10 games I tried.
And this check was not properly implemented as if the destination
color was the mask color it was setting the result to the source
color without doing any blending. This caused the cursor in
Resonance to be missing. The reason for that is:
1. The original cursor sprite has alpha set to 0.
2. It creates a transparent (i.e. filled with the mask color)
intermediate bitmap.
3. The cursor sprite is drawn on this intermediate bitmap with the
opaque alpha blender that sets the result RGB to the source RGB
and the result alpha to 255.
4. Then this intermediate bitmap is drawn to the screen with a
source alpha blender.
The check we had on the destination pixel meant that since it is
the mask color everywhere on the intermediate bitmap, when drawing
the cursor bitmap on it it was simply copying the colors instead of
calling the blender function. As a result the alpha was set to 0
instead of 255. Then in the next step when it was blended using
the source alpha it ended up being completely transparent.
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 5de65b4177..da09f2f301 100644
--- a/engines/ags/lib/allegro/surface.cpp
+++ b/engines/ags/lib/allegro/surface.cpp
@@ -223,13 +223,6 @@ void BITMAP::draw(const BITMAP *srcBitmap, const Common::Rect &srcRect,
}
void BITMAP::blendPixel(uint8 aSrc, uint8 rSrc, uint8 gSrc, uint8 bSrc, uint8 &aDest, uint8 &rDest, uint8 &gDest, uint8 &bDest, uint32 alpha) const {
- if (IS_TRANSPARENT(rDest, gDest, bDest)) {
- aDest = aSrc;
- rDest = rSrc;
- gDest = gSrc;
- bDest = bSrc;
- return;
- }
switch(_G(_blender_mode)) {
case kSourceAlphaBlender:
blendSourceAlpha(aSrc, rSrc, gSrc, bSrc, aDest, rDest, gDest, bDest, alpha);
More information about the Scummvm-git-logs
mailing list