Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef SDL_GRAPHICS_H
- #define SDL_GRAPHICS_H
- #include "SDL.h"
- #include "SDL_TTF.h"
- class SDL_Graphics
- {
- private:
- SDL_Surface *screen;
- SDL_Surface *greensquare;
- SDL_Surface *redsquare;
- int backgroundColorRed, backgroundColorGreen, backgroundColorBlue;
- public:
- //initializes SDL
- SDL_Graphics(int windowWidth, int windowHeight, int bgR, int bgG, int bgB);
- ~SDL_Graphics();
- SDL_Surface* loadBitmap(const char* bitmapFileName);
- void closeBitmap(SDL_Surface* bitmap);
- void clearScreen();
- void updateScreen();
- void drawSprite(int x, int y, SDL_Surface* source, SDL_Surface* destination, SDL_Rect* clip);
- void setBackgroundColor(int r, int g, int b);
- SDL_Surface* getShapeSurfaceGreenSquare();
- SDL_Surface* getShapeSurfaceRedSquare();
- SDL_Surface* getShapeSurfaceScreen();
- };
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement