aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/graphics/paint16.cpp4
-rw-r--r--engines/sci/graphics/palette.cpp10
-rw-r--r--engines/sci/graphics/palette.h2
3 files changed, 15 insertions, 1 deletions
diff --git a/engines/sci/graphics/paint16.cpp b/engines/sci/graphics/paint16.cpp
index f9ee3c3ae3..63e7d30ca0 100644
--- a/engines/sci/graphics/paint16.cpp
+++ b/engines/sci/graphics/paint16.cpp
@@ -75,6 +75,10 @@ void GfxPaint16::drawPicture(GuiResourceId pictureId, int16 animationNr, bool mi
picture->draw(animationNr, mirroredFlag, addToFlag, paletteId);
delete picture;
+
+ // We update our sys palette timestamp here (SCI1.1 only)
+ if (getSciVersion() == SCI_VERSION_1_1)
+ _palette->increaseSysTimestamp();
}
// This one is the only one that updates screen!
diff --git a/engines/sci/graphics/palette.cpp b/engines/sci/graphics/palette.cpp
index 7fa76586ad..447ad23ebe 100644
--- a/engines/sci/graphics/palette.cpp
+++ b/engines/sci/graphics/palette.cpp
@@ -292,10 +292,18 @@ bool GfxPalette::merge(Palette *pFrom, bool force, bool forceRealMerge) {
}
}
}
- _sysPalette.timestamp = g_system->getMillis() * 60 / 1000;
+
+ // We don't update the timestamp here for SCI1.1, it's only updated on kDrawPic calls
+ if (getSciVersion() < SCI_VERSION_1_1)
+ _sysPalette.timestamp = g_system->getMillis() * 60 / 1000;
return paletteChanged;
}
+// This is used for SCI1.1 and called from kDrawPic. We only update sysPalette timestamp this way for SCI1.1
+void GfxPalette::increaseSysTimestamp() {
+ _sysPalette.timestamp++;
+}
+
uint16 GfxPalette::matchColor(byte r, byte g, byte b) {
byte found = 0xFF;
int diff = 0x2FFFF, cdiff;
diff --git a/engines/sci/graphics/palette.h b/engines/sci/graphics/palette.h
index b7767537a1..53eb97e6a1 100644
--- a/engines/sci/graphics/palette.h
+++ b/engines/sci/graphics/palette.h
@@ -51,6 +51,8 @@ public:
void setOnScreen();
+ void increaseSysTimestamp();
+
bool kernelSetFromResource(GuiResourceId resourceId, bool force);
void kernelSetFlag(uint16 fromColor, uint16 toColor, uint16 flag);
void kernelUnsetFlag(uint16 fromColor, uint16 toColor, uint16 flag);