- fixed problem with asyncron blinkig bonus block
[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 - March 15, 2004
11 */
12
13 #ifndef SUPERTUX_SCREEN_H
14 #define SUPERTUX_SCREEN_H
15
16 #include <SDL.h>
17 #ifndef NOOPENGL
18 #include <SDL_opengl.h>
19 #endif
20 #include "texture.h"
21
22 #define NO_UPDATE false
23 #define UPDATE true
24 #define USE_ALPHA 0
25 #define IGNORE_ALPHA 1
26
27 struct Color
28 {
29   Color() 
30     : red(0), green(0), blue(0)
31   {}
32   
33   Color(int red_, int green_, int blue_)
34     : red(red_), green(green_), blue(blue_)
35   {}
36
37   int red, green, blue;
38 };
39
40 void drawline(int x1, int y1, int x2, int y2, int r, int g, int b, int a);
41 void clearscreen(int r, int g, int b);
42 void drawgradient(Color top_clr, Color bot_clr);
43 void fillrect(float x, float y, float w, float h, int r, int g, int b, int a);
44 void updatescreen(void);
45 void flipscreen(void);
46 void update_rect(SDL_Surface *scr, Sint32 x, Sint32 y, Sint32 w, Sint32 h);
47
48 #endif /*SUPERTUX_SCREEN_H*/