# HG changeset patch # User Thinker K.F. Li # Date 1285159661 -28800 # Node ID e6c107b2e271a1c0c571299b531974a8f4002091 # Parent d1c98eb474e1071b7dd4c61df6b3e42915d1cafd Do more works in X_main.c for profiling diff -r d1c98eb474e1 -r e6c107b2e271 src/X_main.c --- 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);