SDL_image, png pictures
[sdlbotor.git] / SDLVideoOut.h
blob1a31597168a3dfcfde58d2c1a365b48367d33852
1 #ifndef SDLVIDEOOUT_H
2 #define SDLVIDEOOUT_H
4 #ifdef __linux__
5 #include <SDL/SDL.h>
6 #include <SDL/SDL_gfxPrimitives.h>
7 #else
8 #include <SDL.h>
9 #include <SDL_gfxPrimitives.h>
10 #endif
12 namespace botor
15 class SDLVideoOut
18 SDL_Surface *screen;
20 public:
22 SDLVideoOut( int width, int height, int bpp, Uint32 flags = SDL_HWSURFACE | SDL_DOUBLEBUF );
24 Uint32 MapRGBA( Uint8 r, Uint8 g, Uint8 b, Uint8 a = 255 );
25 Uint32 MapRGB( Uint8 r, Uint8 g, Uint8 b );
27 void Clear( Uint32 color = 0 );
29 void Flip( );
31 void Blit( SDL_Surface *src, Sint16 x, Sint16 y );
32 void Blit( SDL_Surface *src, SDL_Rect *srcRect, Sint16 x, Sint16 y );
34 void DrawString( char *string, Sint16 x, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a = 255 );
36 int GetWidth();
37 int GetHeight();
42 #endif