fixed a few bugs. (One of them thanks to a patch from Ricardo). Made more code cleanu...
[supertux.git] / src / screen.h
1 /*
2   screen.h
3   
4   Super Tux - Screen Functions
5   
6   by Bill Kendrick
7   bill@newbreedsoftware.com
8   http://www.newbreedsoftware.com/supertux/
9   
10   April 11, 2000 - April 21, 2000
11 */
12
13 #include <SDL.h>
14 #ifndef NOOPENGL
15 #include <SDL_opengl.h>
16
17 #ifndef GL_NV_texture_rectangle
18 #define GL_TEXTURE_RECTANGLE_NV           0x84F5
19 #define GL_TEXTURE_BINDING_RECTANGLE_NV   0x84F6
20 #define GL_PROXY_TEXTURE_RECTANGLE_NV     0x84F7
21 #define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV  0x84F8
22 #endif
23 #endif
24
25 #define NO_UPDATE 0
26 #define UPDATE 1
27 #define USE_ALPHA 0
28 #define IGNORE_ALPHA 1
29
30 void load_and_display_image(char * file);
31 void clearscreen(float r, float g, float b);
32 void fillrect(float x, float y, float w, float h, float r, float g, float b);
33 void updatescreen(void);
34 void flipscreen(void);
35 SDL_Surface * load_image(char * file, int use_alpha);
36 /*
37 void drawimage(SDL_Surface * surf, float x, float y, int update);
38 void drawpart(SDL_Surface * surf, float x, float y, float w, float h, int update);
39 */
40 void drawtext(char * text, int x, int y, SDL_Surface * surf, int update, int shadowsize);
41 void drawcenteredtext(char * text, int y, SDL_Surface * surf, int update, int shadowsize);
42 void erasetext(char * text, int x, int y, SDL_Surface * surf, int update, int shadowsize);
43 void erasecenteredtext(char * text, int y, SDL_Surface * surf, int update, int shadowsize);
44 void update_rect(SDL_Surface *scr, Sint32 x, Sint32 y, Sint32 w, Sint32 h);
45