Project

General

Profile

Revision 285

deleting sprite.h

View differences:

graph.h
50 50
/// DRAW
51 51
int (graph_draw)(void);
52 52

  
53
/// SPRITE ================================
54
struct basic_sprite;
55
typedef struct basic_sprite basic_sprite_t;
56

  
57
basic_sprite_t* (basic_sprite_ctor)(const char **xpm, int16_t u0, int16_t v0);
58
void            (basic_sprite_dtor)(basic_sprite_t *p);
59
const uint8_t* (basic_sprite_get_map)(const basic_sprite_t *p);
60
uint16_t       (basic_sprite_get_w)  (const basic_sprite_t *p);
61
uint16_t       (basic_sprite_get_h)  (const basic_sprite_t *p);
62
int16_t        (basic_sprite_get_u0) (const basic_sprite_t *p);
63
int16_t        (basic_sprite_get_v0) (const basic_sprite_t *p);
64

  
65
struct sprite;
66
typedef struct sprite sprite_t;
67

  
68
sprite_t* (sprite_ctor)(const basic_sprite_t *bsp);
69
/*
70
 * /!\ WARNING: Entity destructor does not destruct the basic_sprite passed as
71
 * constructor arguments, since it is assumed the same basic_sprite may be used to
72
 * draw several sprites. It is thus YOUR responsibility to delete basic_sprite's.
73
 * @param   p   Pointer to sprite_t to be destructed
74
 */
75
void      (sprite_dtor)(sprite_t *p);
76

  
77
void (sprite_set_pos)   (sprite_t *p, int16_t x, int16_t y);
78
void (sprite_set_center)(sprite_t *p, int16_t u0, int16_t v0);
79
void (sprite_set_angle) (sprite_t *p, double angle);
80
void (sprite_set_scale) (sprite_t *p, double scale);
81

  
82
int16_t  (sprite_get_x)(const sprite_t *p);
83
int16_t  (sprite_get_y)(const sprite_t *p);
84
double   (sprite_get_angle)(const sprite_t *p);
85
uint16_t (sprite_get_w)(const sprite_t *p);
86
uint16_t (sprite_get_h)(const sprite_t *p);
87

  
88
void (sprite_draw)(const sprite_t *p);
89

  
53 90
#endif /* end of include guard: GRAPH_H_INCLUDED */

Also available in: Unified diff