diff options
author | David Corrales | 2007-08-05 19:34:20 +0000 |
---|---|---|
committer | David Corrales | 2007-08-05 19:34:20 +0000 |
commit | 6856535010bd2fa4449bcfde1c88dc06cd46e26f (patch) | |
tree | b81a2234c2beff0312c93e039d6cafda4babeca6 /engines/saga/animation.cpp | |
parent | 1400d28bfb37fc94f3c44dec0a4d0cef65fb8fb7 (diff) | |
parent | ec1803f838d5efc7decf75c05a1fb4a9633751e5 (diff) | |
download | scummvm-rg350-6856535010bd2fa4449bcfde1c88dc06cd46e26f.tar.gz scummvm-rg350-6856535010bd2fa4449bcfde1c88dc06cd46e26f.tar.bz2 scummvm-rg350-6856535010bd2fa4449bcfde1c88dc06cd46e26f.zip |
Merged fsnode with trunk: r27971:28460
svn-id: r28462
Diffstat (limited to 'engines/saga/animation.cpp')
-rw-r--r-- | engines/saga/animation.cpp | 36 |
1 files changed, 23 insertions, 13 deletions
diff --git a/engines/saga/animation.cpp b/engines/saga/animation.cpp index d29fc6ebe6..7b3bdcd665 100644 --- a/engines/saga/animation.cpp +++ b/engines/saga/animation.cpp @@ -24,6 +24,7 @@ */ // Background animation management module + #include "saga/saga.h" #include "saga/gfx.h" @@ -94,7 +95,10 @@ void Anim::playCutaway(int cut, bool fade) { startImmediately = true; } - _vm->_gfx->savePalette(); + // WORKAROUND: The IHNM demo deals with chained cutaways in a different manner. Don't save + // the palette of cutaway 11 (the woman looking at the marble) + if (!(_vm->getGameId() == GID_IHNM_DEMO && cut == 11)) + _vm->_gfx->savePalette(); if (fade) { _vm->_gfx->getCurrentPal(saved_pal); @@ -152,6 +156,12 @@ void Anim::playCutaway(int cut, bool fade) { _vm->_gfx->setPalette(palette); + // WORKAROUND for a bug found in the original IHNM demo. The palette of cutaway 12 is incorrect (the incorrect + // palette can be seen in the original demo too, for a split second). Therefore, use the saved palette for this + // cutaway + if (_vm->getGameId() == GID_IHNM_DEMO && cut == 12) + _vm->_gfx->restorePalette(); + free(buf); free(resourceData); @@ -307,7 +317,17 @@ void Anim::clearCutaway(void) { } _vm->_interface->restoreMode(); - _vm->_gfx->showCursor(true); + + if (_vm->getGameId() != GID_IHNM_DEMO) { + if (_vm->_scene->currentSceneNumber() >= 144 && _vm->_scene->currentSceneNumber() <= 149) { + // Don't show the mouse cursor in the non-interactive part of the IHNM demo + } else { + _vm->_gfx->showCursor(true); + } + } else { + // Enable the save reminder state after each cutaway for the IHNM demo + _vm->_interface->setSaveReminderState(true); + } } } @@ -367,16 +387,6 @@ void Anim::load(uint16 animId, const byte *animResourceData, size_t animResource fillFrameOffsets(anim); - /* char s[200]; - sprintf(s, "d:\\anim%i",animId); - long flen=anim->resourceLength; - char *buf=(char*)anim->resourceData; - FILE*f; - f=fopen(s,"wb"); - for (long i = 0; i < flen; i++) - fputc(buf[i],f); - fclose(f);*/ - // Set animation data anim->currentFrame = 0; anim->completed = 0; @@ -642,7 +652,7 @@ void Anim::decodeFrame(AnimationData *anim, size_t frameOffset, byte *buf, size_ yStart = readS.readUint16BE(); else yStart = readS.readByte(); - readS.readByte(); /* Skip pad byte */ + readS.readByte(); // Skip pad byte /*xPos = */readS.readUint16BE(); /*yPos = */readS.readUint16BE(); /*width = */readS.readUint16BE(); |