comparison src/X_main.c @ 48:bdf711cbf0fb

Use absolute time to dispatch animation actions.
author Thinker K.F. Li <thinker@branda.to>
date Sat, 09 Aug 2008 18:26:20 +0800
parents f3818d996f4f
children 6a3726fa7aad
comparison
equal deleted inserted replaced
47:f3818d996f4f 48:bdf711cbf0fb
308 word = mb_progm_next_word(progm, &start, &playing); 308 word = mb_progm_next_word(progm, &start, &playing);
309 act = mb_shift_new(0, 20, coord1, word); 309 act = mb_shift_new(0, 20, coord1, word);
310 310
311 MB_TIMEVAL_SET(&start, 3, 0); 311 MB_TIMEVAL_SET(&start, 3, 0);
312 MB_TIMEVAL_SET(&playing, 2, 0); 312 MB_TIMEVAL_SET(&playing, 2, 0);
313 act = mb_shift_new(0, 20, coord2, word); 313 act = mb_shift_new(0, -20, coord2, word);
314 314
315 MB_TIMEVAL_SET(&start, 3, 0); 315 MB_TIMEVAL_SET(&start, 3, 0);
316 MB_TIMEVAL_SET(&playing, 2, 0); 316 MB_TIMEVAL_SET(&playing, 2, 0);
317 word = mb_progm_next_word(progm, &start, &playing); 317 word = mb_progm_next_word(progm, &start, &playing);
318 act = mb_shift_new(0, -20, coord1, word); 318 act = mb_shift_new(0, -20, coord1, word);
319 319
320 MB_TIMEVAL_SET(&start, 3, 0); 320 MB_TIMEVAL_SET(&start, 3, 0);
321 MB_TIMEVAL_SET(&playing, 2, 0); 321 MB_TIMEVAL_SET(&playing, 2, 0);
322 act = mb_shift_new(0, -20, coord2, word); 322 act = mb_shift_new(0, 20, coord2, word);
323 323
324 gettimeofday(&tv, NULL); 324 gettimeofday(&tv, NULL);
325 MB_TIMEVAL_SET(&mbtv, tv.tv_sec, tv.tv_usec); 325 MB_TIMEVAL_SET(&mbtv, tv.tv_sec, tv.tv_usec);
326 mb_progm_start(progm, tman, &mbtv); 326 mb_progm_start(progm, tman, &mbtv);
327 327