Revision 178
minor fixes
sprite.c | ||
---|---|---|
36 | 36 |
} |
37 | 37 |
void (sprite_dtor)(sprite_t *p){ |
38 | 38 |
if(p == NULL) return; |
39 |
if(p->map) free(p->map);
|
|
39 |
free(p->map); |
|
40 | 40 |
free(p); |
41 | 41 |
} |
42 | 42 |
|
... | ... | |
46 | 46 |
void (sprite_set_angle) (sprite_t *p, double angle){ p->theta = angle; } |
47 | 47 |
void (sprite_set_center)(sprite_t *p, int16_t u0, int16_t v0){ p->u0 = u0; p->v0 = v0; } |
48 | 48 |
|
49 |
int sprite_get_x(const sprite_t *p){ return p->x; }
|
|
50 |
int sprite_get_y(const sprite_t *p){ return p->y; }
|
|
51 |
int sprite_get_w(const sprite_t *p){ return p->w; }
|
|
52 |
int sprite_get_h(const sprite_t *p){ return p->h; }
|
|
49 |
int16_t (sprite_get_x)(const sprite_t *p){ return p->x; }
|
|
50 |
int16_t (sprite_get_y)(const sprite_t *p){ return p->y; }
|
|
51 |
uint16_t (sprite_get_w)(const sprite_t *p){ return p->w; }
|
|
52 |
uint16_t (sprite_get_h)(const sprite_t *p){ return p->h; }
|
|
53 | 53 |
|
54 | 54 |
void (sprite_src2pic)(const sprite_t *p, int16_t x, int16_t y, int16_t *u, int16_t *v){ |
55 | 55 |
int16_t dx = x - p->x; |
Also available in: Unified diff