我的类GraphicsManager已经出错了.
GraphicsManager.cpp:
#include "C:\Users\Chris Uzzolina\Desktop\obj\include\GraphicsManager.h"
#include <SDL.h>
#include <string>
GraphicsManager::GraphicsManager(int SCREEN_WIDTH, int SCREEN_HEIGHT, int SCREEN_BPP, std::string caption, SDL_Surface *screen)
{
}
GraphicsManager::~GraphicsManager()
{
//dtor
}
bool init(int SCREEN_WIDTH, int SCREEN_HEIGHT, int SCREEN_BPP, std::string caption, SDL_Surface *scr)
{
//Initialize all SDL subsystems
if( SDL_Init( SDL_INIT_EVERYTHING ) == -1 )
{
return false;
}
//Set up the screen
scr = SDL_SetVideoMode( SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_BPP, SDL_SWSURFACE );
//If there was an error in setting up the screen
if( scr == NULL )
{ …Run Code Online (Sandbox Code Playgroud)