aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sci/engine/kernel.cpp6
-rw-r--r--engines/sci/graphics/frameout.cpp4
-rw-r--r--engines/sci/graphics/palette32.cpp15
-rw-r--r--engines/sci/graphics/palette32.h2
4 files changed, 16 insertions, 11 deletions
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp
index 2fc338b618..2afb8b73d1 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
diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp
index 44db9f870e..7bb9a4f5cf 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 9d1cc655b9..2a98c237b0 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];
}
@@ -252,7 +255,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 +288,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 d06541fc47..dc2158022f 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 -