aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics/palette.cpp
diff options
context:
space:
mode:
authorMartin Kiewitz2010-06-20 13:25:08 +0000
committerMartin Kiewitz2010-06-20 13:25:08 +0000
commit30f6e7824bad89293db3a43b6d67657862a03c51 (patch)
tree279eaf35bbe79321be260269276dce232793a7e3 /engines/sci/graphics/palette.cpp
parent871c9bdddeaee6756f5c8d943c2ff8ed337abd4d (diff)
downloadscummvm-rg350-30f6e7824bad89293db3a43b6d67657862a03c51.tar.gz
scummvm-rg350-30f6e7824bad89293db3a43b6d67657862a03c51.tar.bz2
scummvm-rg350-30f6e7824bad89293db3a43b6d67657862a03c51.zip
SCI: update sys palette timestamp only on kDrawPic in SCI1.1, fixes intro of island of dr. brain
svn-id: r50077
Diffstat (limited to 'engines/sci/graphics/palette.cpp')
-rw-r--r--engines/sci/graphics/palette.cpp10
1 files changed, 9 insertions, 1 deletions
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;