[Scummvm-cvs-logs] CVS: scummvm/sword2/driver animation.cpp,1.28,1.29 animation.h,1.21,1.22
Nicolas Bacca
arisme at users.sourceforge.net
Thu Mar 4 11:16:09 CET 2004
Update of /cvsroot/scummvm/scummvm/sword2/driver
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15879/sword2/driver
Modified Files:
animation.cpp animation.h
Log Message:
Apply patch #907359 : Broken Sword videos improved frameskip
Index: animation.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/animation.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- animation.cpp 1 Mar 2004 04:05:10 -0000 1.28
+++ animation.cpp 4 Mar 2004 18:54:35 -0000 1.29
@@ -142,6 +142,7 @@
info = mpeg2_info(decoder);
framenum = 0;
+ frameskipped = 0;
ticks = _vm->_system->get_msecs();
// Play audio
@@ -358,8 +359,11 @@
#ifdef BACKEND_8BIT
if (checkPaletteSwitch() || (bgSoundStream == NULL) ||
- ((_vm->_mixer->getChannelElapsedTime(bgSound) * 12) / 1000 < framenum + 1)) {
-
+ ((_vm->_mixer->getChannelElapsedTime(bgSound) * 12) / 1000 < framenum + 1) || frameskipped > 10) {
+ if (frameskipped > 10) {
+ warning("force frame %i redraw", framenum);
+ frameskipped = 0;
+ }
_vm->_graphics->plotYUV(lut, sequence_i->width, sequence_i->height, info->display_fbuf->buf);
if (bgSoundStream) {
@@ -372,16 +376,21 @@
_vm->_graphics->setNeedFullRedraw();
- } else
+ } else {
warning("dropped frame %i", framenum);
+ frameskipped++;
+ }
buildLookup(palnum + 1, lutcalcnum);
#else
if ((bgSoundStream == NULL) ||
- ((_vm->_mixer->getChannelElapsedTime(bgSound) * 12) / 1000 < framenum + 1)) {
-
+ ((_vm->_mixer->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) {
@@ -392,8 +401,10 @@
_vm->sleepUntil(ticks);
}
- } else
+ } else {
warning("dropped frame %i", framenum);
+ frameskipped++;
+ }
#endif
Index: animation.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/animation.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- animation.h 1 Mar 2004 04:05:10 -0000 1.21
+++ animation.h 4 Mar 2004 18:54:35 -0000 1.22
@@ -71,6 +71,7 @@
Sword2Engine *_vm;
uint framenum;
+ uint frameskipped;
int ticks;
#ifdef USE_MPEG2
More information about the Scummvm-git-logs
mailing list