[Scummvm-cvs-logs] CVS: scummvm/sword2/driver animation.cpp,1.8,1.9 animation.h,1.11,1.12
James Brown
ender at users.sourceforge.net
Sat Jan 17 21:53:01 CET 2004
- Previous message: [Scummvm-cvs-logs] CVS: scummvm NEWS,1.53,1.54 README,1.241,1.242
- Next message: [Scummvm-cvs-logs] CVS: scummvm/sword1 animation.cpp,NONE,1.1 animation.h,NONE,1.1 logic.cpp,1.32,1.33 logic.h,1.10,1.11 module.mk,1.2,1.3 screen.cpp,1.36,1.37 screen.h,1.15,1.16 sword1.cpp,1.37,1.38
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/sword2/driver
In directory sc8-pr-cvs1:/tmp/cvs-serv22555/sword2/driver
Modified Files:
animation.cpp animation.h
Log Message:
BS1 cutscene support. Also bugfixes (don't crash if cutscene ogg unavailable)
Index: animation.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/animation.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- animation.cpp 17 Jan 2004 14:20:32 -0000 1.8
+++ animation.cpp 18 Jan 2004 05:52:04 -0000 1.9
@@ -132,6 +132,7 @@
info = mpeg2_info(decoder);
framenum = 0;
+ ticks = _vm->_system->get_msecs();
/* Play audio - TODO: Sync with video?*/
@@ -316,12 +317,18 @@
*/
#ifdef BACKEND_8BIT
- if (checkPaletteSwitch() ||
- (bgSoundStream->getSamplesPlayed()*12/bgSoundStream->getRate()) < (framenum+3)){
+ if (checkPaletteSwitch() || (bgSoundStream == NULL) ||
+ (bgSoundStream->getSamplesPlayed()*12/bgSoundStream->getRate()) < (framenum+3)){
+
_vm->_graphics->plotYUV(lut, sequence_i->width, sequence_i->height, info->display_fbuf->buf);
- while ((bgSoundStream->getSamplesPlayed()*12/bgSoundStream->getRate()) < framenum+1);
- _vm->_system->delay_msecs(10);
+ if (bgSoundStream) {
+ while ((bgSoundStream->getSamplesPlayed()*12/bgSoundStream->getRate()) < framenum+1);
+ _vm->_system->delay_msecs(10);
+ } else {
+ ticks += 83;
+ _vm->sleepUntil(ticks);
+ }
_vm->_graphics->setNeedFullRedraw();
@@ -332,11 +339,18 @@
#else
- if ((bgSoundStream->getSamplesPlayed()*12/bgSoundStream->getRate()) < (framenum+3)){
+ if ((bgSoundStream == NULL) ||
+ (bgSoundStream->getSamplesPlayed()*12/bgSoundStream->getRate()) < (framenum+3)){
+
plotYUV(lookup2, sequence_i->width, sequence_i->height, info->display_fbuf->buf);
- while ((bgSoundStream->getSamplesPlayed()*12/bgSoundStream->getRate()) < framenum+1);
- _vm->_system->delay_msecs(10);
+ if (bgSoundStream) {
+ while ((bgSoundStream->getSamplesPlayed()*12/bgSoundStream->getRate()) < framenum+1);
+ _vm->_system->delay_msecs(10);
+ } else {
+ ticks += 83;
+ _vm->sleepUntil(ticks);
+ }
} else
printf("dropped frame %i\n", framenum);
Index: animation.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/animation.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- animation.h 17 Jan 2004 14:20:32 -0000 1.11
+++ animation.h 18 Jan 2004 05:52:04 -0000 1.12
@@ -70,6 +70,7 @@
Sword2Engine *_vm;
int framenum;
+ int ticks;
#ifdef USE_MPEG2
mpeg2dec_t *decoder;
- Previous message: [Scummvm-cvs-logs] CVS: scummvm NEWS,1.53,1.54 README,1.241,1.242
- Next message: [Scummvm-cvs-logs] CVS: scummvm/sword1 animation.cpp,NONE,1.1 animation.h,NONE,1.1 logic.cpp,1.32,1.33 logic.h,1.10,1.11 module.mk,1.2,1.3 screen.cpp,1.36,1.37 screen.h,1.15,1.16 sword1.cpp,1.37,1.38
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list