[Scummvm-cvs-logs] CVS: scummvm/saga ite_introproc.cpp,1.12,1.13 module.mk,1.13,1.14 scene.cpp,1.16,1.17 scene.h,1.5,1.6 sceneproc.cpp,1.11,NONE sceneproc.h,1.2,NONE
Jonathan Gray
khalek at users.sourceforge.net
Sun Aug 1 02:16:02 CEST 2004
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/saga animation.cpp,1.14,1.15
- Next message: [Scummvm-cvs-logs] CVS: scummvm/saga actionmap.cpp,1.15,1.16 actor.cpp,1.14,1.15 animation.cpp,1.15,1.16 font.cpp,1.10,1.11 image.cpp,1.12,1.13 isomap.cpp,1.8,1.9
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/saga
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19671
Modified Files:
ite_introproc.cpp module.mk scene.cpp scene.h
Removed Files:
sceneproc.cpp sceneproc.h
Log Message:
move sceneproc.cpp/h into scene.cpp/h
Index: ite_introproc.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/ite_introproc.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- ite_introproc.cpp 1 Aug 2004 01:56:21 -0000 1.12
+++ ite_introproc.cpp 1 Aug 2004 09:15:12 -0000 1.13
@@ -143,7 +143,7 @@
first_scene.load_flag = BY_SCENE;
first_scene.scene_n = gs_desc.first_scene;
first_scene.scene_skiptarget = 1;
- first_scene.scene_proc = InitialSceneProc;
+ first_scene.scene_proc = initialScene;
SCENE_Queue(&first_scene);
Index: module.mk
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/module.mk,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- module.mk 4 May 2004 03:33:03 -0000 1.13
+++ module.mk 1 Aug 2004 09:15:12 -0000 1.14
@@ -24,7 +24,6 @@
saga/rscfile.o \
saga/saga.o \
saga/scene.o \
- saga/sceneproc.o \
saga/script.o \
saga/sdata.o \
saga/sdebug.o \
Index: scene.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/scene.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- scene.cpp 1 Aug 2004 01:56:21 -0000 1.16
+++ scene.cpp 1 Aug 2004 09:15:12 -0000 1.17
@@ -39,6 +39,8 @@
#include "render.h"
#include "rscfile_mod.h"
#include "text_mod.h"
+#include "sound.h"
+#include "music.h"
#include "scene_mod.h"
#include "scene.h"
@@ -302,7 +304,7 @@
}
SCENE_End();
- SCENE_Load(scene_num, BY_SCENE, DefaultSceneProc, NULL);
+ SCENE_Load(scene_num, BY_SCENE, defaultScene, NULL);
return R_SUCCESS;
}
@@ -476,7 +478,7 @@
SceneModule.scene_loaded = 1;
if (scene_proc == NULL) {
- SceneModule.scene_proc = DefaultSceneProc;
+ SceneModule.scene_proc = defaultScene;
} else {
SceneModule.scene_proc = scene_proc;
}
@@ -840,4 +842,120 @@
CON_Print(fmt, "Music R#", SceneModule.desc.music_rn);
}
+int initialScene(int param, R_SCENE_INFO *scene_info) {
+ R_EVENT event;
+ R_EVENT *q_event;
+ int delay_time = 0;
+ static PALENTRY current_pal[R_PAL_ENTRIES];
+ PALENTRY *pal;
+
+ switch (param) {
+ case SCENE_BEGIN:
+ _vm->_music->stop();
+ _vm->_sound->stopVoice();
+
+ // Fade palette to black from intro scene
+ 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;
+
+ delay_time += PALETTE_FADE_DURATION;
+
+ q_event = EVENT_Queue(&event);
+
+ // Activate user interface
+ event.type = R_ONESHOT_EVENT;
+ event.code = R_INTERFACE_EVENT;
+ event.op = EVENT_ACTIVATE;
+ event.time = 0;
+
+ q_event = EVENT_Chain(q_event, &event);
+
+ // Set first scene background w/o changing palette
+ event.type = R_ONESHOT_EVENT;
+ event.code = R_BG_EVENT;
+ event.op = EVENT_DISPLAY;
+ event.param = NO_SET_PALETTE;
+ event.time = 0;
+
+ q_event = EVENT_Chain(q_event, &event);
+
+ // Fade in to first scene background palette
+ SCENE_GetBGPal(&pal);
+
+ event.type = R_CONTINUOUS_EVENT;
+ event.code = R_PAL_EVENT;
+ event.op = EVENT_BLACKTOPAL;
+ event.time = delay_time;
+ event.duration = PALETTE_FADE_DURATION;
+ event.data = pal;
+
+ q_event = EVENT_Chain(q_event, &event);
+
+ event.code = R_PALANIM_EVENT;
+ event.op = EVENT_CYCLESTART;
+ event.time = 0;
+
+ q_event = EVENT_Chain(q_event, &event);
+
+ _vm->_anim->setFlag(0, ANIM_LOOP);
+ _vm->_anim->play(0, delay_time);
+
+ debug(0, "InitialSceneproc(): Scene started");
+ break;
+ case SCENE_END:
+ break;
+ default:
+ warning("Illegal scene procedure parameter");
+ break;
+ }
+
+ return 0;
+}
+
+int defaultScene(int param, R_SCENE_INFO *scene_info) {
+ R_EVENT event;
+
+ switch (param) {
+ case SCENE_BEGIN:
+ // Set scene background
+ event.type = R_ONESHOT_EVENT;
+ event.code = R_BG_EVENT;
+ event.op = EVENT_DISPLAY;
+ event.param = SET_PALETTE;
+ event.time = 0;
+
+ EVENT_Queue(&event);
+
+ // Activate user interface
+ event.type = R_ONESHOT_EVENT;
+ event.code = R_INTERFACE_EVENT;
+ event.op = EVENT_ACTIVATE;
+ event.time = 0;
+
+ EVENT_Queue(&event);
+
+ // Begin palette cycle animation if present
+ event.type = R_ONESHOT_EVENT;
+ event.code = R_PALANIM_EVENT;
+ event.op = EVENT_CYCLESTART;
+ event.time = 0;
+
+ EVENT_Queue(&event);
+ break;
+ case SCENE_END:
+ break;
+ default:
+ warning("Illegal scene procedure parameter");
+ break;
+ }
+
+ return 0;
+}
+
} // End of namespace Saga
Index: scene.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/scene.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- scene.h 31 Jul 2004 23:33:14 -0000 1.5
+++ scene.h 1 Aug 2004 09:15:12 -0000 1.6
@@ -28,6 +28,8 @@
namespace Saga {
+#define PALETTE_FADE_DURATION 1000
+
enum SCENE_LOAD_FLAGS {
BY_RESOURCE = 0,
BY_SCENE,
@@ -147,8 +149,8 @@
int IHNM_StartProc();
-int InitialSceneProc(int param, R_SCENE_INFO *scene_info);
-int DefaultSceneProc(int param, R_SCENE_INFO *scene_info);
+int initialScene(int param, R_SCENE_INFO *scene_info);
+int defaultScene(int param, R_SCENE_INFO *scene_info);
int ITE_StartProc();
int ITE_IntroAnimProc(int param, R_SCENE_INFO *scene_info);
--- sceneproc.cpp DELETED ---
--- sceneproc.h DELETED ---
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/saga animation.cpp,1.14,1.15
- Next message: [Scummvm-cvs-logs] CVS: scummvm/saga actionmap.cpp,1.15,1.16 actor.cpp,1.14,1.15 animation.cpp,1.15,1.16 font.cpp,1.10,1.11 image.cpp,1.12,1.13 isomap.cpp,1.8,1.9
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list