[Scummvm-cvs-logs] SF.net SVN: scummvm:[43718] scummvm/trunk/engines/sci/engine/kgraphics.cpp
waltervn at users.sourceforge.net
waltervn at users.sourceforge.net
Tue Aug 25 02:18:11 CEST 2009
Revision: 43718
http://scummvm.svn.sourceforge.net/scummvm/?rev=43718&view=rev
Author: waltervn
Date: 2009-08-25 00:18:11 +0000 (Tue, 25 Aug 2009)
Log Message:
-----------
SCI: Fix interpretation of ShowMovie speed argument.
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/kgraphics.cpp
Modified: scummvm/trunk/engines/sci/engine/kgraphics.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kgraphics.cpp 2009-08-24 23:45:15 UTC (rev 43717)
+++ scummvm/trunk/engines/sci/engine/kgraphics.cpp 2009-08-25 00:18:11 UTC (rev 43718)
@@ -3330,7 +3330,7 @@
reg_t kShowMovie(EngineState *s, int funct_nr, int argc, reg_t *argv) {
const char *filename = kernel_dereference_char_pointer(s, argv[0], 0);
- int framerate = argv[1].toUint16(); // FIXME: verify
+ int delay = argv[1].toUint16(); // Time between frames in ticks
int frameNr = 0;
SeqDecoder seq;
@@ -3341,6 +3341,8 @@
bool play = true;
while (play) {
+ uint32 startTime = g_system->getMillis();
+
gfx_pixmap_t *pixmap = seq.getFrame(play);
if (frameNr++ == 0)
@@ -3351,10 +3353,8 @@
gfxop_update_box(s->gfx_state, gfx_rect(0, 0, 320, 200));
gfx_free_pixmap(pixmap);
- uint32 startTime = g_system->getMillis();
-
// Wait before showing the next frame
- while (play && (g_system->getMillis() < startTime + 1000 / framerate)) {
+ while (play && (g_system->getMillis() < startTime + (delay * 1000 / 60))) {
// FIXME: we should probably make a function that handles quitting in these kinds of situations
Common::Event curEvent;
Common::EventManager *eventMan = g_system->getEventManager();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list