[Scummvm-git-logs] scummvm master -> 1b04af560e5e10bb9beb21dadfc97006ed771fad
sev-
noreply at scummvm.org
Fri Oct 25 21:18:12 UTC 2024
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:
1b04af560e AGS: Better usage of ManagedSurface new APIs
Commit: 1b04af560e5e10bb9beb21dadfc97006ed771fad
https://github.com/scummvm/scummvm/commit/1b04af560e5e10bb9beb21dadfc97006ed771fad
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-10-25T23:17:51+02:00
Commit Message:
AGS: Better usage of ManagedSurface new APIs
Changed paths:
engines/ags/shared/gfx/image.cpp
diff --git a/engines/ags/shared/gfx/image.cpp b/engines/ags/shared/gfx/image.cpp
index b8f41c01a49..51d3e2c7882 100644
--- a/engines/ags/shared/gfx/image.cpp
+++ b/engines/ags/shared/gfx/image.cpp
@@ -144,7 +144,8 @@ int save_bitmap(Common::WriteStream &out, BITMAP *bmp, const RGB *pal) {
Graphics::ManagedSurface &src = bmp->getSurface();
if (bmp->format.bytesPerPixel == 1) {
- Graphics::ManagedSurface temp(src, src.getBounds());
+ Graphics::ManagedSurface temp;
+ temp.copyFrom(src);
if (pal) {
byte palette[256 * 3];
for (int c = 0, i = 0; c < 256; ++c, i += 3) {
@@ -159,7 +160,8 @@ int save_bitmap(Common::WriteStream &out, BITMAP *bmp, const RGB *pal) {
Common::Point(0, 0));
} else {
// Copy from the source surface without alpha transparency
- Graphics::ManagedSurface temp(src, src.getBounds());
+ Graphics::ManagedSurface temp;
+ temp.copyFrom(src);
temp.format.aLoss = 8;
surface.rawBlitFrom(temp, Common::Rect(0, 0, src.w, src.h),
More information about the Scummvm-git-logs
mailing list