Revision 192
added zoom/scale
sprite.h | ||
---|---|---|
1 | 1 |
#ifndef SPRITE_H_INCLUDED |
2 | 2 |
#define SPRITE_H_INCLUDED |
3 | 3 |
|
4 |
struct basic_sprite; |
|
5 |
typedef struct basic_sprite basic_sprite_t; |
|
6 |
|
|
7 |
basic_sprite_t* (basic_sprite_ctor)(const char **xpm, int16_t u0, int16_t v0); |
|
8 |
void (basic_sprite_dtor)(basic_sprite_t *p); |
|
9 |
|
|
10 |
const uint8_t* (basic_sprite_get_map)(const basic_sprite_t *p); |
|
11 |
uint16_t (basic_sprite_get_w) (const basic_sprite_t *p); |
|
12 |
uint16_t (basic_sprite_get_h) (const basic_sprite_t *p); |
|
13 |
int16_t (basic_sprite_get_u0) (const basic_sprite_t *p); |
|
14 |
int16_t (basic_sprite_get_v0) (const basic_sprite_t *p); |
|
15 |
|
|
4 | 16 |
struct sprite; |
5 | 17 |
typedef struct sprite sprite_t; |
6 | 18 |
|
7 |
sprite_t* (sprite_ctor)(const char **xpm, int u0, int v0); |
|
19 |
sprite_t* (sprite_ctor)(const basic_sprite_t *bsp); |
|
20 |
/* |
|
21 |
* /!\ WARNING: Entity destructor does not destruct the basic_sprite passed as |
|
22 |
* constructor arguments, since it is assumed the same basic_sprite may be used to |
|
23 |
* draw several sprites. It is thus YOUR responsibility to delete basic_sprite's. |
|
24 |
* @param p Pointer to sprite_t to be destructed |
|
25 |
*/ |
|
8 | 26 |
void (sprite_dtor)(sprite_t *p); |
9 | 27 |
|
10 | 28 |
void (sprite_set_pos) (sprite_t *p, int16_t x, int16_t y); |
Also available in: Unified diff