comparison src/X_main.c @ 44:7d9af44f095b

Demo of concurrent words
author Thinker K.F. Li <thinker@branda.to>
date Sat, 09 Aug 2008 08:41:13 +0800
parents e3295c07faa9
children f3818d996f4f
comparison
equal deleted inserted replaced
43:6270230b9248 44:7d9af44f095b
309 act = mb_shift_new(0, 20, coord1); 309 act = mb_shift_new(0, 20, coord1);
310 mb_word_add_action(word, act); 310 mb_word_add_action(word, act);
311 311
312 MB_TIMEVAL_SET(&start, 3, 0); 312 MB_TIMEVAL_SET(&start, 3, 0);
313 MB_TIMEVAL_SET(&playing, 2, 0); 313 MB_TIMEVAL_SET(&playing, 2, 0);
314 act = mb_shift_new(0, 20, coord2);
315 mb_word_add_action(word, act);
316
317 MB_TIMEVAL_SET(&start, 3, 0);
318 MB_TIMEVAL_SET(&playing, 2, 0);
314 word = mb_progm_next_word(progm, &start, &playing); 319 word = mb_progm_next_word(progm, &start, &playing);
315 act = mb_shift_new(0, 20, coord2); 320 act = mb_shift_new(0, -20, coord1);
321 mb_word_add_action(word, act);
322
323 MB_TIMEVAL_SET(&start, 3, 0);
324 MB_TIMEVAL_SET(&playing, 2, 0);
325 act = mb_shift_new(0, -20, coord2);
316 mb_word_add_action(word, act); 326 mb_word_add_action(word, act);
317 327
318 gettimeofday(&tv, NULL); 328 gettimeofday(&tv, NULL);
319 MB_TIMEVAL_SET(&mbtv, tv.tv_sec, tv.tv_usec); 329 MB_TIMEVAL_SET(&mbtv, tv.tv_sec, tv.tv_usec);
320 mb_progm_start(progm, tman, &mbtv); 330 mb_progm_start(progm, tman, &mbtv);