[Scummvm-cvs-logs] SF.net SVN: scummvm:[52875] scummvm/trunk/engines/sci/engine
m_kiewitz at users.sourceforge.net
m_kiewitz at users.sourceforge.net
Fri Sep 24 11:56:51 CEST 2010
Revision: 52875
http://scummvm.svn.sourceforge.net/scummvm/?rev=52875&view=rev
Author: m_kiewitz
Date: 2010-09-24 09:56:50 +0000 (Fri, 24 Sep 2010)
Log Message:
-----------
SCI: save/restore intensity of sysPalette
fixes bug #3072868
should be save for backporting
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/savegame.cpp
scummvm/trunk/engines/sci/engine/savegame.h
Modified: scummvm/trunk/engines/sci/engine/savegame.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/savegame.cpp 2010-09-24 09:06:27 UTC (rev 52874)
+++ scummvm/trunk/engines/sci/engine/savegame.cpp 2010-09-24 09:56:50 UTC (rev 52875)
@@ -566,27 +566,33 @@
}
void GfxPalette::saveLoadWithSerializer(Common::Serializer &s) {
- if (s.getVersion() < 24)
- return;
+ if (s.getVersion() >= 25) {
+ // We need to save intensity of the _sysPalette at least for kq6 when entering the dark cave (room 390)
+ // from room 340. scripts will set intensity to 60 for this room and restore them when leaving.
+ // Sierra SCI is also doing this (although obviously not for SCI0->SCI01 games, still it doesn't hurt
+ // to save it everywhere). ffs. bug #3072868
+ s.syncBytes(_sysPalette.intensity, 256);
+ }
+ if (s.getVersion() >= 24) {
+ if (s.isLoading() && _palVaryResourceId != -1)
+ palVaryRemoveTimer();
- if (s.isLoading() && _palVaryResourceId != -1)
- palVaryRemoveTimer();
+ s.syncAsSint32LE(_palVaryResourceId);
+ if (_palVaryResourceId != -1) {
+ palVarySaveLoadPalette(s, &_palVaryOriginPalette);
+ palVarySaveLoadPalette(s, &_palVaryTargetPalette);
+ s.syncAsSint16LE(_palVaryStep);
+ s.syncAsSint16LE(_palVaryStepStop);
+ s.syncAsSint16LE(_palVaryDirection);
+ s.syncAsUint16LE(_palVaryTicks);
+ s.syncAsSint32LE(_palVaryPaused);
+ }
- s.syncAsSint32LE(_palVaryResourceId);
- if (_palVaryResourceId != -1) {
- palVarySaveLoadPalette(s, &_palVaryOriginPalette);
- palVarySaveLoadPalette(s, &_palVaryTargetPalette);
- s.syncAsSint16LE(_palVaryStep);
- s.syncAsSint16LE(_palVaryStepStop);
- s.syncAsSint16LE(_palVaryDirection);
- s.syncAsUint16LE(_palVaryTicks);
- s.syncAsSint32LE(_palVaryPaused);
+ if (s.isLoading() && _palVaryResourceId != -1) {
+ _palVarySignal = 0;
+ palVaryInstallTimer();
+ }
}
-
- if (s.isLoading() && _palVaryResourceId != -1) {
- _palVarySignal = 0;
- palVaryInstallTimer();
- }
}
void SegManager::reconstructStack(EngineState *s) {
Modified: scummvm/trunk/engines/sci/engine/savegame.h
===================================================================
--- scummvm/trunk/engines/sci/engine/savegame.h 2010-09-24 09:06:27 UTC (rev 52874)
+++ scummvm/trunk/engines/sci/engine/savegame.h 2010-09-24 09:56:50 UTC (rev 52875)
@@ -36,7 +36,7 @@
struct EngineState;
enum {
- CURRENT_SAVEGAME_VERSION = 24,
+ CURRENT_SAVEGAME_VERSION = 25,
MINIMUM_SAVEGAME_VERSION = 14
};
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