[Scummvm-git-logs] scummvm master -> 86d019284ec1f49dc0103157f427b9e300c5e9cb
sev-
noreply at scummvm.org
Wed Oct 1 09:10:48 UTC 2025
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
86d019284e WAGE: Made Design drawing more robust
Commit: 86d019284ec1f49dc0103157f427b9e300c5e9cb
https://github.com/scummvm/scummvm/commit/86d019284ec1f49dc0103157f427b9e300c5e9cb
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-10-01T11:09:01+02:00
Commit Message:
WAGE: Made Design drawing more robust
castleofert has a seemingly broken scene design FINALE, where it tries
to seek to a negative amount
And the same game hase scene 'F i n a l e' that uses negative bounding box
for placing bitmaps
Changed paths:
engines/wage/design.cpp
diff --git a/engines/wage/design.cpp b/engines/wage/design.cpp
index b04f591b05f..00e8aa3c6f8 100644
--- a/engines/wage/design.cpp
+++ b/engines/wage/design.cpp
@@ -612,7 +612,7 @@ void Design::drawBitmap(Graphics::ManagedSurface *surface, Common::SeekableReadS
}
}
- in.skip(numBytes);
+ in.seek(numBytes, SEEK_CUR);
if (!_boundsCalculationMode) {
Graphics::FloodFill ff(&tmp, kColorWhite, kColorGreen);
@@ -632,10 +632,15 @@ void Design::drawBitmap(Graphics::ManagedSurface *surface, Common::SeekableReadS
y = -y1;
for (; y < h && y1 + y < surface->h; y++) {
+ x = 0;
+ if (x1 < 0)
+ x = -x1;
+
byte *src = (byte *)tmp.getBasePtr(0, y);
- byte *dst = (byte *)surface->getBasePtr(x1, y1 + y);
- byte *mask = (byte *)_maskImage->getBasePtr(x1, y1 + y);
- for (x = 0; x < w; x++) {
+ byte *dst = (byte *)surface->getBasePtr(x1 + x, y1 + y);
+ byte *mask = (byte *)_maskImage->getBasePtr(x1 + x, y1 + y);
+
+ for (; x < w && x1 + x < surface->w; x++) {
if (*src != kColorGreen) {
*dst = *src;
*mask = kColorBlack;
More information about the Scummvm-git-logs
mailing list