diff src/animate.c @ 332:f90c60967a9c

Add mb_progm_finish to terminate the current animation and put all objects in the final position. It seems that not all words are executed correctly. We need to figure out why.
author wycc
date Sat, 07 Mar 2009 08:33:01 +0800
parents 45d9a1e2764d
children 586e50f82c1f
line wrap: on
line diff
--- a/src/animate.c	Fri Mar 06 23:02:32 2009 +0800
+++ b/src/animate.c	Sat Mar 07 08:33:01 2009 +0800
@@ -336,6 +336,13 @@
     progm->cur_timer = timer;
 }
 
+void mb_progm_finish(mb_progm_t *progm) {
+    mb_timeval_t infi;
+
+    mb_progm_abort(progm);
+    MB_TIMEVAL_SET(&infi, 0x7fffffff,0);
+    mb_progm_step(&progm->start_time, &infi,progm);
+}
 void mb_progm_abort(mb_progm_t *progm) {
     /*! \todo Make sure abort release resources. */
     if(progm->cur_timer) {