[Scummvm-cvs-logs] scummvm master -> 754907f40888c0cc0a2150550182b31804c4e891

sev- sev at scummvm.org
Wed Aug 24 00:13:36 CEST 2016


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

Summary:
754907f408 DIRECTOR: Gather statistic on correct bitmap sizes


Commit: 754907f40888c0cc0a2150550182b31804c4e891
    https://github.com/scummvm/scummvm/commit/754907f40888c0cc0a2150550182b31804c4e891
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-08-24T00:12:59+02:00

Commit Message:
DIRECTOR: Gather statistic on correct bitmap sizes

Changed paths:
    engines/director/frame.cpp
    engines/director/images.cpp



diff --git a/engines/director/frame.cpp b/engines/director/frame.cpp
index 1409120..7e272d1 100644
--- a/engines/director/frame.cpp
+++ b/engines/director/frame.cpp
@@ -516,6 +516,21 @@ void Frame::renderButton(Graphics::ManagedSurface &surface, uint16 spriteId) {
 	}
 }
 
+static const int corrections[] = {
+	1026, 27, 27, // Macro
+	1027, 164, 170, // House
+	1028, 154, 154, // Macromind Director
+	1029, 158, 158, // Upper inscription
+	1030, 54, 54, // lift
+	1031, 116, 116, // Lower inscription
+	1032, 113, 113, // Lower inscription 2
+	1039, 50, 50,
+	1041, 110, 110, // descr
+	1042, 120, 121, // descr 2
+	1065, 27, 27, // car
+	0, 0, 0
+};
+
 Image::ImageDecoder *Frame::getImageFrom(uint16 spriteId, int w, int h) {
 	uint16 imgId = spriteId + 1024;
 	Image::ImageDecoder *img = NULL;
@@ -534,6 +549,16 @@ Image::ImageDecoder *Frame::getImageFrom(uint16 spriteId, int w, int h) {
 
 	if (_vm->_currentScore->getArchive()->hasResource(MKTAG('B', 'I', 'T', 'D'), imgId)) {
 		if (_vm->getVersion() < 4) {
+			bool c = false;
+			for (int i = 0; corrections[i]; i += 3)
+				if (corrections[i] == imgId) {
+					w = corrections[i + 2];
+					c = true;
+					break;
+				}
+
+			if (!c)
+				warning("%d, %d, %d,", imgId, w, w);
 			img = new BITDDecoder(w, h);
 		} else {
 			img = new Image::BitmapDecoder();
diff --git a/engines/director/images.cpp b/engines/director/images.cpp
index 6295d5b..db429af 100644
--- a/engines/director/images.cpp
+++ b/engines/director/images.cpp
@@ -104,9 +104,9 @@ bool DIBDecoder::loadStream(Common::SeekableReadStream &stream) {
 
 BITDDecoder::BITDDecoder(int w, int h) {
 	int oldw = w;
-	w += 8 - (w + 7) % 8;
+	//w += 8 - (w + 7) % 8;
 
-	warning("W: %d -> %d, %d", oldw, w, h);
+	//warning("W: %d -> %d, %d", oldw, w, h);
 	_surface = new Graphics::Surface();
 	_surface->create(w, h, Graphics::PixelFormat::createFormatCLUT8());
 






More information about the Scummvm-git-logs mailing list