[Scummvm-git-logs] scummvm master -> 671db8b3c03feb1ee1afc72ae14cfec8e5fc2706

sev- noreply at scummvm.org
Wed Jun 15 16:23:19 UTC 2022


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

Summary:
131138b9a7 DIRECTOR: Fix drawing outlined QD shapes, patterns were missing
1e082af6f8 DIRECTOR: Attempt to fix tile pattern origin. Still incorrect
671db8b3c0 DIRECTOR: Use Pattern Tiles for pattens #57-64


Commit: 131138b9a7e9137e11977c3480ef0e07d5784dbb
    https://github.com/scummvm/scummvm/commit/131138b9a7e9137e11977c3480ef0e07d5784dbb
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-06-15T18:23:05+02:00

Commit Message:
DIRECTOR: Fix drawing outlined QD shapes, patterns were missing

Changed paths:
    engines/director/graphics.cpp


diff --git a/engines/director/graphics.cpp b/engines/director/graphics.cpp
index 1d19f4d0fd5..5e3bbb34816 100644
--- a/engines/director/graphics.cpp
+++ b/engines/director/graphics.cpp
@@ -419,9 +419,15 @@ void DirectorPlotData::inkBlitShape(Common::Rect &srcRect) {
 	fillAreaRect.moveTo(srcRect.left, srcRect.top);
 	Graphics::MacPlotData plotFill(dst, nullptr, &d->getPatterns(), ms->pattern, srcRect.left, srcRect.top, 1, ms->backColor);
 
+	uint strokePattern = 1;
+
+	if (ms->spriteType == kOutlinedRectangleSprite || ms->spriteType == kOutlinedRoundedRectangleSprite
+			|| ms->spriteType == kOutlinedOvalSprite)
+		strokePattern = ms->pattern;
+
 	Common::Rect strokeRect(MAX((int)srcRect.width() - ms->lineSize, 0), MAX((int)srcRect.height() - ms->lineSize, 0));
 	strokeRect.moveTo(srcRect.left, srcRect.top);
-	Graphics::MacPlotData plotStroke(dst, nullptr, &d->getPatterns(), 1, strokeRect.left, strokeRect.top, ms->lineSize, ms->backColor);
+	Graphics::MacPlotData plotStroke(dst, nullptr, &d->getPatterns(), strokePattern, strokeRect.left, strokeRect.top, ms->lineSize, ms->backColor);
 
 	switch (ms->spriteType) {
 	case kRectangleSprite:


Commit: 1e082af6f8d975e74821cee2e391cef83e511b78
    https://github.com/scummvm/scummvm/commit/1e082af6f8d975e74821cee2e391cef83e511b78
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-06-15T18:23:06+02:00

Commit Message:
DIRECTOR: Attempt to fix tile pattern origin. Still incorrect

Changed paths:
    engines/director/graphics.cpp


diff --git a/engines/director/graphics.cpp b/engines/director/graphics.cpp
index 5e3bbb34816..33f744e063d 100644
--- a/engines/director/graphics.cpp
+++ b/engines/director/graphics.cpp
@@ -28,6 +28,7 @@
 #include "director/castmember.h"
 #include "director/movie.h"
 #include "director/images.h"
+#include "director/window.h"
 
 namespace Director {
 
@@ -415,9 +416,17 @@ void DirectorPlotData::inkBlitShape(Common::Rect &srcRect) {
 		break;
 	}
 
+	Common::Point wpos;
+	Movie *movie = g_director->getCurrentMovie();
+
+	if (g_director->_wm->_mode & Graphics::kWMModeNoDesktop)
+		wpos = Common::Point(movie->getCast()->_movieRect.left, movie->getCast()->_movieRect.top);
+	else
+		wpos = movie->getWindow()->getAbsolutePos();
+
 	Common::Rect fillAreaRect((int)srcRect.width(), (int)srcRect.height());
 	fillAreaRect.moveTo(srcRect.left, srcRect.top);
-	Graphics::MacPlotData plotFill(dst, nullptr, &d->getPatterns(), ms->pattern, srcRect.left, srcRect.top, 1, ms->backColor);
+	Graphics::MacPlotData plotFill(dst, nullptr, &d->getPatterns(), ms->pattern, srcRect.left + wpos.x, srcRect.top + wpos.y, 1, ms->backColor);
 
 	uint strokePattern = 1;
 
@@ -427,7 +436,7 @@ void DirectorPlotData::inkBlitShape(Common::Rect &srcRect) {
 
 	Common::Rect strokeRect(MAX((int)srcRect.width() - ms->lineSize, 0), MAX((int)srcRect.height() - ms->lineSize, 0));
 	strokeRect.moveTo(srcRect.left, srcRect.top);
-	Graphics::MacPlotData plotStroke(dst, nullptr, &d->getPatterns(), strokePattern, strokeRect.left, strokeRect.top, ms->lineSize, ms->backColor);
+	Graphics::MacPlotData plotStroke(dst, nullptr, &d->getPatterns(), strokePattern, strokeRect.left + wpos.x, strokeRect.top + wpos.y, ms->lineSize, ms->backColor);
 
 	switch (ms->spriteType) {
 	case kRectangleSprite:


Commit: 671db8b3c03feb1ee1afc72ae14cfec8e5fc2706
    https://github.com/scummvm/scummvm/commit/671db8b3c03feb1ee1afc72ae14cfec8e5fc2706
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-06-15T18:23:06+02:00

Commit Message:
DIRECTOR: Use Pattern Tiles for pattens #57-64

Changed paths:
    engines/director/sprite.cpp


diff --git a/engines/director/sprite.cpp b/engines/director/sprite.cpp
index b3281250997..0cfa44851ed 100644
--- a/engines/director/sprite.cpp
+++ b/engines/director/sprite.cpp
@@ -215,6 +215,11 @@ MacShape *Sprite::getShape() {
 	shape->tile = nullptr;
 	shape->tileRect = nullptr;
 
+	if (shape->pattern > 56 && shape->pattern <= 64) {
+		shape->tile = g_director->getTile(shape->pattern - 57);
+		shape->tileRect = &g_director->getTileRect(shape->pattern - 57);
+	}
+
 	if (g_director->getVersion() >= 300 && shape->spriteType == kCastMemberSprite) {
 		if (!_cast) {
 			warning("Sprite::getShape(): kCastMemberSprite has no cast defined");




More information about the Scummvm-git-logs mailing list