From 3acf1116cd7eff2f98538f8457f724ac25b28df1 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Mon, 4 Apr 2016 07:54:02 -0400 Subject: TITANIC: Implemented STFont::copyRect --- engines/titanic/support/font.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/engines/titanic/support/font.cpp b/engines/titanic/support/font.cpp index 32652588c0..55865e792c 100644 --- a/engines/titanic/support/font.cpp +++ b/engines/titanic/support/font.cpp @@ -148,6 +148,14 @@ void STFont::copyRect(CVideoSurface *surface, const Common::Point &pt, Rect &rec uint16 *lineP = surface->getBasePtr(pt.x, pt.y); uint16 color = getColor(); + for (int yp = rect.top; yp < rect.bottom; ++yp, lineP += surface->getPitch()) { + uint16 *destP = lineP; + for (int xp = rect.left; xp < rect.right; ++xp, ++destP) { + const byte *srcP = _dataPtr + yp * _dataWidth + xp; + //surface->changePixel(destP, color, *srcP >> 3, 1); + } + } + surface->unlock(); } } -- cgit v1.2.3