diff src/X_main.c @ 863:e6c107b2e271

Do more works in X_main.c for profiling
author Thinker K.F. Li <thinker@codemud.net>
date Wed, 22 Sep 2010 20:47:41 +0800
parents 586e50f82c1f
children 4f4abce1b5df
line wrap: on
line diff
--- a/src/X_main.c	Mon Sep 20 21:49:23 2010 +0800
+++ b/src/X_main.c	Wed Sep 22 20:47:41 2010 +0800
@@ -210,7 +210,7 @@
     tman = mb_tman_new();
     if(tman) {
 	/* Prepare an animation program. */
-	progm = mb_progm_new(10, &rdman);
+	progm = mb_progm_new(30, &rdman);
 
 	MB_TIMEVAL_SET(&start, 0, 0);
 	MB_TIMEVAL_SET(&playing, 1, 0);
@@ -237,6 +237,166 @@
 	act = mb_chgcolor_new(1, 0, 0, 0.5, fill2, word);
 	act = mb_visibility_new(VIS_VISIBLE, coord3, word);
 
+	MB_TIMEVAL_SET(&start, 5, 0);
+	MB_TIMEVAL_SET(&playing, 2, 0);
+	word = mb_progm_next_word(progm, &start, &playing);
+
+	act = mb_shift_new(0, 20, coord1, word);
+	act = mb_shift_new(0, -20, coord2, word);
+	act = mb_chgcolor_new(1, 0, 0, 1, fill1, word);
+	act = mb_chgcolor_new(0, 0, 1, 1, fill2, word);
+	act = mb_visibility_new(VIS_HIDDEN, coord3, word);
+
+	MB_TIMEVAL_SET(&start, 7, 0);
+	MB_TIMEVAL_SET(&playing, 2, 0);
+	word = mb_progm_next_word(progm, &start, &playing);
+
+	act = mb_shift_new(0, -20, coord1, word);
+	act = mb_shift_new(0, 20, coord2, word);
+	act = mb_chgcolor_new(0, 1, 0, 0.5, fill1, word);
+	act = mb_chgcolor_new(1, 0, 0, 0.5, fill2, word);
+	act = mb_visibility_new(VIS_VISIBLE, coord3, word);
+
+	MB_TIMEVAL_SET(&start, 9, 0);
+	MB_TIMEVAL_SET(&playing, 2, 0);
+	word = mb_progm_next_word(progm, &start, &playing);
+
+	act = mb_shift_new(0, 20, coord1, word);
+	act = mb_shift_new(0, -20, coord2, word);
+	act = mb_chgcolor_new(0, 0, 1, 1, fill1, word);
+	act = mb_chgcolor_new(1, 0, 0, 1, fill2, word);
+	act = mb_visibility_new(VIS_HIDDEN, coord3, word);
+
+	MB_TIMEVAL_SET(&start, 11, 0);
+	MB_TIMEVAL_SET(&playing, 2, 0);
+	word = mb_progm_next_word(progm, &start, &playing);
+
+	act = mb_shift_new(0, -20, coord1, word);
+	act = mb_shift_new(0, 20, coord2, word);
+	act = mb_chgcolor_new(0, 1, 0, 0.5, fill1, word);
+	act = mb_chgcolor_new(1, 0, 0, 0.5, fill2, word);
+	act = mb_visibility_new(VIS_VISIBLE, coord3, word);
+
+	MB_TIMEVAL_SET(&start, 13, 0);
+	MB_TIMEVAL_SET(&playing, 2, 0);
+	word = mb_progm_next_word(progm, &start, &playing);
+
+	act = mb_shift_new(0, 20, coord1, word);
+	act = mb_shift_new(0, -20, coord2, word);
+	act = mb_chgcolor_new(0, 0, 1, 1, fill1, word);
+	act = mb_chgcolor_new(1, 0, 0, 1, fill2, word);
+	act = mb_visibility_new(VIS_HIDDEN, coord3, word);
+
+	MB_TIMEVAL_SET(&start, 15, 0);
+	MB_TIMEVAL_SET(&playing, 2, 0);
+	word = mb_progm_next_word(progm, &start, &playing);
+
+	act = mb_shift_new(0, -20, coord1, word);
+	act = mb_shift_new(0, 20, coord2, word);
+	act = mb_chgcolor_new(0, 1, 0, 0.5, fill1, word);
+	act = mb_chgcolor_new(1, 0, 0, 0.5, fill2, word);
+	act = mb_visibility_new(VIS_VISIBLE, coord3, word);
+
+	MB_TIMEVAL_SET(&start, 17, 0);
+	MB_TIMEVAL_SET(&playing, 2, 0);
+	word = mb_progm_next_word(progm, &start, &playing);
+
+	act = mb_shift_new(0, 20, coord1, word);
+	act = mb_shift_new(0, -20, coord2, word);
+	act = mb_chgcolor_new(0, 0, 1, 1, fill1, word);
+	act = mb_chgcolor_new(1, 0, 0, 1, fill2, word);
+	act = mb_visibility_new(VIS_HIDDEN, coord3, word);
+
+	MB_TIMEVAL_SET(&start, 19, 0);
+	MB_TIMEVAL_SET(&playing, 2, 0);
+	word = mb_progm_next_word(progm, &start, &playing);
+
+	act = mb_shift_new(0, -20, coord1, word);
+	act = mb_shift_new(0, 20, coord2, word);
+	act = mb_chgcolor_new(0, 1, 0, 0.5, fill1, word);
+	act = mb_chgcolor_new(1, 0, 0, 0.5, fill2, word);
+	act = mb_visibility_new(VIS_VISIBLE, coord3, word);
+
+	MB_TIMEVAL_SET(&start, 21, 0);
+	MB_TIMEVAL_SET(&playing, 2, 0);
+	word = mb_progm_next_word(progm, &start, &playing);
+
+	act = mb_shift_new(0, 20, coord1, word);
+	act = mb_shift_new(0, -20, coord2, word);
+	act = mb_chgcolor_new(0, 0, 1, 1, fill1, word);
+	act = mb_chgcolor_new(1, 0, 0, 1, fill2, word);
+	act = mb_visibility_new(VIS_HIDDEN, coord3, word);
+
+	MB_TIMEVAL_SET(&start, 23, 0);
+	MB_TIMEVAL_SET(&playing, 2, 0);
+	word = mb_progm_next_word(progm, &start, &playing);
+
+	act = mb_shift_new(0, -20, coord1, word);
+	act = mb_shift_new(0, 20, coord2, word);
+	act = mb_chgcolor_new(0, 1, 0, 0.5, fill1, word);
+	act = mb_chgcolor_new(1, 0, 0, 0.5, fill2, word);
+	act = mb_visibility_new(VIS_VISIBLE, coord3, word);
+
+	MB_TIMEVAL_SET(&start, 25, 0);
+	MB_TIMEVAL_SET(&playing, 2, 0);
+	word = mb_progm_next_word(progm, &start, &playing);
+
+	act = mb_shift_new(0, 20, coord1, word);
+	act = mb_shift_new(0, -20, coord2, word);
+	act = mb_chgcolor_new(0, 0, 1, 1, fill1, word);
+	act = mb_chgcolor_new(1, 0, 0, 1, fill2, word);
+	act = mb_visibility_new(VIS_HIDDEN, coord3, word);
+
+	MB_TIMEVAL_SET(&start, 27, 0);
+	MB_TIMEVAL_SET(&playing, 2, 0);
+	word = mb_progm_next_word(progm, &start, &playing);
+
+	act = mb_shift_new(0, -20, coord1, word);
+	act = mb_shift_new(0, 20, coord2, word);
+	act = mb_chgcolor_new(0, 1, 0, 0.5, fill1, word);
+	act = mb_chgcolor_new(1, 0, 0, 0.5, fill2, word);
+	act = mb_visibility_new(VIS_VISIBLE, coord3, word);
+
+	MB_TIMEVAL_SET(&start, 29, 0);
+	MB_TIMEVAL_SET(&playing, 2, 0);
+	word = mb_progm_next_word(progm, &start, &playing);
+
+	act = mb_shift_new(0, 20, coord1, word);
+	act = mb_shift_new(0, -20, coord2, word);
+	act = mb_chgcolor_new(0, 0, 1, 1, fill1, word);
+	act = mb_chgcolor_new(1, 0, 0, 1, fill2, word);
+	act = mb_visibility_new(VIS_HIDDEN, coord3, word);
+
+	MB_TIMEVAL_SET(&start, 31, 0);
+	MB_TIMEVAL_SET(&playing, 2, 0);
+	word = mb_progm_next_word(progm, &start, &playing);
+
+	act = mb_shift_new(0, -20, coord1, word);
+	act = mb_shift_new(0, 20, coord2, word);
+	act = mb_chgcolor_new(0, 1, 0, 0.5, fill1, word);
+	act = mb_chgcolor_new(1, 0, 0, 0.5, fill2, word);
+	act = mb_visibility_new(VIS_VISIBLE, coord3, word);
+
+	MB_TIMEVAL_SET(&start, 33, 0);
+	MB_TIMEVAL_SET(&playing, 2, 0);
+	word = mb_progm_next_word(progm, &start, &playing);
+
+	act = mb_shift_new(0, 20, coord1, word);
+	act = mb_shift_new(0, -20, coord2, word);
+	act = mb_chgcolor_new(0, 0, 1, 1, fill1, word);
+	act = mb_chgcolor_new(1, 0, 0, 1, fill2, word);
+	act = mb_visibility_new(VIS_HIDDEN, coord3, word);
+
+	MB_TIMEVAL_SET(&start, 35, 0);
+	MB_TIMEVAL_SET(&playing, 2, 0);
+	word = mb_progm_next_word(progm, &start, &playing);
+
+	act = mb_shift_new(0, -20, coord1, word);
+	act = mb_shift_new(0, 20, coord2, word);
+	act = mb_chgcolor_new(0, 1, 0, 0.5, fill1, word);
+	act = mb_chgcolor_new(1, 0, 0, 0.5, fill2, word);
+	act = mb_visibility_new(VIS_VISIBLE, coord3, word);
+
 	/* Start playing the program. */
 	gettimeofday(&tv, NULL);
 	MB_TIMEVAL_SET(&mbtv, tv.tv_sec, tv.tv_usec);