diff options
author | Martin Kiewitz | 2010-01-04 16:44:58 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-01-04 16:44:58 +0000 |
commit | 01eb329be2df445f3374f8183bec5d9031450062 (patch) | |
tree | 3e27875288bb996af067653dd4cb0b77a74c4b63 /engines/sci/engine | |
parent | 8cc690935a8fbd236c1b854ce281b3abb7b0a759 (diff) | |
download | scummvm-rg350-01eb329be2df445f3374f8183bec5d9031450062.tar.gz scummvm-rg350-01eb329be2df445f3374f8183bec5d9031450062.tar.bz2 scummvm-rg350-01eb329be2df445f3374f8183bec5d9031450062.zip |
SCI: kPalette / animate adjustments to behave more like sierra sci, also doesnt crash in island of brain anymore
svn-id: r46975
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/kgraphics.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index 9835aa6687..f909ab5f13 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -569,12 +569,16 @@ reg_t kPalette(EngineState *s, int argc, reg_t *argv) { } case 6: { // Animate int16 argNr; + bool paletteChanged = false; for (argNr = 1; argNr < argc; argNr += 3) { uint16 fromColor = argv[argNr].toUint16(); uint16 toColor = argv[argNr + 1].toUint16(); int16 speed = argv[argNr + 2].toSint16(); - s->_gui->paletteAnimate(fromColor, toColor, speed); + if (s->_gui->paletteAnimate(fromColor, toColor, speed)) + paletteChanged = true; } + if (paletteChanged) + s->_gui->paletteAnimateSet(); break; } case 7: { // Save palette to heap @@ -963,7 +967,6 @@ reg_t kAnimate(EngineState *s, int argc, reg_t *argv) { // Take care of incoming events (kAnimate is called semi-regularly) process_sound_events(s); #endif - s->_gui->animate(castListReference, cycle, argc, argv); return s->r_acc; |