aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2004-12-29 19:40:59 +0000
committerEugene Sandulenko2004-12-29 19:40:59 +0000
commit80647dd424a373ee5184d84726169c77a4c309b1 (patch)
tree525059884fdf936f8ba30dc129dd4132c43e8ea5
parent904af077e39d63904c62d7b030101e8d8a0a1e68 (diff)
downloadscummvm-rg350-80647dd424a373ee5184d84726169c77a4c309b1.tar.gz
scummvm-rg350-80647dd424a373ee5184d84726169c77a4c309b1.tar.bz2
scummvm-rg350-80647dd424a373ee5184d84726169c77a4c309b1.zip
PALETTE_FADE_DURATION -> kNormalFadeDuration
svn-id: r16373
-rw-r--r--saga/ite_introproc.cpp2
-rw-r--r--saga/saga.h4
-rw-r--r--saga/scene.cpp4
-rw-r--r--saga/scene.h2
-rw-r--r--saga/sfuncs.cpp8
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;
}