From fe1deb5a8cee2ef5a64aab4ecdc866d7eedd49fc Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 17 Sep 2021 22:21:38 +0200 Subject: [PATCH] CHAMBER: Furhter fixes to line blitting --- engines/chamber/cga.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/chamber/cga.cpp b/engines/chamber/cga.cpp index 2859ca69375..d84a1ced0a7 100644 --- a/engines/chamber/cga.cpp +++ b/engines/chamber/cga.cpp @@ -399,7 +399,7 @@ void CGA_DrawHLine(unsigned int x, unsigned int y, unsigned int l, unsigned char } } if (target == CGA_SCREENBUFFER) - CGA_blitToScreen(x, y, ol * 4, 1); + CGA_blitToScreen(x, y, ol, 1); } /* @@ -411,7 +411,7 @@ unsigned int CGA_DrawHLineWithEnds(unsigned int bmask, unsigned int bpix, unsign target[ofs] = (target[ofs] & (bmask >> 8)) | (bpix >> 8); memset(target + ofs + 1, color, l); target[ofs + 1 + l] = (target[ofs + 1 + l] & (bmask & 255)) | (bpix & 255); - uint oofs = ofs; + uint oofs = ofs + 1; ofs ^= CGA_ODD_LINES_OFS; if ((ofs & CGA_ODD_LINES_OFS) == 0) ofs += CGA_BYTES_PER_LINE;