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

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Fri Aug 24 15:40:04 CEST 2007


Revision: 28709
          http://scummvm.svn.sourceforge.net/scummvm/?rev=28709&view=rev
Author:   thebluegr
Date:     2007-08-24 06:40:03 -0700 (Fri, 24 Aug 2007)

Log Message:
-----------
The frame count needs to be updated for cutaways without an animation bit as well. Removed a hack for the nightfall scene in Benny's chapter

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

Modified: scummvm/trunk/engines/saga/animation.cpp
===================================================================
--- scummvm/trunk/engines/saga/animation.cpp	2007-08-24 12:43:56 UTC (rev 28708)
+++ scummvm/trunk/engines/saga/animation.cpp	2007-08-24 13:40:03 UTC (rev 28709)
@@ -182,18 +182,15 @@
 	// An example is the "nightfall" animation in Ben's chapter (fadein-fadeout), the animation
 	// for the second from the left monitor in Ellen's chapter etc
 	// Therefore, skip the animation bit if animResourceId is 0 and only show the background
-	if (_cutawayList[cut].animResourceId == 0)
-		return;
+	if (_cutawayList[cut].animResourceId != 0) {
+		_vm->_resource->loadResource(context, _cutawayList[cut].animResourceId, resourceData, resourceDataLength);
+		load(MAX_ANIMATIONS + cutawaySlot, resourceData, resourceDataLength);
+		free(resourceData);
 
-	_vm->_resource->loadResource(context, _cutawayList[cut].animResourceId, resourceData, resourceDataLength);
+		setCycles(MAX_ANIMATIONS + cutawaySlot, _cutawayList[cut].cycles);
+		setFrameTime(MAX_ANIMATIONS + cutawaySlot, 1000 / _cutawayList[cut].frameRate);
+	}
 
-	load(MAX_ANIMATIONS + cutawaySlot, resourceData, resourceDataLength);
-
-	free(resourceData);
-
-	setCycles(MAX_ANIMATIONS + cutawaySlot, _cutawayList[cut].cycles);
-	setFrameTime(MAX_ANIMATIONS + cutawaySlot, 1000 / _cutawayList[cut].frameRate);
-
 	if (_cutAwayMode != kPanelVideo || startImmediately)
 		play(MAX_ANIMATIONS + cutawaySlot, 0);
 	else {
@@ -438,6 +435,24 @@
 	if (animId < MAX_ANIMATIONS && _cutawayActive)
 		return;
 
+	if (animId >= MAX_ANIMATIONS && _cutawayAnimations[animId - MAX_ANIMATIONS] == NULL) {
+		// In IHNM, cutaways without an animation bit are not rendered, but the framecount 
+		// needs to be updated
+		_vm->_frameCount++;
+
+		event.type = kEvTOneshot;
+		event.code = kAnimEvent;
+		event.op = kEventFrame;
+		event.param = animId;
+		event.time = 10;
+
+		_vm->_events->queue(&event);
+
+		// Nothing to render here (apart from the background, which is already rendered),
+		// so return
+		return;
+	}
+
 	anim = getAnimation(animId);
 
 	backGroundSurface = _vm->_render->getBackGroundSurface();

Modified: scummvm/trunk/engines/saga/sfuncs.cpp
===================================================================
--- scummvm/trunk/engines/saga/sfuncs.cpp	2007-08-24 12:43:56 UTC (rev 28708)
+++ scummvm/trunk/engines/saga/sfuncs.cpp	2007-08-24 13:40:03 UTC (rev 28709)
@@ -1943,14 +1943,6 @@
 	int16 frames;
 	frames = thread->pop();
 
-	// HACK for the nightfall scene in Benny's chapter
-	// sfWaitFrames is supposed to wait for fadein and fadeout during that cutaway, but we
-	// don't support it yet (function sfScriptFade). This is a temporary hack to avoid
-	// having ScummVM wait for ever in that cutaway
-	// FIXME: Remove this hack once the palette fading is properly handled
-	if (_vm->_scene->currentChapterNumber() == 2 && _vm->_scene->currentSceneNumber() == 41 && _vm->_anim->hasCutaway())
-		return;
-
 	if (!_skipSpeeches)
 		thread->waitFrames(_vm->_frameCount + frames);
 }


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