[Scummvm-git-logs] scummvm master -> 7fa7f68308e9e7bfd2a8a6de03b76db3dd069b4f
sev-
noreply at scummvm.org
Tue Oct 24 17:48:59 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:
7fa7f68308 SLUDGE: Fixes to ManagedSurface switch. Courtesy of ccawley2011
Commit: 7fa7f68308e9e7bfd2a8a6de03b76db3dd069b4f
https://github.com/scummvm/scummvm/commit/7fa7f68308e9e7bfd2a8a6de03b76db3dd069b4f
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-10-24T19:48:24+02:00
Commit Message:
SLUDGE: Fixes to ManagedSurface switch. Courtesy of ccawley2011
Changed paths:
engines/sludge/sprites.cpp
engines/sludge/transition.cpp
diff --git a/engines/sludge/sprites.cpp b/engines/sludge/sprites.cpp
index 42e43ae24f6..52bb72295e0 100644
--- a/engines/sludge/sprites.cpp
+++ b/engines/sludge/sprites.cpp
@@ -288,7 +288,7 @@ void GraphicsManager::pasteSpriteToBackDrop(int x1, int y1, Sprite &single, cons
// burnSpriteToBackDrop adds text in the colour specified by setBurnColour
// using the differing brightness levels of the font to achieve an anti-aliasing effect.
void GraphicsManager::burnSpriteToBackDrop(int x1, int y1, Sprite &single, const SpritePalette &fontPal) {
- if (!single.surface.w || !single.surface.h) {
+ if (!single.burnSurface.w || !single.burnSurface.h) {
// Skip surfaces with a 0 width/height (e.g. the space character on Out of Order) to avoid crashes in the blitting code.
return;
}
@@ -303,7 +303,7 @@ void GraphicsManager::burnSpriteToBackDrop(int x1, int y1, Sprite &single, const
x1 -= single.xhot;
y1 -= single.yhot - 1;
- Graphics::ManagedSurface tmp(&single.surface, DisposeAfterUse::NO);
+ Graphics::ManagedSurface tmp(&single.burnSurface, DisposeAfterUse::NO);
tmp.blendBlitTo(_backdropSurface, x1, y1, Graphics::FLIP_NONE, nullptr,
MS_RGB(_currentBurnR, _currentBurnG, _currentBurnB));
}
@@ -467,7 +467,7 @@ bool GraphicsManager::scaleSprite(Sprite &single, const SpritePalette &fontPal,
// Use Managed surface to scale and blit
if (!_zBuffer->numPanels) {
- Graphics::ManagedSurface tmp(&single.surface, DisposeAfterUse::NO);
+ Graphics::ManagedSurface tmp(blitted, DisposeAfterUse::NO);
tmp.blendBlitTo(_renderSurface, x1, y1, (mirror ? Graphics::FLIP_H : Graphics::FLIP_NONE), nullptr, MS_ARGB(255 - thisPerson->transparency, 255, 255, 255), diffX, diffY);
if (ptr) {
diff --git a/engines/sludge/transition.cpp b/engines/sludge/transition.cpp
index 30cf894f914..0b43149616e 100644
--- a/engines/sludge/transition.cpp
+++ b/engines/sludge/transition.cpp
@@ -87,7 +87,7 @@ void GraphicsManager::resetRandW() {
void GraphicsManager::reserveTransitionTexture() {
_transitionTexture = new Graphics::ManagedSurface;
- _transitionTexture->create(256, 256);
+ _transitionTexture->create(256, 256, Graphics::BlendBlit::getSupportedPixelFormat());
}
void GraphicsManager::transitionDisolve() {
More information about the Scummvm-git-logs
mailing list