[Scummvm-git-logs] scummvm master -> 38a1cb9963074a43e6ad573471f200b9aaad144b

sev- noreply at scummvm.org
Thu Jun 16 23:07:28 UTC 2022


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
83f66c6eb0 GRAPHICS: MACGUI: Fixed pattern origin calculation
38a1cb9963 DIRECTOR: Fix outlined QD sprites with pattern tiles


Commit: 83f66c6eb0e59c73ea7b208b55764c63b3dfb64c
    https://github.com/scummvm/scummvm/commit/83f66c6eb0e59c73ea7b208b55764c63b3dfb64c
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-06-17T01:07:14+02:00

Commit Message:
GRAPHICS: MACGUI: Fixed pattern origin calculation

Changed paths:
    graphics/macgui/macwindowmanager.cpp


diff --git a/graphics/macgui/macwindowmanager.cpp b/graphics/macgui/macwindowmanager.cpp
index 8502b511f98..ed4460bc7ce 100644
--- a/graphics/macgui/macwindowmanager.cpp
+++ b/graphics/macgui/macwindowmanager.cpp
@@ -748,7 +748,7 @@ void macDrawPixel(int x, int y, int color, void *data) {
 			uint yu = (uint)y;
 
 			*((T)p->surface->getBasePtr(xu, yu)) = p->invert ? ~(*((T)p->surface->getBasePtr(xu, yu))) :
-				(pat[(yu - p->fillOriginY) % 8] & (1 << (7 - (xu - p->fillOriginX) % 8))) ? color : p->bgColor;
+				(pat[(yu + p->fillOriginY) % 8] & (1 << (7 - (xu + p->fillOriginX) % 8))) ? color : p->bgColor;
 
 			if (p->mask)
 				*((T)p->mask->getBasePtr(xu, yu)) = 0xff;
@@ -765,7 +765,7 @@ void macDrawPixel(int x, int y, int color, void *data) {
 					uint xu = (uint)x; // for letting compiler optimize it
 					uint yu = (uint)y;
 					*((T)p->surface->getBasePtr(xu, yu)) = p->invert ? ~(*((T)p->surface->getBasePtr(xu, yu))) :
-						(pat[(yu - p->fillOriginY) % 8] & (1 << (7 - (xu - p->fillOriginX) % 8))) ? color : p->bgColor;
+						(pat[(yu + p->fillOriginY) % 8] & (1 << (7 + (xu - p->fillOriginX) % 8))) ? color : p->bgColor;
 
 					if (p->mask)
 						*((T)p->mask->getBasePtr(xu, yu)) = 0xff;


Commit: 38a1cb9963074a43e6ad573471f200b9aaad144b
    https://github.com/scummvm/scummvm/commit/38a1cb9963074a43e6ad573471f200b9aaad144b
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-06-17T01:07:14+02:00

Commit Message:
DIRECTOR: Fix outlined QD sprites with pattern tiles

Changed paths:
    engines/director/graphics.cpp


diff --git a/engines/director/graphics.cpp b/engines/director/graphics.cpp
index 2ca2898ce61..bf8cb39f3dc 100644
--- a/engines/director/graphics.cpp
+++ b/engines/director/graphics.cpp
@@ -449,8 +449,10 @@ void DirectorPlotData::inkBlitShape(Common::Rect &srcRect) {
 
 	uint strokePattern = 1;
 
-	if (ms->spriteType == kOutlinedRectangleSprite || ms->spriteType == kOutlinedRoundedRectangleSprite
-			|| ms->spriteType == kOutlinedOvalSprite)
+	bool outline = (ms->spriteType == kOutlinedRectangleSprite || ms->spriteType == kOutlinedRoundedRectangleSprite
+			|| ms->spriteType == kOutlinedOvalSprite);
+
+	if (outline)
 		strokePattern = ms->pattern;
 
 	Common::Rect strokeRect(MAX((int)srcRect.width() - ms->lineSize, 0), MAX((int)srcRect.height() - ms->lineSize, 0));
@@ -467,6 +469,10 @@ void DirectorPlotData::inkBlitShape(Common::Rect &srcRect) {
 		if (ms->lineSize <= 0)
 			break;
 		ms->pd = &plotStroke;
+
+		if (!outline)
+			ms->tile = nullptr;
+
 		Graphics::drawRect(strokeRect, ms->foreColor, d->getInkDrawPixel(), this);
 		break;
 	case kRoundedRectangleSprite:
@@ -477,6 +483,10 @@ void DirectorPlotData::inkBlitShape(Common::Rect &srcRect) {
 		if (ms->lineSize <= 0)
 			break;
 		ms->pd = &plotStroke;
+
+		if (!outline)
+			ms->tile = nullptr;
+
 		Graphics::drawRoundRect(strokeRect, 12, ms->foreColor, false, d->getInkDrawPixel(), this);
 		break;
 	case kOvalSprite:
@@ -487,6 +497,10 @@ void DirectorPlotData::inkBlitShape(Common::Rect &srcRect) {
 		if (ms->lineSize <= 0)
 			break;
 		ms->pd = &plotStroke;
+
+		if (!outline)
+			ms->tile = nullptr;
+
 		Graphics::drawEllipse(strokeRect.left, strokeRect.top, strokeRect.right, strokeRect.bottom, ms->foreColor, false, d->getInkDrawPixel(), this);
 		break;
 	case kLineTopBottomSprite:




More information about the Scummvm-git-logs mailing list