RCS file: /cvsroot/scummvm/scummvm/sword1/animation.h,v
retrieving revision 1.5.2.1
diff -u -r1.5.2.1 animation.h
|
|
|
77 | 77 | OSystem *_sys; |
78 | 78 | |
79 | 79 | uint framenum; |
| 80 | uint frameskipped; |
80 | 81 | uint32 ticks; |
81 | 82 | |
82 | 83 | #ifdef USE_MPEG2 |
RCS file: /cvsroot/scummvm/scummvm/sword1/animation.cpp,v
retrieving revision 1.10.2.4
diff -u -r1.10.2.4 animation.cpp
|
|
|
134 | 134 | |
135 | 135 | info = mpeg2_info(decoder); |
136 | 136 | framenum = 0; |
| 137 | frameskipped = 0; |
137 | 138 | ticks = _sys->get_msecs(); |
138 | 139 | |
139 | 140 | /* Play audio - TODO: Sync with video?*/ |
… |
… |
|
324 | 325 | |
325 | 326 | #ifdef BACKEND_8BIT |
326 | 327 | if (checkPaletteSwitch() || (bgSoundStream == NULL) || |
327 | | ((_snd->getChannelElapsedTime(bgSound) * 12) / 1000 < framenum + 1)) { |
| 328 | ((_snd->getChannelElapsedTime(bgSound) * 12) / 1000 < framenum + 1) || frameskipped > 10) { |
| 329 | if (frameskipped > 10) { |
| 330 | warning("force frame %i redraw", framenum); |
| 331 | frameskipped = 0; |
| 332 | } |
328 | 333 | _scr->plotYUV(lut, sequence_i->width, sequence_i->height, info->display_fbuf->buf); |
329 | 334 | |
330 | 335 | if (bgSoundStream) { |
… |
… |
(this hunk was shorter than expected)
|
336 | 341 | _sys->delay_msecs(10); |
337 | 342 | } |
338 | 343 | |
339 | | } else |
| 344 | } else { |
340 | 345 | warning("dropped frame %i", framenum); |
| 346 | frameskipped++; |
| 347 | } |
341 | 348 | |
342 | 349 | buildLookup(palnum + 1, lutcalcnum); |
343 | 350 | |
344 | 351 | #else |
345 | 352 | |
346 | | if ((bgSoundStream == NULL) || ((_snd->getChannelElapsedTime(bgSound) * 12) / 1000 < framenum + 1)) { |
| 353 | if ((bgSoundStream == NULL) || ((_snd->getChannelElapsedTime(bgSound) * 12) / 1000 < framenum + 1) || frameskipped > 10) { |
| 354 | if (frameskipped > 10) { |
| 355 | warning("force frame %i redraw", framenum); |
| 356 | frameskipped = 0; |
| 357 | } |
347 | 358 | plotYUV(lookup, sequence_i->width, sequence_i->height, info->display_fbuf->buf); |
348 | 359 | |
349 | 360 | if (bgSoundStream) { |
… |
… |
|
355 | 367 | _sys->delay_msecs(10); |
356 | 368 | } |
357 | 369 | |
358 | | } else |
| 370 | } else { |
359 | 371 | warning("dropped frame %i", framenum); |
| 372 | frameskipped++; |
| 373 | } |
360 | 374 | |
361 | 375 | #endif |
362 | 376 | |
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/animation.h,v
retrieving revision 1.18.2.2
diff -u -r1.18.2.2 animation.h
|
|
|
71 | 71 | Sword2Engine *_vm; |
72 | 72 | |
73 | 73 | uint framenum; |
| 74 | uint frameskipped; |
74 | 75 | int ticks; |
75 | 76 | |
76 | 77 | #ifdef USE_MPEG2 |
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/animation.cpp,v
retrieving revision 1.21.2.5
diff -u -r1.21.2.5 animation.cpp
|
|
|
140 | 140 | |
141 | 141 | info = mpeg2_info(decoder); |
142 | 142 | framenum = 0; |
| 143 | frameskipped = 0; |
143 | 144 | ticks = _vm->_system->get_msecs(); |
144 | 145 | |
145 | 146 | // Play audio |
… |
… |
|
368 | 369 | |
369 | 370 | #ifdef BACKEND_8BIT |
370 | 371 | if (checkPaletteSwitch() || (bgSoundStream == NULL) || |
371 | | ((_vm->_mixer->getChannelElapsedTime(bgSound) * 12) / 1000 < framenum + 1)) { |
372 | | |
| 372 | ((_vm->_mixer->getChannelElapsedTime(bgSound) * 12) / 1000 < framenum + 1) || frameskipped > 10) { |
| 373 | if (frameskipped > 10) { |
| 374 | warning("force frame %i redraw", framenum); |
| 375 | frameskipped = 0; |
| 376 | } |
373 | 377 | _vm->_graphics->plotYUV(lut, sequence_i->width, sequence_i->height, info->display_fbuf->buf); |
374 | 378 | |
375 | 379 | if (bgSoundStream) { |
… |
… |
|
382 | 386 | |
383 | 387 | _vm->_graphics->setNeedFullRedraw(); |
384 | 388 | |
385 | | } else |
| 389 | } else { |
386 | 390 | warning("dropped frame %i", framenum); |
| 391 | frameskipped++; |
| 392 | } |
387 | 393 | |
388 | 394 | buildLookup(palnum + 1, lutcalcnum); |
389 | 395 | |
390 | 396 | #else |
391 | 397 | |
392 | 398 | if ((bgSoundStream == NULL) || |
393 | | ((_vm->_mixer->getChannelElapsedTime(bgSound) * 12) / 1000 < framenum + 1)) { |
394 | | |
| 399 | ((_vm->_mixer->getChannelElapsedTime(bgSound) * 12) / 1000 < framenum + 1) || frameskipped > 10) { |
| 400 | if (frameskipped > 10) { |
| 401 | warning("force frame %i redraw", framenum); |
| 402 | frameskipped = 0; |
| 403 | } |
395 | 404 | plotYUV(lookup, sequence_i->width, sequence_i->height, info->display_fbuf->buf); |
396 | 405 | |
397 | 406 | if (bgSoundStream) { |
… |
… |
|
402 | 411 | _vm->sleepUntil(ticks); |
403 | 412 | } |
404 | 413 | |
405 | | } else |
| 414 | } else { |
406 | 415 | warning("dropped frame %i", framenum); |
| 416 | frameskipped++; |
| 417 | } |
407 | 418 | |
408 | 419 | #endif |
409 | 420 | |