[Scummvm-git-logs] scummvm master -> f218c6169d6f46c7769936e8248111ff57f7c3fd
elasota
noreply at scummvm.org
Fri Jun 9 21:45:26 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:
f218c6169d MTROPOLIS: Fix mToon transparency regression. Fix mToon out-of-range cel wraparound behavior.
Commit: f218c6169d6f46c7769936e8248111ff57f7c3fd
https://github.com/scummvm/scummvm/commit/f218c6169d6f46c7769936e8248111ff57f7c3fd
Author: elasota (ejlasota at gmail.com)
Date: 2023-06-09T17:44:57-04:00
Commit Message:
MTROPOLIS: Fix mToon transparency regression. Fix mToon out-of-range cel wraparound behavior.
Changed paths:
engines/mtropolis/elements.cpp
diff --git a/engines/mtropolis/elements.cpp b/engines/mtropolis/elements.cpp
index 1e1c53d3318..31a73e9b544 100644
--- a/engines/mtropolis/elements.cpp
+++ b/engines/mtropolis/elements.cpp
@@ -1432,7 +1432,7 @@ void MToonElement::render(Window *window) {
}
}
} else
- _renderSurface->format.ARGBToColor(255, transColorRGB8.r, transColorRGB8.g, transColorRGB8.b);
+ transColor = _renderSurface->format.ARGBToColor(255, transColorRGB8.r, transColorRGB8.g, transColorRGB8.b);
window->getSurface()->transBlitFrom(*_renderSurface, srcRect, destRect, transColor);
} else if (inkMode == VisualElementRenderProperties::kInkModeCopy || inkMode == VisualElementRenderProperties::kInkModeDefault) {
@@ -1649,11 +1649,11 @@ MiniscriptInstructionOutcome MToonElement::scriptSetCel(MiniscriptThread *thread
// in fact play from that cel even if it's out of range. The mariachi hint room near the
// Bureau booths in Obsidian depends on this behavior, since it sets the mToon cel and then
// sets the range based on the cel value.
-
- if (newCel < 1)
+ //
+ // We also need to loop around to 1 (exactly) if the range is exceeded. MTI depends on this
+ // in the piano to loop the sound bank display mToon.
+ if (newCel < 1 || newCel > maxCel)
newCel = 1;
- if (newCel > maxCel)
- newCel = maxCel;
if (newCel != _cel) {
_cel = newCel;
More information about the Scummvm-git-logs
mailing list