Mercurial > MadButterfly
comparison src/event.c @ 159:b90abd31a281
Postponse free of coords, shapes, and paints when the rdman is dirty.
- Life-cycle of shapes and paints are managed by rdman.
- Add redraw_man_t::free_objs to collect objects their freeing are
postonsed.
Know Issue:
- Bullet of tank are not removed from screen when it is go out the range
of the map.
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Sun, 05 Oct 2008 23:32:58 +0800 |
parents | c1cdd3fcd28f |
children | c7e5b8779bb5 |
comparison
equal
deleted
inserted
replaced
158:c1cdd3fcd28f | 159:b90abd31a281 |
---|---|
8 #define OK 0 | 8 #define OK 0 |
9 #define ERR -1 | 9 #define ERR -1 |
10 | 10 |
11 #define ARRAY_EXT_SZ 64 | 11 #define ARRAY_EXT_SZ 64 |
12 | 12 |
13 | |
14 static int extend_memblk(void **buf, int o_size, int n_size) { | |
15 void *new_buf; | |
16 | |
17 new_buf = realloc(*buf, n_size); | |
18 if(new_buf == NULL) | |
19 return ERR; | |
20 | |
21 *buf = new_buf; | |
22 | |
23 return OK; | |
24 } | |
25 | 13 |
26 DARRAY_DEFINE(geos, geo_t *); | 14 DARRAY_DEFINE(geos, geo_t *); |
27 | 15 |
28 /*! \brief Add a geo_t object to general geo list. | 16 /*! \brief Add a geo_t object to general geo list. |
29 * | 17 * |