diff options
Diffstat (limited to 'src/client/image.h')
| -rw-r--r-- | src/client/image.h | 46 |
1 files changed, 20 insertions, 26 deletions
diff --git a/src/client/image.h b/src/client/image.h index 352654a..9f225c6 100644 --- a/src/client/image.h +++ b/src/client/image.h @@ -1,26 +1,23 @@ - #ifndef IMAGE_H +#define IMAGE_H -# define IMAGE_H - -# include "main.h" -# include "interface.h" +#include "main.h" +#include "interface.h" -# define IMAGE_NO_ALPHA 0 -# define IMAGE_ALPHA 1 +#define IMAGE_NO_ALPHA 0 +#define IMAGE_ALPHA 1 -# define IMAGE_GROUP_BASE "base" -# define IMAGE_GROUP_EXTENDSIO "extension" -# define IMAGE_GROUP_USER "user" -# define IMAGE_GROUP_OTHER "other" +#define IMAGE_GROUP_BASE "base" +#define IMAGE_GROUP_EXTENDSIO "extension" +#define IMAGE_GROUP_USER "user" +#define IMAGE_GROUP_OTHER "other" #ifdef SUPPORT_OPENGL #include <SDL_opengl.h> #endif /* -typedef struct image_struct -{ +typedef struct image_struct { char *name; char *group; SDL_Surface *image; @@ -33,23 +30,20 @@ typedef struct image_struct { int h; SDL_Surface *image; } image_t; -#endif - -#ifdef SUPPORT_OPENGL -typedef struct image_struct -{ - int w; // width of actual picture - int h; // height of actual picture +#else /* SUPPORT_OPENGL */ +typedef struct image_struct { + int w; /* width of actual picture */ + int h; /* height of actual picture */ SDL_Surface *image; - GLuint tw; // width of allocated texture - GLuint th; // height of allocated texture - GLuint tex_id; // texture id + GLuint tw; /* width of allocated texture */ + GLuint th; /* height of allocated texture */ + GLuint tex_id; /* texture id */ } image_t; -#endif +#endif /* SUPPORT_OPENGL */ extern bool_t image_is_inicialized(); extern void image_init(); -extern image_t* image_new(SDL_Surface *surface); +extern image_t *image_new(SDL_Surface *surface); extern void image_destroy(image_t * p); extern image_t *image_add(char *file, int alpha, char *name, char *group); extern image_t *image_get(char *group, char *name); @@ -58,4 +52,4 @@ extern void image_del_all_image_in_group(char *group); extern void image_draw(image_t * p, int x, int y, int px, int py, int w, int h); extern void image_quit(); -#endif +#endif /* IMAGE_H */ |