[Scummvm-cvs-logs] CVS: scummvm/saga animation.cpp,1.38,1.39

Torbjörn Andersson eriktorbjorn at users.sourceforge.net
Wed Jan 12 03:09:01 CET 2005


Update of /cvsroot/scummvm/scummvm/saga
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25396

Modified Files:
	animation.cpp 
Log Message:
There was a slight but noticeable pause in linked animations at the moment
it changes to the link. I'm guessing that the last frame in the animation
is identical to the first frame in the link.

The original calls SetAlarm(&deltaAlarm[i], delta->timer) between each
frame, but amends itself by calling SetAlarm(&deltaAlarm[i], 0) when the
link happens. I'm trying to simulate that effect by using 0 as frame time
instead of anim->frame_time. I think that's the right thing to do.


Index: animation.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/animation.cpp,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- animation.cpp	11 Jan 2005 21:10:19 -0000	1.38
+++ animation.cpp	12 Jan 2005 11:07:56 -0000	1.39
@@ -178,6 +178,7 @@
 	size_t nextf_len;
 
 	uint16 frame;
+	int frame_time;
 	int result;
 
 	if (anim_id >= _anim_count) {
@@ -284,13 +285,16 @@
 			link_anim->state = ANIM_PLAYING;
 		}
 		anim_id = link_anim_id;
+		frame_time = 0;
+	} else {
+		frame_time = anim->frame_time;
 	}
 
 	event.type = ONESHOT_EVENT;
 	event.code = ANIM_EVENT;
 	event.op = EVENT_FRAME;
 	event.param = anim_id;
-	event.time = anim->frame_time + vector_time;
+	event.time = frame_time + vector_time;
 
 	_vm->_events->queue(&event);
 





More information about the Scummvm-git-logs mailing list