diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/saga/animation.cpp | 15 | ||||
-rw-r--r-- | engines/saga/gfx.h | 3 | ||||
-rw-r--r-- | engines/saga/scene.cpp | 19 |
3 files changed, 28 insertions, 9 deletions
diff --git a/engines/saga/animation.cpp b/engines/saga/animation.cpp index eef4e46f1b..b5fddf7c15 100644 --- a/engines/saga/animation.cpp +++ b/engines/saga/animation.cpp @@ -82,7 +82,10 @@ void Anim::playCutaway(int cut, bool fade) { _cutAwayFade = fade; - if (fade) { + _vm->_gfx->savePalette(); + + // TODO + /*if (fade) { Event event; static PalEntry cur_pal[PAL_ENTRIES]; @@ -96,7 +99,7 @@ void Anim::playCutaway(int cut, bool fade) { event.data = cur_pal; _vm->_events->queue(&event); - } + }*/ if (!_cutawayActive) { _vm->_gfx->showCursor(false); @@ -200,7 +203,8 @@ void Anim::returnFromCutaway(void) { clearCutaway(); // Handle fade up, if we previously faded down - if (_cutAwayFade) { + // TODO + /*if (_cutAwayFade) { Event event; event.type = kEvTImmediate; event.code = kPalEvent; @@ -210,7 +214,7 @@ void Anim::returnFromCutaway(void) { event.data = saved_pal; _vm->_events->queue(&event); - } + }*/ // Restore the scene _vm->_scene->restoreScene(); @@ -243,9 +247,6 @@ void Anim::clearCutaway(void) { void Anim::startVideo(int vid, bool fade) { debug(0, "startVideo(%d, %d)", vid, fade); - Event event; - _vm->_gfx->getCurrentPal(saved_pal); - _vm->_interface->setStatusText(""); _vm->_frameCount = 0; diff --git a/engines/saga/gfx.h b/engines/saga/gfx.h index 4751589330..8658e6d992 100644 --- a/engines/saga/gfx.h +++ b/engines/saga/gfx.h @@ -146,6 +146,8 @@ public: void setPalette(const PalEntry *pal, bool full = false); void setPaletteColor(int n, int r, int g, int b); void getCurrentPal(PalEntry *src_pal); + void savePalette() { getCurrentPal(_savedPalette); } + void restorePalette() { setPalette(_savedPalette, true); } void palToBlack(PalEntry *src_pal, double percent); void blackToPal(PalEntry *src_pal, double percent); void showCursor(bool state); @@ -159,6 +161,7 @@ private: SagaEngine *_vm; PalEntry _globalPalette[PAL_ENTRIES]; + PalEntry _savedPalette[PAL_ENTRIES]; }; } // End of namespace Saga diff --git a/engines/saga/scene.cpp b/engines/saga/scene.cpp index d59c0bb987..839beca349 100644 --- a/engines/saga/scene.cpp +++ b/engines/saga/scene.cpp @@ -1210,8 +1210,23 @@ void Scene::endScene() { } void Scene::restoreScene() { - // TODO - warning("TODO: restoreScene()"); + // There is no implementation for tiled scenes, since this function is only used + // in IHNM, which has no tiled scenes + + Event event; + + _vm->_gfx->showCursor(false); + _vm->_gfx->restorePalette(); + + event.type = kEvTImmediate; + event.code = kBgEvent; + event.op = kEventDisplay; + event.param = kEvPNoSetPalette; + event.time = 0; + event.duration = 0; + _vm->_events->queue(&event); + + _vm->_gfx->showCursor(true); } void Scene::cmdSceneChange(int argc, const char **argv) { |