Revision 333
more changes, added docs
basic_sprite.h | ||
---|---|---|
10 | 10 |
* |
11 | 11 |
* @{ |
12 | 12 |
*/ |
13 |
struct basic_sprite; |
|
14 | 13 |
typedef struct basic_sprite basic_sprite_t; |
15 | 14 |
|
15 |
/** |
|
16 |
* @brief Construct basic sprite. |
|
17 |
* @param xpm XPM array to build the basic sprite from |
|
18 |
* @param u0 X-center of the XPM. |
|
19 |
* @param v0 Y-center of the XPM. |
|
20 |
* @return Pointer to created basic_sprite_t, or NULL if fails |
|
21 |
*/ |
|
16 | 22 |
basic_sprite_t* (basic_sprite_ctor)(const char *const *xpm, int16_t u0, int16_t v0); |
23 |
/** |
|
24 |
* @brief Destruct basic sprite. |
|
25 |
* @param p Pointer to basic sprite to destruct. |
|
26 |
*/ |
|
17 | 27 |
void (basic_sprite_dtor)(basic_sprite_t *p); |
28 |
/** |
|
29 |
* @brief Get basic sprite map (pixels). |
|
30 |
* @param p Pointer to basic sprite |
|
31 |
* @return Pixel map |
|
32 |
*/ |
|
18 | 33 |
const uint8_t* (basic_sprite_get_map)(const basic_sprite_t *p); |
34 |
/** |
|
35 |
* @brief Get width. |
|
36 |
* @param p Pointer to basic sprite |
|
37 |
* @return Width |
|
38 |
*/ |
|
19 | 39 |
uint16_t (basic_sprite_get_w) (const basic_sprite_t *p); |
40 |
/** |
|
41 |
* @brief Get height. |
|
42 |
* @param p Pointer to basic sprite |
|
43 |
* @return Height |
|
44 |
*/ |
|
20 | 45 |
uint16_t (basic_sprite_get_h) (const basic_sprite_t *p); |
46 |
/** |
|
47 |
* @brief Get X-center of the basic sprite. |
|
48 |
* @param p Pointer to basic sprite |
|
49 |
* @return X-center |
|
50 |
*/ |
|
21 | 51 |
int16_t (basic_sprite_get_u0) (const basic_sprite_t *p); |
52 |
/** |
|
53 |
* @brief Get Y-center of the basic sprite. |
|
54 |
* @param p Pointer to basic sprite |
|
55 |
* @return Y-center |
|
56 |
*/ |
|
22 | 57 |
int16_t (basic_sprite_get_v0) (const basic_sprite_t *p); |
23 | 58 |
|
24 | 59 |
/** |
Also available in: Unified diff