diff options
author | Martin Kiewitz | 2010-06-20 13:25:08 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-06-20 13:25:08 +0000 |
commit | 30f6e7824bad89293db3a43b6d67657862a03c51 (patch) | |
tree | 279eaf35bbe79321be260269276dce232793a7e3 /engines/sci | |
parent | 871c9bdddeaee6756f5c8d943c2ff8ed337abd4d (diff) | |
download | scummvm-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')
-rw-r--r-- | engines/sci/graphics/paint16.cpp | 4 | ||||
-rw-r--r-- | engines/sci/graphics/palette.cpp | 10 | ||||
-rw-r--r-- | engines/sci/graphics/palette.h | 2 |
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); |