[Scummvm-git-logs] scummvm master -> 72463db407490328818ec8dbb52e3d819aad03f0
AndywinXp
noreply at scummvm.org
Mon Sep 26 22:09:53 UTC 2022
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:
72463db407 SCUMM: COMI: Fix texts rarely not clearing up after overrides
Commit: 72463db407490328818ec8dbb52e3d819aad03f0
https://github.com/scummvm/scummvm/commit/72463db407490328818ec8dbb52e3d819aad03f0
Author: AndywinXp (andywinxp at gmail.com)
Date: 2022-09-27T00:09:46+02:00
Commit Message:
SCUMM: COMI: Fix texts rarely not clearing up after overrides
This is a fix for a regression which unfortunately went unnoticed during the GUI implementation.
Since we moved stuff around in the main loop at that time, we also missed on something:
if Guybrush speaks at a certain camera position, and then ESC is pressed triggering an override,
if the override changes the camera position, the blastText rectangles will have to be updated, otherwise
we'd end up with an uncleared text on the screen. To reproduce the issue fixed here, start Part 2 and
press ESC as soon as Guybrush speaks.
Changed paths:
engines/scumm/string_v7.cpp
diff --git a/engines/scumm/string_v7.cpp b/engines/scumm/string_v7.cpp
index 3471f54731b..b57c21b44c8 100644
--- a/engines/scumm/string_v7.cpp
+++ b/engines/scumm/string_v7.cpp
@@ -511,6 +511,17 @@ void ScummEngine_v7::restoreBlastTextsRects() {
return;
for (int i = 0; i < _blastTextRectsQueue; i++) {
+ // Did the camera X coordinate change (i.e. because of an override)?
+ // If so, adjust the rects.
+ // Please note this wasn't done on the original, but we handle things
+ // a little bit differently on our end, so we need to account for this
+ // case manually.
+ if (camera._cur.x != camera._last.x) {
+ int diff = camera._cur.x - camera._last.x;
+ _blastTextQueue[i].rect.left -= diff;
+ _blastTextQueue[i].rect.right -= diff;
+ }
+
restoreBackground(_blastTextQueue[i].rect);
}
More information about the Scummvm-git-logs
mailing list