diff --git a/graphics/VectorRenderer.h b/graphics/VectorRenderer.h index 5e42ef7aa88..57ec477edac 100644 --- a/graphics/VectorRenderer.h +++ b/graphics/VectorRenderer.h @@ -457,7 +457,7 @@ public: void drawCallback_BITMAP(const Common::Rect &area, const DrawStep &step) { uint16 x, y, w, h; stepGetPositions(step, area, x, y, w, h); - blitKeyBitmap(step.blitSrc, Common::Point(x, y)); + blitKeyBitmap(step.blitSrc, Common::Point(x, y), true); } void drawCallback_CROSS(const Common::Rect &area, const DrawStep &step) { @@ -508,9 +508,7 @@ public: */ virtual void blitSurface(const Graphics::ManagedSurface *source, const Common::Rect &r) = 0; - virtual void blitKeyBitmap(const Graphics::ManagedSurface *source, const Common::Point &p) = 0; - - virtual void blitManagedSurface(const Graphics::ManagedSurface *source, const Common::Point &p, bool themeTrans) = 0; + virtual void blitKeyBitmap(const Graphics::ManagedSurface *source, const Common::Point &p, bool themeTrans) = 0; /** * Draws a string into the screen. Wrapper for the Graphics::Font string drawing diff --git a/graphics/VectorRendererSpec.cpp b/graphics/VectorRendererSpec.cpp index 61c671d9c95..ffc262ed031 100644 --- a/graphics/VectorRendererSpec.cpp +++ b/graphics/VectorRendererSpec.cpp @@ -746,7 +746,7 @@ blitSurface(const Graphics::ManagedSurface *source, const Common::Rect &r) { template void VectorRendererSpec:: -blitManagedSurface(const Graphics::ManagedSurface *source, const Common::Point &p, bool themeTrans) { +blitKeyBitmap(const Graphics::ManagedSurface *source, const Common::Point &p, bool themeTrans) { Common::Rect drawRect(p.x, p.y, p.x + source->w, p.y + source->h); drawRect.clip(_clippingArea); drawRect.moveTo(0, 0); @@ -761,20 +761,6 @@ blitManagedSurface(const Graphics::ManagedSurface *source, const Common::Point & _activeSurface->blitFrom(*source, drawRect, p); } -template -void VectorRendererSpec:: -blitKeyBitmap(const Graphics::ManagedSurface *source, const Common::Point &p) { - Common::Rect drawRect(p.x, p.y, p.x + source->w, p.y + source->h); - drawRect.clip(_clippingArea); - drawRect.moveTo(0, 0); - - if (drawRect.isEmpty()) { - return; - } - - _activeSurface->transBlitFrom(*source, drawRect, p, _bitmapAlphaColor); -} - template void VectorRendererSpec:: applyScreenShading(GUI::ThemeEngine::ShadingStyle shadingStyle) { diff --git a/graphics/VectorRendererSpec.h b/graphics/VectorRendererSpec.h index 2b3783b4947..64c5876977c 100644 --- a/graphics/VectorRendererSpec.h +++ b/graphics/VectorRendererSpec.h @@ -89,8 +89,7 @@ public: void fillSurface() override; void blitSurface(const Graphics::ManagedSurface *source, const Common::Rect &r) override; - void blitManagedSurface(const Graphics::ManagedSurface *source, const Common::Point &p, bool themeTrans) override; - void blitKeyBitmap(const Graphics::ManagedSurface *source, const Common::Point &p) override; + void blitKeyBitmap(const Graphics::ManagedSurface *source, const Common::Point &p, bool themeTrans) override; void applyScreenShading(GUI::ThemeEngine::ShadingStyle shadingStyle) override; diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp index cbea606ae24..eb41aea06e5 100644 --- a/gui/ThemeEngine.cpp +++ b/gui/ThemeEngine.cpp @@ -1277,7 +1277,7 @@ void ThemeEngine::drawSurface(const Common::Point &p, const Graphics::ManagedSur return; _vectorRenderer->setClippingRect(_clip); - _vectorRenderer->blitManagedSurface(&surface, p, themeTrans); + _vectorRenderer->blitKeyBitmap(&surface, p, themeTrans); Common::Rect dirtyRect = Common::Rect(p.x, p.y, p.x + surface.w, p.y + surface.h); dirtyRect.clip(_clip);