#include #include "Screen.h" Screen::Screen() { // Turn on the main screen if (!(screen = SDL_SetVideoMode(SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_BPP, SDL_SWSURFACE))) std::cout << "Error setting video mode.\n"; // Set window title SDL_WM_SetCaption("Intense Marcus", NULL); } void Screen::blit(int x, int y, SDL_Surface* src, SDL_Rect* clip) { // Destination position SDL_Rect pos; pos.x = x; pos.y = y; SDL_BlitSurface(src, clip, screen, &pos); } void Screen::flip() { if (SDL_Flip(screen) == -1) std::cout << "Error flipping screen.\n"; }