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

rvanlaar noreply at scummvm.org
Tue Oct 18 21:00:00 UTC 2022


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:
bb4bd0845b DIRECTOR: Follow documentation for DIB header


Commit: bb4bd0845b6f6b3273cf242f59ba12cec21399eb
    https://github.com/scummvm/scummvm/commit/bb4bd0845b6f6b3273cf242f59ba12cec21399eb
Author: Roland van Laar (roland at rolandvanlaar.nl)
Date: 2022-10-18T22:57:17+02:00

Commit Message:
DIRECTOR: Follow documentation for DIB header

width, height pixelspermeter are signed according to the spec.
Use a warning with 'buildbot' to see which movies have a negative
height.

https://learn.microsoft.com/en-us/previous-versions//dd183376(v=vs.85)

Changed paths:
    engines/director/images.cpp


diff --git a/engines/director/images.cpp b/engines/director/images.cpp
index b9101dbd184..36f5a9e3f93 100644
--- a/engines/director/images.cpp
+++ b/engines/director/images.cpp
@@ -74,14 +74,17 @@ bool DIBDecoder::loadStream(Common::SeekableReadStream &stream) {
 	if (headerSize != 40)
 		return false;
 
-	uint32 width = stream.readUint32LE();
-	uint32 height = stream.readUint32LE();
+	int32 width = stream.readSint32LE();
+	int32 height = stream.readSint32LE();
+	if (height < 0) {
+		warning("BUILDBOT: height < 0 for DIB");
+	}
 	stream.readUint16LE(); // planes
 	uint16 bitsPerPixel = stream.readUint16LE();
 	uint32 compression = stream.readUint32BE();
 	/* uint32 imageSize = */ stream.readUint32LE();
-	/* uint32 pixelsPerMeterX = */ stream.readUint32LE();
-	/* uint32 pixelsPerMeterY = */ stream.readUint32LE();
+	/* int32 pixelsPerMeterX = */ stream.readSint32LE();
+	/* int32 pixelsPerMeterY = */ stream.readSint32LE();
 	_paletteColorCount = stream.readUint32LE();
 	/* uint32 colorsImportant = */ stream.readUint32LE();
 




More information about the Scummvm-git-logs mailing list