Mercurial > MadButterfly
comparison src/animate.c @ 332:f90c60967a9c
Add mb_progm_finish to terminate the current animation and put all objects in the final position.
It seems that not all words are executed correctly. We need to figure out why.
author | wycc |
---|---|
date | Sat, 07 Mar 2009 08:33:01 +0800 |
parents | 45d9a1e2764d |
children | 586e50f82c1f |
comparison
equal
deleted
inserted
replaced
331:2a8bf3efbc67 | 332:f90c60967a9c |
---|---|
334 | 334 |
335 /* We need timer to abort it. */ | 335 /* We need timer to abort it. */ |
336 progm->cur_timer = timer; | 336 progm->cur_timer = timer; |
337 } | 337 } |
338 | 338 |
339 void mb_progm_finish(mb_progm_t *progm) { | |
340 mb_timeval_t infi; | |
341 | |
342 mb_progm_abort(progm); | |
343 MB_TIMEVAL_SET(&infi, 0x7fffffff,0); | |
344 mb_progm_step(&progm->start_time, &infi,progm); | |
345 } | |
339 void mb_progm_abort(mb_progm_t *progm) { | 346 void mb_progm_abort(mb_progm_t *progm) { |
340 /*! \todo Make sure abort release resources. */ | 347 /*! \todo Make sure abort release resources. */ |
341 if(progm->cur_timer) { | 348 if(progm->cur_timer) { |
342 mb_tman_remove(progm->tman, progm->cur_timer); | 349 mb_tman_remove(progm->tman, progm->cur_timer); |
343 progm->cur_timer = NULL; | 350 progm->cur_timer = NULL; |