[Scummvm-cvs-logs] scummvm master -> a9b7b40c66ecc428d4c23d08e201ee00b659d181

csnover csnover at users.noreply.github.com
Tue Jul 12 21:44:46 CEST 2016


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:
efc12ffc5c SCI32: Avoid flash of incorrect colour when palettes are changed
e133c74403 SCI32: Fix unnecessary palette updates
a9b7b40c66 SCI32: Disable kernel call 0x23 on LSL6hires


Commit: efc12ffc5c905f38f1ea7889d4d9d6c14647441d
    https://github.com/scummvm/scummvm/commit/efc12ffc5c905f38f1ea7889d4d9d6c14647441d
Author: Colin Snover (github.com at zetafleet.com)
Date: 2016-07-12T14:41:17-05:00

Commit Message:
SCI32: Avoid flash of incorrect colour when palettes are changed

Avoid forcing the screen to refresh after a palette change if the
screen is also about to be drawn to, as the palette change + draw
is intended to be an atomic operation.

Changed paths:
    engines/sci/graphics/frameout.cpp
    engines/sci/graphics/palette32.cpp
    engines/sci/graphics/palette32.h



diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp
index 44db9f8..7bb9a4f 100644
--- a/engines/sci/graphics/frameout.cpp
+++ b/engines/sci/graphics/frameout.cpp
@@ -573,7 +573,7 @@ void GfxFrameout::frameOut(const bool shouldShowBits, const Common::Rect &eraseR
 //		_robot->frameAlmostVisible();
 //	}
 
-	_palette->updateHardware();
+	_palette->updateHardware(!shouldShowBits);
 
 	if (shouldShowBits) {
 		showBits();
@@ -1144,7 +1144,7 @@ void GfxFrameout::palMorphFrameOut(const int8 *styleRanges, const ShowStyleEntry
 
 	_palette->submit(nextPalette);
 	_palette->updateFFrame();
-	_palette->updateHardware();
+	_palette->updateHardware(false);
 	showBits();
 
 	_frameNowVisible = true;
diff --git a/engines/sci/graphics/palette32.cpp b/engines/sci/graphics/palette32.cpp
index 9d1cc65..1260a96 100644
--- a/engines/sci/graphics/palette32.cpp
+++ b/engines/sci/graphics/palette32.cpp
@@ -252,7 +252,7 @@ void GfxPalette32::updateFFrame() {
 	g_sci->_gfxRemap32->remapAllTables(_nextPalette != _currentPalette);
 }
 
-void GfxPalette32::updateHardware() {
+void GfxPalette32::updateHardware(const bool updateScreen) {
 	if (_currentPalette == _nextPalette) {
 		return;
 	}
@@ -285,7 +285,9 @@ void GfxPalette32::updateHardware() {
 	bpal[255 * 3 + 2] = 255;
 
 	g_system->getPaletteManager()->setPalette(bpal, 0, 256);
-	g_sci->getEventManager()->updateScreen();
+	if (updateScreen) {
+		g_sci->getEventManager()->updateScreen();
+	}
 }
 
 void GfxPalette32::applyAll() {
diff --git a/engines/sci/graphics/palette32.h b/engines/sci/graphics/palette32.h
index d06541f..dc21580 100644
--- a/engines/sci/graphics/palette32.h
+++ b/engines/sci/graphics/palette32.h
@@ -251,7 +251,7 @@ public:
 
 	bool updateForFrame();
 	void updateFFrame();
-	void updateHardware();
+	void updateHardware(const bool updateScreen = true);
 	void applyAll();
 
 #pragma mark -


Commit: e133c7440309fa55034addcc41879bf180a0a299
    https://github.com/scummvm/scummvm/commit/e133c7440309fa55034addcc41879bf180a0a299
Author: Colin Snover (github.com at zetafleet.com)
Date: 2016-07-12T14:43:56-05:00

Commit Message:
SCI32: Fix unnecessary palette updates

Some games load palettes that include color 255, but this is
hardcoded to white in SSCI, so just ignore it during merges since
it is ignored when the hardware palette is updated anyway.

Changed paths:
    engines/sci/graphics/palette32.cpp



diff --git a/engines/sci/graphics/palette32.cpp b/engines/sci/graphics/palette32.cpp
index 1260a96..2a98c23 100644
--- a/engines/sci/graphics/palette32.cpp
+++ b/engines/sci/graphics/palette32.cpp
@@ -128,8 +128,8 @@ GfxPalette32::GfxPalette32(ResourceManager *resMan)
 	_version(1),
 	_needsUpdate(false),
 	_currentPalette(),
-	_sourcePalette(_currentPalette),
-	_nextPalette(_currentPalette),
+	_sourcePalette(),
+	_nextPalette(),
 	// Clut
 	_clutTable(nullptr),
 	// Palette varying
@@ -162,7 +162,10 @@ GfxPalette32::~GfxPalette32() {
 }
 
 inline void mergePaletteInternal(Palette *const to, const Palette *const from) {
-	for (int i = 0, len = ARRAYSIZE(to->colors); i < len; ++i) {
+	// The last color is always white, so it is not copied.
+	// (Some palettes try to set the last color, which causes
+	// churning in the palettes when they are merged)
+	for (int i = 0, len = ARRAYSIZE(to->colors) - 1; i < len; ++i) {
 		if (from->colors[i].used) {
 			to->colors[i] = from->colors[i];
 		}


Commit: a9b7b40c66ecc428d4c23d08e201ee00b659d181
    https://github.com/scummvm/scummvm/commit/a9b7b40c66ecc428d4c23d08e201ee00b659d181
Author: Colin Snover (github.com at zetafleet.com)
Date: 2016-07-12T14:43:56-05:00

Commit Message:
SCI32: Disable kernel call 0x23 on LSL6hires

LSL6hires calls 0x23 (Graph/Robot) from game scripts, but it is a
null function in the game's interpreter.

Changed paths:
    engines/sci/engine/kernel.cpp



diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp
index 2fc338b..2afb8b7 100644
--- a/engines/sci/engine/kernel.cpp
+++ b/engines/sci/engine/kernel.cpp
@@ -885,8 +885,8 @@ void Kernel::loadKernelNames(GameFeatures *features) {
 			// how kDoSound is called from Sound::play().
 			// Known games that use this:
 			// GK2 demo
-			// KQ7 1.4
-			// PQ4 SWAT demo
+			// KQ7 1.4/1.51
+			// PQ:SWAT demo
 			// LSL6
 			// PQ4CD
 			// QFG4CD
@@ -897,7 +897,7 @@ void Kernel::loadKernelNames(GameFeatures *features) {
 
 			_kernelNames = Common::StringArray(sci2_default_knames, kKernelEntriesGk2Demo);
 			// OnMe is IsOnMe here, but they should be compatible
-			_kernelNames[0x23] = "Robot"; // Graph in SCI2
+			_kernelNames[0x23] = g_sci->getGameId() == GID_LSL6HIRES ? "Empty" : "Robot"; // Graph in SCI2
 			_kernelNames[0x2e] = "Priority"; // DisposeTextBitmap in SCI2
 		} else {
 			// Normal SCI2.1 kernel table






More information about the Scummvm-git-logs mailing list