65841782c10641ead903fbed75905f0bf4fe44ed
[supertux.git] / src / texture.h
1 //
2 // C Interface: texture
3 //
4 // Description: 
5 //
6 //
7 // Author: Tobias Glaesser <tobi.web@gmx.de>, (C) 2004
8 //
9 // Copyright: See COPYING file that comes with this distribution
10 //
11 //
12
13 #ifndef SUPERTUX_TEXTURE_H
14 #define SUPERTUX_TEXTURE_H
15
16 /* Texture type */
17 typedef struct texture_type
18   {
19    SDL_Surface* sdl_surface;
20    unsigned gl_texture;
21    int w;
22    int h;
23   }  
24 texture_type;
25
26 void texture_setup(int opengl);
27 void texture_load(texture_type* ptexture, char * file, int use_alpha);
28 void texture_from_sdl_surface(texture_type* ptexture, SDL_Surface * sdl_surf, int use_alpha);
29 void texture_free(texture_type* ptexture);
30 void texture_draw(texture_type* ptexture, float x, float y, int update);
31 void texture_draw_bg(texture_type* ptexture, int update);
32 void texture_draw_part(texture_type* ptexture, float x, float y, float w, float h, int update);
33
34 #endif /*SUPERTUX_TEXTURE_H*/
35