[Scummvm-git-logs] scummvm master -> aa345327427197c33f155d87fff9c8a3ff059ce3

sev- noreply at scummvm.org
Mon Jun 13 16:12:34 UTC 2022


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

Summary:
c95d4245dc DIRECTOR: Simplify DirectorPlotData
1669e27dbb DIRECTOR: Extracted default Director tiles
43a71055f5 DIRECTOR: Decompress built-in tiles
aa34532742 DIRECTOR: Added built-in tile drawing to tests


Commit: c95d4245dc9aba812bb93d653a402b762fe678fd
    https://github.com/scummvm/scummvm/commit/c95d4245dc9aba812bb93d653a402b762fe678fd
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-06-13T18:12:22+02:00

Commit Message:
DIRECTOR: Simplify DirectorPlotData

Changed paths:
    engines/director/channel.cpp
    engines/director/director.h
    engines/director/graphics.cpp


diff --git a/engines/director/channel.cpp b/engines/director/channel.cpp
index a5ddb1fd875..c95516cde7a 100644
--- a/engines/director/channel.cpp
+++ b/engines/director/channel.cpp
@@ -106,9 +106,9 @@ Channel::~Channel() {
 }
 
 DirectorPlotData Channel::getPlotData() {
-	DirectorPlotData pd(g_director->_wm, _sprite->_spriteType, _sprite->_ink, _sprite->_blend, _sprite->getBackColor(), _sprite->getForeColor());
-	pd.colorWhite = pd._wm->_colorWhite;
-	pd.colorBlack = pd._wm->_colorBlack;
+	DirectorPlotData pd(g_director, _sprite->_spriteType, _sprite->_ink, _sprite->_blend, _sprite->getBackColor(), _sprite->getForeColor());
+	pd.colorWhite = pd.d->_wm->_colorWhite;
+	pd.colorBlack = pd.d->_wm->_colorBlack;
 	pd.dst = nullptr;
 
 	pd.srf = getSurface();
diff --git a/engines/director/director.h b/engines/director/director.h
index e272721f971..f3771906e4e 100644
--- a/engines/director/director.h
+++ b/engines/director/director.h
@@ -129,65 +129,6 @@ struct MacShape {
 
 const int SCALE_THRESHOLD = 0x100;
 
-// An extension of MacPlotData for interfacing with inks and patterns without
-// needing extra surfaces.
-struct DirectorPlotData {
-	Graphics::MacWindowManager *_wm;
-	Graphics::ManagedSurface *dst;
-
-	Common::Rect destRect;
-	Common::Point srcPoint;
-
-	Graphics::ManagedSurface *srf;
-	MacShape *ms;
-
-	SpriteType sprite;
-	InkType ink;
-	uint32 colorWhite;
-	uint32 colorBlack;
-	int alpha;
-
-	uint32 backColor;
-	uint32 foreColor;
-	bool applyColor;
-
-	// graphics.cpp
-	void setApplyColor();
-	uint32 preprocessColor(uint32 src);
-	void inkBlitShape(Common::Rect &srcRect);
-	void inkBlitSurface(Common::Rect &srcRect, const Graphics::Surface *mask);
-	void inkBlitStretchSurface(Common::Rect &srcRect, const Graphics::Surface *mask);
-
-	DirectorPlotData(Graphics::MacWindowManager *w, SpriteType s, InkType i, int a, uint32 b, uint32 f) : _wm(w), sprite(s), ink(i), alpha(a), backColor(b), foreColor(f) {
-		srf = nullptr;
-		ms = nullptr;
-		dst = nullptr;
-		colorWhite = w->_colorWhite;
-		colorBlack = w->_colorBlack;
-		applyColor = false;
-	}
-
-	DirectorPlotData(const DirectorPlotData &old) : _wm(old._wm), sprite(old.sprite),
-	                                                ink(old.ink), alpha(old.alpha),
-	                                                backColor(old.backColor), foreColor(old.foreColor),
-	                                                srf(old.srf), dst(old.dst),
-	                                                destRect(old.destRect), srcPoint(old.srcPoint),
-	                                                colorWhite(old.colorWhite), colorBlack(old.colorBlack),
-	                                                applyColor(old.applyColor) {
-		if (old.ms) {
-			ms = new MacShape(*old.ms);
-		} else {
-			ms = nullptr;
-		}
-	}
-
-	DirectorPlotData &operator=(const DirectorPlotData &);
-
-	~DirectorPlotData() {
-		delete ms;
-	}
-};
-
 class DirectorEngine : public ::Engine {
 public:
 	DirectorEngine(OSystem *syst, const DirectorGameDescription *gameDesc);
@@ -303,6 +244,65 @@ private:
 	StartOptions _options;
 };
 
+// An extension of MacPlotData for interfacing with inks and patterns without
+// needing extra surfaces.
+struct DirectorPlotData {
+	DirectorEngine *d;
+	Graphics::ManagedSurface *dst;
+
+	Common::Rect destRect;
+	Common::Point srcPoint;
+
+	Graphics::ManagedSurface *srf;
+	MacShape *ms;
+
+	SpriteType sprite;
+	InkType ink;
+	uint32 colorWhite;
+	uint32 colorBlack;
+	int alpha;
+
+	uint32 backColor;
+	uint32 foreColor;
+	bool applyColor;
+
+	// graphics.cpp
+	void setApplyColor();
+	uint32 preprocessColor(uint32 src);
+	void inkBlitShape(Common::Rect &srcRect);
+	void inkBlitSurface(Common::Rect &srcRect, const Graphics::Surface *mask);
+	void inkBlitStretchSurface(Common::Rect &srcRect, const Graphics::Surface *mask);
+
+	DirectorPlotData(DirectorEngine *d_, SpriteType s, InkType i, int a, uint32 b, uint32 f) : d(d_), sprite(s), ink(i), alpha(a), backColor(b), foreColor(f) {
+		srf = nullptr;
+		ms = nullptr;
+		dst = nullptr;
+		colorWhite = d->_wm->_colorWhite;
+		colorBlack = d->_wm->_colorBlack;
+		applyColor = false;
+	}
+
+	DirectorPlotData(const DirectorPlotData &old) : d(old.d), sprite(old.sprite),
+	                                                ink(old.ink), alpha(old.alpha),
+	                                                backColor(old.backColor), foreColor(old.foreColor),
+	                                                srf(old.srf), dst(old.dst),
+	                                                destRect(old.destRect), srcPoint(old.srcPoint),
+	                                                colorWhite(old.colorWhite), colorBlack(old.colorBlack),
+	                                                applyColor(old.applyColor) {
+		if (old.ms) {
+			ms = new MacShape(*old.ms);
+		} else {
+			ms = nullptr;
+		}
+	}
+
+	DirectorPlotData &operator=(const DirectorPlotData &);
+
+	~DirectorPlotData() {
+		delete ms;
+	}
+};
+
 extern DirectorEngine *g_director;
 extern Debugger *g_debugger;
 extern uint32 wmMode;
diff --git a/engines/director/graphics.cpp b/engines/director/graphics.cpp
index 6806cfa9b7d..0f5be4d14bb 100644
--- a/engines/director/graphics.cpp
+++ b/engines/director/graphics.cpp
@@ -139,6 +139,7 @@ void DirectorEngine::draw() {
 template <typename T>
 void inkDrawPixel(int x, int y, int src, void *data) {
 	DirectorPlotData *p = (DirectorPlotData *)data;
+	Graphics::MacWindowManager *wm = p->d->_wm;
 
 	if (!p->destRect.contains(x, y))
 		return;
@@ -152,7 +153,7 @@ void inkDrawPixel(int x, int y, int src, void *data) {
 		// Get the pixel that macDrawPixel will give us, but store it to apply the
 		// ink later
 		tmpDst = *dst;
-		(p->_wm->getDrawPixel())(x, y, src, p->ms->pd);
+		(wm->getDrawPixel())(x, y, src, p->ms->pd);
 		src = *dst;
 
 		*dst = tmpDst;
@@ -161,15 +162,15 @@ void inkDrawPixel(int x, int y, int src, void *data) {
 		byte rSrc, gSrc, bSrc;
 		byte rDst, gDst, bDst;
 
-		g_director->_wm->decomposeColor(src, rSrc, gSrc, bSrc);
-		g_director->_wm->decomposeColor(*dst, rDst, gDst, bDst);
+		wm->decomposeColor(src, rSrc, gSrc, bSrc);
+		wm->decomposeColor(*dst, rDst, gDst, bDst);
 
 		double alpha = (double)p->alpha / 100.0;
 		rDst = static_cast<byte>((rSrc * alpha) + (rDst * (1.0 - alpha)));
 		gDst = static_cast<byte>((gSrc * alpha) + (gDst * (1.0 - alpha)));
 		bDst = static_cast<byte>((bSrc * alpha) + (bDst * (1.0 - alpha)));
 
-		*dst = p->_wm->findBestColor(rDst, gDst, bDst);
+		*dst = wm->findBestColor(rDst, gDst, bDst);
 		return;
 	}
 
@@ -189,14 +190,14 @@ void inkDrawPixel(int x, int y, int src, void *data) {
 			byte rFor, gFor, bFor;
 			byte rBak, gBak, bBak;
 
-			g_director->_wm->decomposeColor(src, rSrc, gSrc, bSrc);
-			g_director->_wm->decomposeColor(*dst, rDst, gDst, bDst);
-			g_director->_wm->decomposeColor(p->foreColor, rFor, gFor, bFor);
-			g_director->_wm->decomposeColor(p->backColor, rBak, gBak, bBak);
+			wm->decomposeColor(src, rSrc, gSrc, bSrc);
+			wm->decomposeColor(*dst, rDst, gDst, bDst);
+			wm->decomposeColor(p->foreColor, rFor, gFor, bFor);
+			wm->decomposeColor(p->backColor, rBak, gBak, bBak);
 
-			*dst = p->_wm->findBestColor((rSrc | rFor) & (~rSrc | rBak),
-																	 (gSrc | gFor) & (~gSrc | gBak),
-																	 (bSrc | bFor) & (~bSrc | bBak));
+			*dst = wm->findBestColor((rSrc | rFor) & (~rSrc | rBak),
+									 (gSrc | gFor) & (~gSrc | gBak),
+									 (bSrc | bFor) & (~bSrc | bBak));
 		} else {
 			*dst = src;
 		}
@@ -210,14 +211,14 @@ void inkDrawPixel(int x, int y, int src, void *data) {
 			byte rFor, gFor, bFor;
 			byte rBak, gBak, bBak;
 
-			g_director->_wm->decomposeColor(src, rSrc, gSrc, bSrc);
-			g_director->_wm->decomposeColor(*dst, rDst, gDst, bDst);
-			g_director->_wm->decomposeColor(p->foreColor, rFor, gFor, bFor);
-			g_director->_wm->decomposeColor(p->backColor, rBak, gBak, bBak);
+			wm->decomposeColor(src, rSrc, gSrc, bSrc);
+			wm->decomposeColor(*dst, rDst, gDst, bDst);
+			wm->decomposeColor(p->foreColor, rFor, gFor, bFor);
+			wm->decomposeColor(p->backColor, rBak, gBak, bBak);
 
-			*dst = p->_wm->findBestColor((~rSrc | rFor) & (rSrc | rBak),
-																	 (~gSrc | gFor) & (gSrc | gBak),
-																	 (~bSrc | bFor) & (bSrc | bBak));
+			*dst = wm->findBestColor((~rSrc | rFor) & (rSrc | rBak),
+									 (~gSrc | gFor) & (gSrc | gBak),
+									 (~bSrc | bFor) & (bSrc | bBak));
 		} else {
 			*dst = src;
 		}
@@ -245,32 +246,32 @@ void inkDrawPixel(int x, int y, int src, void *data) {
 		byte rSrc, gSrc, bSrc;
 		byte rDst, gDst, bDst;
 
-		g_director->_wm->decomposeColor(src, rSrc, gSrc, bSrc);
-		g_director->_wm->decomposeColor(*dst, rDst, gDst, bDst);
+		wm->decomposeColor(src, rSrc, gSrc, bSrc);
+		wm->decomposeColor(*dst, rDst, gDst, bDst);
 
 		switch (p->ink) {
 		case kInkTypeBlend:
-				*dst = p->_wm->findBestColor((rSrc + rDst) / 2, (gSrc + gDst) / 2, (bSrc + bDst) / 2);
+				*dst = wm->findBestColor((rSrc + rDst) / 2, (gSrc + gDst) / 2, (bSrc + bDst) / 2);
 			break;
 		case kInkTypeAddPin:
-				*dst = p->_wm->findBestColor(MIN((rSrc + rDst), 0xff), MIN((gSrc + gDst), 0xff), MIN((bSrc + bDst), 0xff));
+				*dst = wm->findBestColor(MIN((rSrc + rDst), 0xff), MIN((gSrc + gDst), 0xff), MIN((bSrc + bDst), 0xff));
 			break;
 		case kInkTypeAdd:
 			// in basilisk, D3.1 is exactly using this method, adding color directly without preventing the overflow.
 			// but i think min(src + dst, 255) will give us a better visual effect
-				*dst = p->_wm->findBestColor(rSrc + rDst, gSrc + gDst, bSrc + bDst);
+				*dst = wm->findBestColor(rSrc + rDst, gSrc + gDst, bSrc + bDst);
 			break;
 		case kInkTypeSubPin:
-				*dst = p->_wm->findBestColor(MAX(rSrc - rDst, 0), MAX(gSrc - gDst, 0), MAX(bSrc - bDst, 0));
+				*dst = wm->findBestColor(MAX(rSrc - rDst, 0), MAX(gSrc - gDst, 0), MAX(bSrc - bDst, 0));
 			break;
 		case kInkTypeLight:
-				*dst = p->_wm->findBestColor(MAX(rSrc, rDst), MAX(gSrc, gDst), MAX(bSrc, bDst));
+				*dst = wm->findBestColor(MAX(rSrc, rDst), MAX(gSrc, gDst), MAX(bSrc, bDst));
 			break;
 		case kInkTypeSub:
-				*dst = p->_wm->findBestColor(abs(rSrc - rDst) % 0xff + 1, abs(gSrc - gDst) % 0xff + 1, abs(bSrc - bDst) % 0xff + 1);
+				*dst = wm->findBestColor(abs(rSrc - rDst) % 0xff + 1, abs(gSrc - gDst) % 0xff + 1, abs(bSrc - bDst) % 0xff + 1);
 			break;
 		case kInkTypeDark:
-				*dst = p->_wm->findBestColor(MIN(rSrc, rDst), MIN(gSrc, gDst), MIN(bSrc, bDst));
+				*dst = wm->findBestColor(MIN(rSrc, rDst), MIN(gSrc, gDst), MIN(bSrc, bDst));
 			break;
 		default:
 			break;
@@ -357,51 +358,51 @@ void DirectorPlotData::inkBlitShape(Common::Rect &srcRect) {
 
 	Common::Rect fillAreaRect((int)srcRect.width(), (int)srcRect.height());
 	fillAreaRect.moveTo(srcRect.left, srcRect.top);
-	Graphics::MacPlotData plotFill(dst, nullptr, &g_director->getPatterns(), ms->pattern, srcRect.left, srcRect.top, 1, ms->backColor);
+	Graphics::MacPlotData plotFill(dst, nullptr, &d->getPatterns(), ms->pattern, srcRect.left, srcRect.top, 1, ms->backColor);
 
 	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, &g_director->getPatterns(), 1, strokeRect.left, strokeRect.top, ms->lineSize, ms->backColor);
+	Graphics::MacPlotData plotStroke(dst, nullptr, &d->getPatterns(), 1, strokeRect.left, strokeRect.top, ms->lineSize, ms->backColor);
 
 	switch (ms->spriteType) {
 	case kRectangleSprite:
 		ms->pd = &plotFill;
-		Graphics::drawFilledRect(fillAreaRect, ms->foreColor, g_director->getInkDrawPixel(), this);
+		Graphics::drawFilledRect(fillAreaRect, ms->foreColor, d->getInkDrawPixel(), this);
 		// fall through
 	case kOutlinedRectangleSprite:
 		// if we have lineSize <= 0, means we are not drawing anything. so we may return directly.
 		if (ms->lineSize <= 0)
 			break;
 		ms->pd = &plotStroke;
-		Graphics::drawRect(strokeRect, ms->foreColor, g_director->getInkDrawPixel(), this);
+		Graphics::drawRect(strokeRect, ms->foreColor, d->getInkDrawPixel(), this);
 		break;
 	case kRoundedRectangleSprite:
 		ms->pd = &plotFill;
-		Graphics::drawRoundRect(fillAreaRect, 12, ms->foreColor, true, g_director->getInkDrawPixel(), this);
+		Graphics::drawRoundRect(fillAreaRect, 12, ms->foreColor, true, d->getInkDrawPixel(), this);
 		// fall through
 	case kOutlinedRoundedRectangleSprite:
 		if (ms->lineSize <= 0)
 			break;
 		ms->pd = &plotStroke;
-		Graphics::drawRoundRect(strokeRect, 12, ms->foreColor, false, g_director->getInkDrawPixel(), this);
+		Graphics::drawRoundRect(strokeRect, 12, ms->foreColor, false, d->getInkDrawPixel(), this);
 		break;
 	case kOvalSprite:
 		ms->pd = &plotFill;
-		Graphics::drawEllipse(fillAreaRect.left, fillAreaRect.top, fillAreaRect.right, fillAreaRect.bottom, ms->foreColor, true, g_director->getInkDrawPixel(), this);
+		Graphics::drawEllipse(fillAreaRect.left, fillAreaRect.top, fillAreaRect.right, fillAreaRect.bottom, ms->foreColor, true, d->getInkDrawPixel(), this);
 		// fall through
 	case kOutlinedOvalSprite:
 		if (ms->lineSize <= 0)
 			break;
 		ms->pd = &plotStroke;
-		Graphics::drawEllipse(strokeRect.left, strokeRect.top, strokeRect.right, strokeRect.bottom, ms->foreColor, false, g_director->getInkDrawPixel(), this);
+		Graphics::drawEllipse(strokeRect.left, strokeRect.top, strokeRect.right, strokeRect.bottom, ms->foreColor, false, d->getInkDrawPixel(), this);
 		break;
 	case kLineTopBottomSprite:
 		ms->pd = &plotStroke;
-		Graphics::drawLine(strokeRect.left, strokeRect.top, strokeRect.right, strokeRect.bottom, ms->foreColor, g_director->getInkDrawPixel(), this);
+		Graphics::drawLine(strokeRect.left, strokeRect.top, strokeRect.right, strokeRect.bottom, ms->foreColor, d->getInkDrawPixel(), this);
 		break;
 	case kLineBottomTopSprite:
 		ms->pd = &plotStroke;
-		Graphics::drawLine(strokeRect.left, strokeRect.bottom, strokeRect.right, strokeRect.top, ms->foreColor, g_director->getInkDrawPixel(), this);
+		Graphics::drawLine(strokeRect.left, strokeRect.bottom, strokeRect.right, strokeRect.top, ms->foreColor, d->getInkDrawPixel(), this);
 		break;
 	default:
 		warning("DirectorPlotData::inkBlitShape: Expected shape type but got type %d", ms->spriteType);
@@ -418,13 +419,13 @@ void DirectorPlotData::inkBlitSurface(Common::Rect &srcRect, const Graphics::Sur
 
 	srcPoint.y = abs(srcRect.top - destRect.top);
 	for (int i = 0; i < destRect.height(); i++, srcPoint.y++) {
-		if (_wm->_pixelformat.bytesPerPixel == 1) {
+		if (d->_wm->_pixelformat.bytesPerPixel == 1) {
 			srcPoint.x = abs(srcRect.left - destRect.left);
 			const byte *msk = mask ? (const byte *)mask->getBasePtr(srcPoint.x, srcPoint.y) : nullptr;
 
 			for (int j = 0; j < destRect.width(); j++, srcPoint.x++) {
 				if (!mask || (msk && !(*msk++))) {
-					(g_director->getInkDrawPixel())(destRect.left + j, destRect.top + i,
+					(d->getInkDrawPixel())(destRect.left + j, destRect.top + i,
 											preprocessColor(*((byte *)srf->getBasePtr(srcPoint.x, srcPoint.y))), this);
 				}
 			}
@@ -434,7 +435,7 @@ void DirectorPlotData::inkBlitSurface(Common::Rect &srcRect, const Graphics::Sur
 
 			for (int j = 0; j < destRect.width(); j++, srcPoint.x++) {
 				if (!mask || (msk && !(*msk++))) {
-					(g_director->getInkDrawPixel())(destRect.left + j, destRect.top + i,
+					(d->getInkDrawPixel())(destRect.left + j, destRect.top + i,
 											preprocessColor(*((uint32 *)srf->getBasePtr(srcPoint.x, srcPoint.y))), this);
 				}
 			}
@@ -456,13 +457,13 @@ void DirectorPlotData::inkBlitStretchSurface(Common::Rect &srcRect, const Graphi
 	srcPoint.y = abs(srcRect.top - destRect.top);
 
 	for (int i = 0, scaleYCtr = 0; i < destRect.height(); i++, scaleYCtr += scaleY, srcPoint.y++) {
-		if (_wm->_pixelformat.bytesPerPixel == 1) {
+		if (d->_wm->_pixelformat.bytesPerPixel == 1) {
 			srcPoint.x = abs(srcRect.left - destRect.left);
 			const byte *msk = mask ? (const byte *)mask->getBasePtr(srcPoint.x, srcPoint.y) : nullptr;
 
 			for (int xCtr = 0, scaleXCtr = 0; xCtr < destRect.width(); xCtr++, scaleXCtr += scaleX, srcPoint.x++) {
 				if (!mask || !(*msk++)) {
-				(g_director->getInkDrawPixel())(destRect.left + xCtr, destRect.top + i,
+				(d->getInkDrawPixel())(destRect.left + xCtr, destRect.top + i,
 										preprocessColor(*((byte *)srf->getBasePtr(scaleXCtr / SCALE_THRESHOLD, scaleYCtr / SCALE_THRESHOLD))), this);
 				}
 			}
@@ -472,7 +473,7 @@ void DirectorPlotData::inkBlitStretchSurface(Common::Rect &srcRect, const Graphi
 
 			for (int xCtr = 0, scaleXCtr = 0; xCtr < destRect.width(); xCtr++, scaleXCtr += scaleX, srcPoint.x++) {
 				if (!mask || !(*msk++)) {
-				(g_director->getInkDrawPixel())(destRect.left + xCtr, destRect.top + i,
+				(d->getInkDrawPixel())(destRect.left + xCtr, destRect.top + i,
 										preprocessColor(*((int *)srf->getBasePtr(scaleXCtr / SCALE_THRESHOLD, scaleYCtr / SCALE_THRESHOLD))), this);
 				}
 			}


Commit: 1669e27dbbfcfb5d1bc969c63af9476096f6f8b8
    https://github.com/scummvm/scummvm/commit/1669e27dbbfcfb5d1bc969c63af9476096f6f8b8
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-06-13T18:12:22+02:00

Commit Message:
DIRECTOR: Extracted default Director tiles

Changed paths:
    engines/director/graphics-data.h


diff --git a/engines/director/graphics-data.h b/engines/director/graphics-data.h
index e9499467083..aa99e56d10c 100644
--- a/engines/director/graphics-data.h
+++ b/engines/director/graphics-data.h
@@ -711,3 +711,249 @@ static const byte mouseDown[] = {
 	3, 0, 1, 1, 1, 1, 1, 1, 1, 0, 3, 3, 3, 3, 3, 3,
 	3, 3, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3
 };
+
+static const byte tile1[] = {
+	0x07, 0xce, 0xf0, 0xcf, 0xef, 0xcf, 0xef, 0xcf, 0xf0, 0xfc, 0xce, 0x0d, 0xef, 0xce, 0xcf, 0xd4,
+	0xcf, 0xef, 0xcf, 0xef, 0xcf, 0xf0, 0xcf, 0xf0, 0xd5, 0xcf, 0xfe, 0xd5, 0x15, 0xf1, 0xd5, 0xc7,
+	0xc7, 0xcd, 0xc7, 0xcd, 0xc7, 0xcd, 0xc7, 0xcd, 0xc7, 0xce, 0xc7, 0xcd, 0xce, 0xcd, 0xce, 0xce,
+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 0xff, 0xfe, 0xac, 0x56, 0xfc, 0xfa,
+	0xfe, 0xac, 0xff, 0xfc, 0x56, 0xfd, 0x56, 0xfc, 0xfe, 0xfd, 0xfd, 0xfd, 0xfd, 0xf8, 0xfb, 0xfa,
+	0xac, 0xac, 0xfe, 0xfc, 0x56, 0xfd, 0x81, 0x81, 0xfd, 0xac, 0xfe, 0xfe, 0xac, 0x56, 0xfd, 0x56,
+	0xac, 0xfb, 0xfd, 0xfd, 0xac, 0xfe, 0xfa, 0xf9, 0xfe, 0xfc, 0xfb, 0xac, 0xfe, 0xfc, 0xff, 0x56,
+	0xfc, 0xfc, 0xfe, 0xfe, 0xff, 0xac, 0xfc, 0xf9, 0xfe, 0x81, 0xfc, 0xfd, 0xff, 0xfd, 0xff, 0xf9,
+	0xff, 0xfd, 0xfe, 0xfd, 0xff, 0xff, 0xfb, 0xfa, 0xac, 0xfd, 0xfd, 0xac, 0xff, 0xff, 0xfb, 0x81
+};
+
+struct TileStruct {
+	int w, h;
+	const byte *ptr;
+	uint size;
+} static const builtinTiles[8] = {
+	{ 64, 32, tile1, ARRAYSIZE(tile1) },
+	{ 16, 16, tile2, ARRAYSIZE(tile2) },
+	{ 16, 16, tile3, ARRAYSIZE(tile3) },
+	{ 16, 16, tile4, ARRAYSIZE(tile4) },
+	{ 16, 16, tile5, ARRAYSIZE(tile5) },
+	{ 16, 16, tile6, ARRAYSIZE(tile6) },
+	{ 16, 16, tile7, ARRAYSIZE(tile7) },
+	{ 16, 16, tile8, ARRAYSIZE(tile8) },
+};


Commit: 43a71055f58665d3d814670d27ce7a6196f59680
    https://github.com/scummvm/scummvm/commit/43a71055f58665d3d814670d27ce7a6196f59680
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-06-13T18:12:22+02:00

Commit Message:
DIRECTOR: Decompress built-in tiles

Changed paths:
    engines/director/director.h
    engines/director/graphics-data.h
    engines/director/graphics.cpp
    engines/director/types.h


diff --git a/engines/director/director.h b/engines/director/director.h
index f3771906e4e..dd19745f45e 100644
--- a/engines/director/director.h
+++ b/engines/director/director.h
@@ -236,6 +236,7 @@ private:
 
 	Graphics::MacPatterns _director3Patterns;
 	Graphics::MacPatterns _director3QuickDrawPatterns;
+	Graphics::Surface *_builtinTiles[kNumBuilitinTiles];
 
 	Common::HashMap<int, PaletteV4> _loadedPalettes;
 
diff --git a/engines/director/graphics-data.h b/engines/director/graphics-data.h
index aa99e56d10c..751a9c308f1 100644
--- a/engines/director/graphics-data.h
+++ b/engines/director/graphics-data.h
@@ -947,7 +947,7 @@ struct TileStruct {
 	int w, h;
 	const byte *ptr;
 	uint size;
-} static const builtinTiles[8] = {
+} static const builtinTiles[kNumBuilitinTiles] = {
 	{ 64, 32, tile1, ARRAYSIZE(tile1) },
 	{ 16, 16, tile2, ARRAYSIZE(tile2) },
 	{ 16, 16, tile3, ARRAYSIZE(tile3) },
diff --git a/engines/director/graphics.cpp b/engines/director/graphics.cpp
index 0f5be4d14bb..77526889d3e 100644
--- a/engines/director/graphics.cpp
+++ b/engines/director/graphics.cpp
@@ -20,6 +20,7 @@
  */
 
 #include "common/system.h"
+#include "common/memstream.h"
 #include "graphics/macgui/macwindowmanager.h"
 
 #include "director/director.h"
@@ -48,6 +49,42 @@ void DirectorEngine::loadPatterns() {
 
 	for (int i = 0; i < ARRAYSIZE(director3QuickDrawPatterns); i++)
 		_director3QuickDrawPatterns.push_back(director3QuickDrawPatterns[i]);
+
+	for (int i = 0; i < ARRAYSIZE(builtinTiles); i++) {
+		Common::MemoryReadStream stream(builtinTiles[i].ptr, builtinTiles[i].size);
+		Common::Array<uint> pixels;
+
+		while (!stream.eos()) {
+			int data = stream.readByte();
+			int len = data + 1;
+			if ((data & 0x80) != 0) {
+				len = ((data ^ 0xFF) & 0xff) + 2;
+				data = stream.readByte();
+				for (int p = 0; p < len; p++) {
+					pixels.push_back(data);
+				}
+			} else {
+				for (int p = 0; p < len; p++) {
+					data = stream.readByte();
+					pixels.push_back(data);
+				}
+			}
+		}
+
+		warning("Tile%d, size: %d, expecting: %d", i + 1, pixels.size(), builtinTiles[i].w * builtinTiles[i].h);
+
+		for (uint s = pixels.size(); s < builtinTiles[i].w * builtinTiles[i].h; s++)
+			pixels.push_back(0);
+
+		_builtinTiles[i] = new Graphics::Surface();
+		_builtinTiles[i]->create(builtinTiles[i].w, builtinTiles[i].h, Graphics::PixelFormat::createFormatCLUT8());
+
+		for (uint y = 0; y < _builtinTiles[i]->h; y++) {
+			for (uint x = 0; x < _builtinTiles[i]->w; x++) {
+				*((byte *)_builtinTiles[i]->getBasePtr(x, y)) = pixels[y * _builtinTiles[i]->w + x];
+			}
+		}
+	}
 }
 
 Graphics::MacPatterns &DirectorEngine::getPatterns() {
diff --git a/engines/director/types.h b/engines/director/types.h
index 3ac4b1e4b9b..ce4c5fe4b0e 100644
--- a/engines/director/types.h
+++ b/engines/director/types.h
@@ -287,6 +287,10 @@ enum PaletteType {
 	kClutSystemWin = -101
 };
 
+enum {
+	kNumBuilitinTiles = 8
+};
+
 enum DirectorCursor {
 	kCursorMouseDown,
 	kCursorMouseUp
@@ -370,7 +374,7 @@ struct CastMemberID {
 	CastMemberID() : member(0), castLib(0) {}
 	CastMemberID(int memberID, int castLibID)
 		: member(memberID), castLib(castLibID) {}
-	
+
 	bool operator==(const CastMemberID &c) {
 		return member == c.member && castLib == c.castLib;
 	}


Commit: aa345327427197c33f155d87fff9c8a3ff059ce3
    https://github.com/scummvm/scummvm/commit/aa345327427197c33f155d87fff9c8a3ff059ce3
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-06-13T18:12:22+02:00

Commit Message:
DIRECTOR: Added built-in tile drawing to tests

Changed paths:
    engines/director/director.h
    engines/director/graphics-data.h
    engines/director/graphics.cpp
    engines/director/tests.cpp
    engines/director/types.h


diff --git a/engines/director/director.h b/engines/director/director.h
index dd19745f45e..3551632908f 100644
--- a/engines/director/director.h
+++ b/engines/director/director.h
@@ -236,8 +236,10 @@ private:
 
 	Graphics::MacPatterns _director3Patterns;
 	Graphics::MacPatterns _director3QuickDrawPatterns;
-	Graphics::Surface *_builtinTiles[kNumBuilitinTiles];
+public:
+	Graphics::Surface *_builtinTiles[kNumBuiltinTiles];
 
+private:
 	Common::HashMap<int, PaletteV4> _loadedPalettes;
 
 	Graphics::ManagedSurface *_surface;
diff --git a/engines/director/graphics-data.h b/engines/director/graphics-data.h
index 751a9c308f1..a86a0e21a2f 100644
--- a/engines/director/graphics-data.h
+++ b/engines/director/graphics-data.h
@@ -947,7 +947,7 @@ struct TileStruct {
 	int w, h;
 	const byte *ptr;
 	uint size;
-} static const builtinTiles[kNumBuilitinTiles] = {
+} static const builtinTiles[kNumBuiltinTiles] = {
 	{ 64, 32, tile1, ARRAYSIZE(tile1) },
 	{ 16, 16, tile2, ARRAYSIZE(tile2) },
 	{ 16, 16, tile3, ARRAYSIZE(tile3) },
diff --git a/engines/director/graphics.cpp b/engines/director/graphics.cpp
index 77526889d3e..5993766dc2f 100644
--- a/engines/director/graphics.cpp
+++ b/engines/director/graphics.cpp
@@ -81,7 +81,7 @@ void DirectorEngine::loadPatterns() {
 
 		for (uint y = 0; y < _builtinTiles[i]->h; y++) {
 			for (uint x = 0; x < _builtinTiles[i]->w; x++) {
-				*((byte *)_builtinTiles[i]->getBasePtr(x, y)) = pixels[y * _builtinTiles[i]->w + x];
+				*((byte *)_builtinTiles[i]->getBasePtr(x, y)) = 255 - pixels[y * _builtinTiles[i]->w + x];
 			}
 		}
 	}
diff --git a/engines/director/tests.cpp b/engines/director/tests.cpp
index 9ea6f1a4d34..43c38bd67d0 100644
--- a/engines/director/tests.cpp
+++ b/engines/director/tests.cpp
@@ -99,6 +99,13 @@ void Window::testFontScaling() {
 		}
 	}
 
+	x = 10;
+	for (int i = 0; i < kNumBuiltinTiles; i++) {
+		surface.blitFrom(*g_director->_builtinTiles[i], Common::Point(x, 250));
+
+		x += g_director->_builtinTiles[i]->w + 10;
+	}
+
 	g_system->copyRectToScreen(surface.getPixels(), surface.pitch, 0, 0, w, h); // testing fonts
 
 	Common::Event event;
diff --git a/engines/director/types.h b/engines/director/types.h
index ce4c5fe4b0e..33c9d27cbf8 100644
--- a/engines/director/types.h
+++ b/engines/director/types.h
@@ -288,7 +288,7 @@ enum PaletteType {
 };
 
 enum {
-	kNumBuilitinTiles = 8
+	kNumBuiltinTiles = 8
 };
 
 enum DirectorCursor {




More information about the Scummvm-git-logs mailing list