Mercurial > MadButterfly
comparison 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 |
comparison
equal
deleted
inserted
replaced
46:46b77c92d118 | 47:f3818d996f4f |
---|---|
304 progm = mb_progm_new(2, &rdman); | 304 progm = mb_progm_new(2, &rdman); |
305 | 305 |
306 MB_TIMEVAL_SET(&start, 1, 0); | 306 MB_TIMEVAL_SET(&start, 1, 0); |
307 MB_TIMEVAL_SET(&playing, 2, 0); | 307 MB_TIMEVAL_SET(&playing, 2, 0); |
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); | 309 act = mb_shift_new(0, 20, coord1, word); |
310 mb_word_add_action(word, act); | |
311 | 310 |
312 MB_TIMEVAL_SET(&start, 3, 0); | 311 MB_TIMEVAL_SET(&start, 3, 0); |
313 MB_TIMEVAL_SET(&playing, 2, 0); | 312 MB_TIMEVAL_SET(&playing, 2, 0); |
314 act = mb_shift_new(0, 20, coord2); | 313 act = mb_shift_new(0, 20, coord2, word); |
315 mb_word_add_action(word, act); | |
316 | 314 |
317 MB_TIMEVAL_SET(&start, 3, 0); | 315 MB_TIMEVAL_SET(&start, 3, 0); |
318 MB_TIMEVAL_SET(&playing, 2, 0); | 316 MB_TIMEVAL_SET(&playing, 2, 0); |
319 word = mb_progm_next_word(progm, &start, &playing); | 317 word = mb_progm_next_word(progm, &start, &playing); |
320 act = mb_shift_new(0, -20, coord1); | 318 act = mb_shift_new(0, -20, coord1, word); |
321 mb_word_add_action(word, act); | |
322 | 319 |
323 MB_TIMEVAL_SET(&start, 3, 0); | 320 MB_TIMEVAL_SET(&start, 3, 0); |
324 MB_TIMEVAL_SET(&playing, 2, 0); | 321 MB_TIMEVAL_SET(&playing, 2, 0); |
325 act = mb_shift_new(0, -20, coord2); | 322 act = mb_shift_new(0, -20, coord2, word); |
326 mb_word_add_action(word, act); | |
327 | 323 |
328 gettimeofday(&tv, NULL); | 324 gettimeofday(&tv, NULL); |
329 MB_TIMEVAL_SET(&mbtv, tv.tv_sec, tv.tv_usec); | 325 MB_TIMEVAL_SET(&mbtv, tv.tv_sec, tv.tv_usec); |
330 mb_progm_start(progm, tman, &mbtv); | 326 mb_progm_start(progm, tman, &mbtv); |
331 | 327 |