[Scummvm-cvs-logs] SF.net SVN: scummvm:[50077] scummvm/trunk/engines/sci/graphics
m_kiewitz at users.sourceforge.net
m_kiewitz at users.sourceforge.net
Sun Jun 20 15:25:08 CEST 2010
Revision: 50077
http://scummvm.svn.sourceforge.net/scummvm/?rev=50077&view=rev
Author: m_kiewitz
Date: 2010-06-20 13:25:08 +0000 (Sun, 20 Jun 2010)
Log Message:
-----------
SCI: update sys palette timestamp only on kDrawPic in SCI1.1, fixes intro of island of dr. brain
Modified Paths:
--------------
scummvm/trunk/engines/sci/graphics/paint16.cpp
scummvm/trunk/engines/sci/graphics/palette.cpp
scummvm/trunk/engines/sci/graphics/palette.h
Modified: scummvm/trunk/engines/sci/graphics/paint16.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/paint16.cpp 2010-06-20 13:15:45 UTC (rev 50076)
+++ scummvm/trunk/engines/sci/graphics/paint16.cpp 2010-06-20 13:25:08 UTC (rev 50077)
@@ -75,6 +75,10 @@
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!
Modified: scummvm/trunk/engines/sci/graphics/palette.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/palette.cpp 2010-06-20 13:15:45 UTC (rev 50076)
+++ scummvm/trunk/engines/sci/graphics/palette.cpp 2010-06-20 13:25:08 UTC (rev 50077)
@@ -292,10 +292,18 @@
}
}
}
- _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;
Modified: scummvm/trunk/engines/sci/graphics/palette.h
===================================================================
--- scummvm/trunk/engines/sci/graphics/palette.h 2010-06-20 13:15:45 UTC (rev 50076)
+++ scummvm/trunk/engines/sci/graphics/palette.h 2010-06-20 13:25:08 UTC (rev 50077)
@@ -51,6 +51,8 @@
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);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list