diff options
Diffstat (limited to 'engines/saga')
-rw-r--r-- | engines/saga/animation.cpp | 18 | ||||
-rw-r--r-- | engines/saga/events.cpp | 13 | ||||
-rw-r--r-- | engines/saga/events.h | 1 |
3 files changed, 26 insertions, 6 deletions
diff --git a/engines/saga/animation.cpp b/engines/saga/animation.cpp index 54d7a7e373..b0056dc7c6 100644 --- a/engines/saga/animation.cpp +++ b/engines/saga/animation.cpp @@ -236,16 +236,13 @@ void Anim::returnFromCutaway(void) { event.code = kPalEvent; event.op = kEventPalToBlack; event.time = 0; - event.duration = 5000; //kNormalFadeDuration; + event.duration = kNormalFadeDuration; event.data = cur_pal; q_event = _vm->_events->queue(&event); } - // Note that clearCutaway() sets _cutawayActive to false. - // clearCutaway(); - // TODO: Clearing the cutaway via an event is better, but it breaks things up - + // Clear the cutaway. Note that this sets _cutawayActive to false event.type = kEvTImmediate; event.code = kCutawayEvent; event.op = kEventClearCutaway; @@ -268,13 +265,22 @@ void Anim::returnFromCutaway(void) { q_event = _vm->_events->chain(q_event, &event); // chain with the other events + // Draw the scene + event.type = kEvTImmediate; + event.code = kSceneEvent; + event.op = kEventDrawScene; + event.time = 0; + event.duration = 0; + + q_event = _vm->_events->chain(q_event, &event); // chain with the other events + // Handle fade up, if we previously faded down if (_cutAwayFade) { event.type = kEvTImmediate; event.code = kPalEvent; event.op = kEventBlackToPal; event.time = 0; - event.duration = 5000; //kNormalFadeDuration; + event.duration = kNormalFadeDuration; event.data = saved_pal; q_event = _vm->_events->chain(q_event, &event); diff --git a/engines/saga/events.cpp b/engines/saga/events.cpp index a30c0bf15d..d9a2131c0b 100644 --- a/engines/saga/events.cpp +++ b/engines/saga/events.cpp @@ -369,6 +369,19 @@ int Events::handleOneShot(Event *event) { break; case kSceneEvent: switch (event->op) { + case kEventDrawScene: + { + Surface *backGroundSurface; + BGInfo bgInfo; + + backBuffer = _vm->_gfx->getBackBuffer(); + backGroundSurface = _vm->_render->getBackGroundSurface(); + _vm->_scene->getBGInfo(bgInfo); + backGroundSurface->blit(bgInfo.bounds, bgInfo.buffer); + + _vm->_scene->draw(); + } + break; case kEventEnd: _vm->_scene->nextScene(); return kEvStBreak; diff --git a/engines/saga/events.h b/engines/saga/events.h index b8eb240143..2f8cf46ffb 100644 --- a/engines/saga/events.h +++ b/engines/saga/events.h @@ -78,6 +78,7 @@ enum EventOps { kEventPlay = 1, kEventStop = 2, // SCENE events + kEventDrawScene = 1, kEventEnd = 2, // TEXT events kEventHide = 2, |