[Scummvm-git-logs] scummvm master -> 42525c54e8b4c24b301ea30c4024aeba043220a2

sev- noreply at scummvm.org
Sun Jul 9 21:42:56 UTC 2023


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:
c9a1586f42 DIRECTOR: Added more debug output for palette loading
42525c54e8 DIRECTOR: Set default palette castlib properly


Commit: c9a1586f42e8a57cb6d607a42d2cebec06cc2a52
    https://github.com/scummvm/scummvm/commit/c9a1586f42e8a57cb6d607a42d2cebec06cc2a52
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-07-09T23:41:35+02:00

Commit Message:
DIRECTOR: Added more debug output for palette loading

Changed paths:
    engines/director/graphics.cpp


diff --git a/engines/director/graphics.cpp b/engines/director/graphics.cpp
index 5d0f6fd1ac5..8b7d918972d 100644
--- a/engines/director/graphics.cpp
+++ b/engines/director/graphics.cpp
@@ -133,7 +133,7 @@ void DirectorEngine::loadDefaultPalettes() {
 
 PaletteV4 *DirectorEngine::getPalette(const CastMemberID &id) {
 	if (!_loadedPalettes.contains(id)) {
-		warning("DirectorEngine::getPalette(): Palette %s not found", id.asString().c_str());
+		warning("DirectorEngine::getPalette(): Palette %s not found, hash %x", id.asString().c_str(), id.hash());
 		return nullptr;
 	}
 
@@ -148,6 +148,8 @@ void DirectorEngine::addPalette(CastMemberID &id, byte *palette, int length) {
 		delete[] _loadedPalettes[id].palette;
 	}
 
+	debugC(3, kDebugLoading, "DirectorEngine::addPalette(): Registered palette %s of size %d, hash: %x", id.asString().c_str(), length, id.hash());
+
 	_loadedPalettes[id] = PaletteV4(id, palette, length);
 }
 
@@ -397,7 +399,7 @@ void inkDrawPixel(int x, int y, int src, void *data) {
 			*dst = src == (int)p->colorBlack ? p->backColor : *dst;
 		} else {
 			// AND dst palette index with the inverse of src.
-			// Originally designed for 1-bit mode so that 
+			// Originally designed for 1-bit mode so that
 			// black pixels would be invisible until they were
 			// over a black background, showing as white.
 			*dst = *dst & ~src;


Commit: 42525c54e8b4c24b301ea30c4024aeba043220a2
    https://github.com/scummvm/scummvm/commit/42525c54e8b4c24b301ea30c4024aeba043220a2
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-07-09T23:41:36+02:00

Commit Message:
DIRECTOR: Set default palette castlib properly

We were keeping CastLib -1 there, which was leading to all palettes
loaded from cast, referring to the built-in palettes

Fixes IDG Magazine

Changed paths:
    engines/director/cast.cpp


diff --git a/engines/director/cast.cpp b/engines/director/cast.cpp
index 32ae1a9908b..3e6bfa2f027 100644
--- a/engines/director/cast.cpp
+++ b/engines/director/cast.cpp
@@ -444,6 +444,8 @@ bool Cast::loadConfig() {
 			// with the builtin palettes starting from -1.
 			if (_defaultPalette.member <= 0)
 				_defaultPalette.member -= 1;
+			else
+				_defaultPalette.castLib = DEFAULT_CAST_LIB;
 			for (int i = 0; i < 0x08; i++) {
 				stream->readByte();
 			}




More information about the Scummvm-git-logs mailing list