diff src/X_main.c @ 47:f3818d996f4f

change interface of creating a animation action
author Thinker K.F. Li <thinker@branda.to>
date Sat, 09 Aug 2008 16:41:33 +0800
parents 7d9af44f095b
children bdf711cbf0fb
line wrap: on
line diff
--- a/src/X_main.c	Sat Aug 09 16:33:33 2008 +0800
+++ b/src/X_main.c	Sat Aug 09 16:41:33 2008 +0800
@@ -306,24 +306,20 @@
 	MB_TIMEVAL_SET(&start, 1, 0);
 	MB_TIMEVAL_SET(&playing, 2, 0);
 	word = mb_progm_next_word(progm, &start, &playing);
-	act = mb_shift_new(0, 20, coord1);
-	mb_word_add_action(word, act);
+	act = mb_shift_new(0, 20, coord1, word);
 	
 	MB_TIMEVAL_SET(&start, 3, 0);
 	MB_TIMEVAL_SET(&playing, 2, 0);
-	act = mb_shift_new(0, 20, coord2);
-	mb_word_add_action(word, act);
+	act = mb_shift_new(0, 20, coord2, word);
 	
 	MB_TIMEVAL_SET(&start, 3, 0);
 	MB_TIMEVAL_SET(&playing, 2, 0);
 	word = mb_progm_next_word(progm, &start, &playing);
-	act = mb_shift_new(0, -20, coord1);
-	mb_word_add_action(word, act);
+	act = mb_shift_new(0, -20, coord1, word);
 	
 	MB_TIMEVAL_SET(&start, 3, 0);
 	MB_TIMEVAL_SET(&playing, 2, 0);
-	act = mb_shift_new(0, -20, coord2);
-	mb_word_add_action(word, act);
+	act = mb_shift_new(0, -20, coord2, word);
 	
 	gettimeofday(&tv, NULL);
 	MB_TIMEVAL_SET(&mbtv, tv.tv_sec, tv.tv_usec);