diff options
author | Eugene Sandulenko | 2004-08-10 23:52:19 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2004-08-10 23:52:19 +0000 |
commit | 6c060161e6bb4826de25b51a396c4ce768dc73f8 (patch) | |
tree | b98e6ffe6c5705e16ffefea911865e3890139619 | |
parent | dfc04a7d237218c48ecc7eb6ed94b67c3d4c471d (diff) | |
download | scummvm-rg350-6c060161e6bb4826de25b51a396c4ce768dc73f8.tar.gz scummvm-rg350-6c060161e6bb4826de25b51a396c4ce768dc73f8.tar.bz2 scummvm-rg350-6c060161e6bb4826de25b51a396c4ce768dc73f8.zip |
Correct scene transitions. Now intro seems to be complete.
svn-id: r14548
-rw-r--r-- | saga/ite_introproc.cpp | 56 |
1 files changed, 40 insertions, 16 deletions
diff --git a/saga/ite_introproc.cpp b/saga/ite_introproc.cpp index f522838f51..a79a56ee43 100644 --- a/saga/ite_introproc.cpp +++ b/saga/ite_introproc.cpp @@ -648,6 +648,8 @@ int ITE_IntroValleyProc(int param, R_SCENE_INFO *scene_info) { R_TEXTLIST_ENTRY *entry_p; R_EVENT event; R_EVENT *q_event; + PALENTRY *pal; + static PALENTRY current_pal[R_PAL_ENTRIES]; int i; const INTRO_CREDIT credits[] = { @@ -666,19 +668,47 @@ int ITE_IntroValleyProc(int param, R_SCENE_INFO *scene_info) { }; int n_credits = sizeof credits / sizeof credits[0]; - int event_delay = 0; + int event_delay = 3000; switch (param) { case SCENE_BEGIN: + // Fade to black out of the cave + _vm->_gfx->getCurrentPal(current_pal); + event.type = R_CONTINUOUS_EVENT; + event.code = R_PAL_EVENT; + event.op = EVENT_PALTOBLACK; + event.time = 0; + event.duration = PALETTE_FADE_DURATION; + event.data = current_pal; + + q_event = _vm->_events->queue(&event); + // Display ITE title screen background event.type = R_ONESHOT_EVENT; event.code = R_BG_EVENT; event.op = EVENT_DISPLAY; - event.param = SET_PALETTE; + event.param = NO_SET_PALETTE; event.time = 0; - q_event = _vm->_events->queue(&event); + q_event = _vm->_events->chain(q_event, &event); + + // Fade in from black to the scene background palette + _vm->_scene->getBGPal(&pal); + event.type = R_CONTINUOUS_EVENT; + event.code = R_PAL_EVENT; + event.op = EVENT_BLACKTOPAL; + event.time = 0; + event.duration = PALETTE_FADE_DURATION; + event.data = pal; + + q_event = _vm->_events->chain(q_event, &event); + + debug(0, "Beginning animation playback."); + + // Begin title screen background animation + _vm->_anim->setFlag(0, ANIM_LOOP); + _vm->_anim->play(0, PALETTE_FADE_DURATION); // Begin ITE title theme music _vm->_music->stop(); @@ -708,16 +738,16 @@ int ITE_IntroValleyProc(int param, R_SCENE_INFO *scene_info) { event.time = 3000; event.duration = LOGO_DISSOLVE_DURATION; - q_event = _vm->_events->queue(&event); + q_event = _vm->_events->chain(q_event, &event); // Remove logo event.type = R_CONTINUOUS_EVENT; event.code = R_TRANSITION_EVENT; event.op = EVENT_DISSOLVE; - event.time = 6000; + event.time = 3000; event.duration = LOGO_DISSOLVE_DURATION; - q_event = _vm->_events->queue(&event); + q_event = _vm->_events->chain(q_event, &event); // Unpause animation before logo event.type = R_ONESHOT_EVENT; @@ -725,23 +755,17 @@ int ITE_IntroValleyProc(int param, R_SCENE_INFO *scene_info) { event.op = EVENT_CLEARFLAG; event.param = 0; event.param2 = ANIM_PAUSE; - event.time = 6000 + LOGO_DISSOLVE_DURATION; + event.time = 3000 + LOGO_DISSOLVE_DURATION; - q_event = _vm->_events->queue(&event); + q_event = _vm->_events->chain(q_event, &event); event.type = R_ONESHOT_EVENT; event.code = R_ANIM_EVENT; event.op = EVENT_FRAME; event.param = 0; - event.time = 6000 + LOGO_DISSOLVE_DURATION; - - q_event = _vm->_events->queue(&event); + event.time = 3000 + LOGO_DISSOLVE_DURATION; - debug(0, "Beginning animation playback."); - - // Begin title screen background animation - _vm->_anim->setFlag(0, ANIM_LOOP); - _vm->_anim->play(0, 0); + q_event = _vm->_events->chain(q_event, &event); // Queue game credits list text_entry.color = 255; |