Mercurial > MadButterfly
comparison examples/tank/tank_main.c @ 193:923d91dfb6af
Hide bang before completed and remove progm after completed.
- Bang graphics was hidden, not removed.
- Bang graphics should be freed in some day future.
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Wed, 19 Nov 2008 11:26:01 +0800 |
parents | 54fdc2a65242 |
children | 45d9a1e2764d |
comparison
equal
deleted
inserted
replaced
192:54fdc2a65242 | 193:923d91dfb6af |
---|---|
390 | 390 |
391 MB_TIMEVAL_SET(&start, 1, 500000); | 391 MB_TIMEVAL_SET(&start, 1, 500000); |
392 word = mb_progm_next_word(progm, &start, &playing); | 392 word = mb_progm_next_word(progm, &start, &playing); |
393 mb_visibility_new(VIS_VISIBLE, bang->root_coord, word); | 393 mb_visibility_new(VIS_VISIBLE, bang->root_coord, word); |
394 | 394 |
395 /*! \todo Remove bang and program when program stops. */ | 395 MB_TIMEVAL_SET(&start, 2, 500000); |
396 word = mb_progm_next_word(progm, &start, &playing); | |
397 mb_visibility_new(VIS_HIDDEN, bang->root_coord, word); | |
398 | |
399 mb_progm_free_completed(progm); | |
400 | |
401 /*! \todo Remove bang when program is completed. | |
402 * The graphics are not removed from rdman after progm is completed, now. | |
403 * They should be freed to release resources. | |
404 */ | |
396 get_now(&now); | 405 get_now(&now); |
397 mb_progm_start(progm, tman, &now); | 406 mb_progm_start(progm, tman, &now); |
398 } | 407 } |
399 | 408 |
400 /*! \brief To check if a bullet hits walls or tanks. */ | 409 /*! \brief To check if a bullet hits walls or tanks. */ |