From 149267613a0f9e4b04f63ee71865e5948871cf4f Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 4 Sep 2016 15:13:27 +0200 Subject: FULLPIPE: Implement FullpipeEngine::drawAlphaRectangle() --- engines/fullpipe/gfx.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 76d29f7aad..32d23048cd 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -1265,7 +1265,16 @@ DynamicPhase *Shadows::findSize(int width, int height) { } void FullpipeEngine::drawAlphaRectangle(int x1, int y1, int x2, int y2, int alpha) { - warning("STUB: FullpipeEngine::drawAlphaRectangle()"); + for (int y = y1; y < y2; y++) { + uint32 *ptr = (uint32 *)g_fp->_backgroundSurface.getBasePtr(0, y); + + for (int x = x1; x < x2; x++) { + uint32 color = *ptr; + color = (color & 0xffffff00) | (alpha & 0xff); + *ptr = color; + ptr++; + } + } } void FullpipeEngine::sceneFade(Scene *sc, bool direction) { -- cgit v1.2.3