[Scummvm-cvs-logs] SF.net SVN: scummvm: [27173] scummvm/trunk/engines/saga/animation.cpp

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Thu Jun 7 17:49:13 CEST 2007


Revision: 27173
          http://scummvm.svn.sourceforge.net/scummvm/?rev=27173&view=rev
Author:   thebluegr
Date:     2007-06-07 08:49:12 -0700 (Thu, 07 Jun 2007)

Log Message:
-----------
Fixed video display and removed a hack for it

Modified Paths:
--------------
    scummvm/trunk/engines/saga/animation.cpp

Modified: scummvm/trunk/engines/saga/animation.cpp
===================================================================
--- scummvm/trunk/engines/saga/animation.cpp	2007-06-07 15:47:47 UTC (rev 27172)
+++ scummvm/trunk/engines/saga/animation.cpp	2007-06-07 15:49:12 UTC (rev 27173)
@@ -166,7 +166,18 @@
 
 	setCycles(MAX_ANIMATIONS + cutawaySlot, _cutawayList[cut].cycles);
 	setFrameTime(MAX_ANIMATIONS + cutawaySlot, 1000 / _cutawayList[cut].frameRate);
-	play(MAX_ANIMATIONS + cutawaySlot, 0);
+	if (_cutAwayMode != kPanelVideo)
+		play(MAX_ANIMATIONS + cutawaySlot, 0);
+	else {
+		Event event;
+		event.type = kEvTOneshot;
+		event.code = kAnimEvent;
+		event.op = kEventPlay;
+		event.param = MAX_ANIMATIONS + cutawaySlot;
+		event.time = (40 / 3) * 1000 / _cutawayList[cut].frameRate;
+
+		_vm->_events->queue(&event);
+	}
 }
 
 void Anim::endCutaway(void) {
@@ -236,6 +247,7 @@
 	_vm->_gfx->getCurrentPal(saved_pal);
 
 	_vm->_interface->setStatusText("");
+	_vm->_frameCount = 0;
 
 	playCutaway(vid, fade);
 }
@@ -363,17 +375,10 @@
 		return;
 	}
 
-	// HACK: When a video is played in IHNM, the animation starts playing before sfwaitframes 
-	// is called, which causes the game to wait forever. Raise the framecount by 10 to avoid lockup
-	// TODO: remove this hack
-	if (_vm->_interface->getMode() == kPanelVideo)
-		_vm->_frameCount += 10;
-
 	if (anim->completed < anim->cycles) {
 		frame = anim->currentFrame;
 		// FIXME: if start > 0, then this works incorrectly
 		decodeFrame(anim, anim->frameOffsets[frame], displayBuffer, _vm->getDisplayWidth() * _vm->getDisplayHeight());
-
 		_vm->_frameCount++;	
 		anim->currentFrame++;
 		if (anim->completed != 65535) {
@@ -388,6 +393,7 @@
 			}
 		}
 	} else {
+		_vm->_frameCount++;	
 		// Animation done playing
 		anim->state = ANIM_PAUSE;
 		if (anim->linkId == -1) {


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