{
Renderer::Renderer()
{
+ ::Renderer::instance_ = this;
+
const SDL_VideoInfo *info = SDL_GetVideoInfo();
log_info << "Hardware surfaces are " << (info->hw_available ? "" : "not ") << "available." << std::endl;
log_info << "Hardware to hardware blits are " << (info->blit_hw ? "" : "not ") << "accelerated." << std::endl;
int flags = SDL_SWSURFACE | SDL_ANYFORMAT;
if(config->use_fullscreen)
flags |= SDL_FULLSCREEN;
- int width = config->screenwidth;
- int height = config->screenheight;
+
+ int width = 800; //FIXME: config->screenwidth;
+ int height = 600; //FIXME: config->screenheight;
screen = SDL_SetVideoMode(width, height, 0, flags);
if(screen == 0) {
throw std::runtime_error(msg.str());
}
+ numerator = 1;
+ denominator = 1;
+ /* FIXME:
float xfactor = (float) config->screenwidth / SCREEN_WIDTH;
float yfactor = (float) config->screenheight / SCREEN_HEIGHT;
if(xfactor < yfactor)
numerator = config->screenheight;
denominator = SCREEN_HEIGHT;
}
-
+ */
if(texture_manager == 0)
texture_manager = new TextureManager();
}
{
SDL_Flip(screen);
}
+
+ void
+ Renderer::resize(int, int)
+ {
+
+ }
}