[Scummvm-cvs-logs] CVS: scummvm/sword1 animation.cpp,1.10.2.4,1.10.2.5 animation.h,1.5.2.1,1.5.2.2
Nicolas Bacca
arisme at users.sourceforge.net
Thu Mar 4 11:19:00 CET 2004
Update of /cvsroot/scummvm/scummvm/sword1
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16444/sword1
Modified Files:
Tag: branch-0-6-0
animation.cpp animation.h
Log Message:
Apply patch #907359 : Broken Sword videos improved frameskip
Index: animation.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/animation.cpp,v
retrieving revision 1.10.2.4
retrieving revision 1.10.2.5
diff -u -d -r1.10.2.4 -r1.10.2.5
--- animation.cpp 1 Mar 2004 04:03:31 -0000 1.10.2.4
+++ animation.cpp 4 Mar 2004 18:56:39 -0000 1.10.2.5
@@ -134,6 +134,7 @@
info = mpeg2_info(decoder);
framenum = 0;
+ frameskipped = 0;
ticks = _sys->get_msecs();
/* Play audio - TODO: Sync with video?*/
@@ -324,7 +325,11 @@
#ifdef BACKEND_8BIT
if (checkPaletteSwitch() || (bgSoundStream == NULL) ||
- ((_snd->getChannelElapsedTime(bgSound) * 12) / 1000 < framenum + 1)) {
+ ((_snd->getChannelElapsedTime(bgSound) * 12) / 1000 < framenum + 1) || frameskipped > 10) {
+ if (frameskipped > 10) {
+ warning("force frame %i redraw", framenum);
+ frameskipped = 0;
+ }
_scr->plotYUV(lut, sequence_i->width, sequence_i->height, info->display_fbuf->buf);
if (bgSoundStream) {
@@ -336,14 +341,20 @@
_sys->delay_msecs(10);
}
- } else
+ } else {
warning("dropped frame %i", framenum);
+ frameskipped++;
+ }
buildLookup(palnum + 1, lutcalcnum);
#else
- if ((bgSoundStream == NULL) || ((_snd->getChannelElapsedTime(bgSound) * 12) / 1000 < framenum + 1)) {
+ if ((bgSoundStream == NULL) || ((_snd->getChannelElapsedTime(bgSound) * 12) / 1000 < framenum + 1) || frameskipped > 10) {
+ if (frameskipped > 10) {
+ warning("force frame %i redraw", framenum);
+ frameskipped = 0;
+ }
plotYUV(lookup, sequence_i->width, sequence_i->height, info->display_fbuf->buf);
if (bgSoundStream) {
@@ -355,8 +366,10 @@
_sys->delay_msecs(10);
}
- } else
+ } else {
warning("dropped frame %i", framenum);
+ frameskipped++;
+ }
#endif
Index: animation.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/animation.h,v
retrieving revision 1.5.2.1
retrieving revision 1.5.2.2
diff -u -d -r1.5.2.1 -r1.5.2.2
--- animation.h 1 Mar 2004 04:03:31 -0000 1.5.2.1
+++ animation.h 4 Mar 2004 18:56:39 -0000 1.5.2.2
@@ -77,6 +77,7 @@
OSystem *_sys;
uint framenum;
+ uint frameskipped;
uint32 ticks;
#ifdef USE_MPEG2
More information about the Scummvm-git-logs
mailing list