From 80647dd424a373ee5184d84726169c77a4c309b1 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 29 Dec 2004 19:40:59 +0000 Subject: PALETTE_FADE_DURATION -> kNormalFadeDuration svn-id: r16373 --- saga/ite_introproc.cpp | 2 +- saga/saga.h | 4 +++- saga/scene.cpp | 4 ++-- saga/scene.h | 2 -- saga/sfuncs.cpp | 8 ++++---- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/saga/ite_introproc.cpp b/saga/ite_introproc.cpp index 92250b2c56..81d8f8a30d 100644 --- a/saga/ite_introproc.cpp +++ b/saga/ite_introproc.cpp @@ -663,7 +663,7 @@ int Scene::ITEIntroValleyProc(int param, SCENE_INFO *scene_info) { // Begin title screen background animation _vm->_anim->setCycles(0, -1); - _vm->_anim->play(0, PALETTE_FADE_DURATION); + _vm->_anim->play(0, kNormalFadeDuration); // Begin ITE title theme music _vm->_music->stop(); diff --git a/saga/saga.h b/saga/saga.h index 735b6d4151..8caf5d0508 100644 --- a/saga/saga.h +++ b/saga/saga.h @@ -79,7 +79,9 @@ enum SAGAGameType { enum scriptTimings { kScriptTimeTicksPerSecond = (728L/10L), - kRepeatSpeed = 40 // 25 frames/sec + kRepeatSpeed = 40, // 25 frames/sec + kNormalFadeDuration = 1000, // should be 320. 64 steps, 5 msec each + kQuickFadeDuration = 200 // should be 64. 64 steps, 1 msec each }; enum Directions { diff --git a/saga/scene.cpp b/saga/scene.cpp index 58e41191bd..d9171871ae 100644 --- a/saga/scene.cpp +++ b/saga/scene.cpp @@ -599,7 +599,7 @@ int Scene::loadScene(int scene_num, int load_flag, SCENE_PROC scene_proc, SCENE_ event.code = PAL_EVENT; event.op = EVENT_PALTOBLACK; event.time = 0; - event.duration = PALETTE_FADE_DURATION; + event.duration = kNormalFadeDuration; event.data = current_pal; q_event = _vm->_events->queue(&event); @@ -642,7 +642,7 @@ int Scene::loadScene(int scene_num, int load_flag, SCENE_PROC scene_proc, SCENE_ event.code = PAL_EVENT; event.op = EVENT_BLACKTOPAL; event.time = 0; - event.duration = PALETTE_FADE_DURATION; + event.duration = kNormalFadeDuration; event.data = _bg.pal; q_event = _vm->_events->chain(q_event, &event); diff --git a/saga/scene.h b/saga/scene.h index b82f0a41f6..3220d6b792 100644 --- a/saga/scene.h +++ b/saga/scene.h @@ -60,8 +60,6 @@ struct SCENE_INFO { typedef int (SCENE_PROC) (int, SCENE_INFO *, void *); -#define PALETTE_FADE_DURATION 1000 - enum SCENE_LOAD_FLAGS { BY_RESOURCE = 0, BY_SCENE, diff --git a/saga/sfuncs.cpp b/saga/sfuncs.cpp index bdbad2a562..805801fa8b 100644 --- a/saga/sfuncs.cpp +++ b/saga/sfuncs.cpp @@ -931,7 +931,7 @@ int Script::SF_placard(SCRIPTFUNC_PARAMS) { _vm->_gfx->showCursor(false); _vm->_gfx->getCurrentPal(cur_pal); - _vm->_gfx->palToBlackWait(back_buf, cur_pal, PALETTE_FADE_DURATION); + _vm->_gfx->palToBlackWait(back_buf, cur_pal, kNormalFadeDuration); _vm->_interface->setStatusText(""); @@ -949,7 +949,7 @@ int Script::SF_placard(SCRIPTFUNC_PARAMS) { _vm->_render->drawScene(); _vm->_scene->getBGPal(&pal); - _vm->_gfx->blackToPalWait(back_buf, pal, PALETTE_FADE_DURATION); + _vm->_gfx->blackToPalWait(back_buf, pal, kNormalFadeDuration); return SUCCESS; } @@ -963,7 +963,7 @@ int Script::SF_placardOff(SCRIPTFUNC_PARAMS) { // Fade down _vm->_gfx->showCursor(false); _vm->_gfx->getCurrentPal(cur_pal); - _vm->_gfx->palToBlackWait(back_buf, cur_pal, PALETTE_FADE_DURATION); + _vm->_gfx->palToBlackWait(back_buf, cur_pal, kNormalFadeDuration); _vm->_render->clearFlag(RF_PLACARD); _vm->_render->drawScene(); @@ -972,7 +972,7 @@ int Script::SF_placardOff(SCRIPTFUNC_PARAMS) { _vm->_scene->getBGPal(&pal); _vm->_gfx->showCursor(true); - _vm->_gfx->blackToPalWait(back_buf, pal, PALETTE_FADE_DURATION); + _vm->_gfx->blackToPalWait(back_buf, pal, kNormalFadeDuration); return SUCCESS; } -- cgit v1.2.3