7 #define IMAGE_NO_ALPHA 0
10 #define IMAGE_GROUP_BASE "base"
11 #define IMAGE_GROUP_EXTENDSIO "extension"
12 #define IMAGE_GROUP_USER "user"
13 #define IMAGE_GROUP_OTHER "other"
16 #include <SDL_opengl.h>
20 typedef struct image_struct {
27 #ifndef SUPPORT_OPENGL
28 typedef struct image_struct
{
33 #else /* SUPPORT_OPENGL */
34 typedef struct image_struct
{
35 int w
; /* width of actual picture */
36 int h
; /* height of actual picture */
38 GLuint tw
; /* width of allocated texture */
39 GLuint th
; /* height of allocated texture */
40 GLuint tex_id
; /* texture id */
42 #endif /* SUPPORT_OPENGL */
44 extern bool_t
image_is_inicialized();
45 extern void image_init();
46 extern image_t
*image_new(SDL_Surface
*surface
);
47 extern void image_destroy(image_t
* p
);
48 extern image_t
*image_add(char *file
, int alpha
, char *name
, char *group
);
49 extern image_t
*image_get(char *group
, char *name
);
50 extern void image_del(char *group
, char *name
);
51 extern void image_del_all_image_in_group(char *group
);
52 extern void image_draw(image_t
* p
, int x
, int y
, int px
, int py
, int w
, int h
);
53 extern void image_quit();