Muntat a c++14 per a make_unique

Mes autos, const i constexpr perl codi
Ara la classe Screen es un poc pitjor
This commit is contained in:
2024-10-06 14:58:00 +02:00
parent 25a2753b13
commit afe092c742
16 changed files with 290 additions and 381 deletions

View File

@@ -117,7 +117,7 @@ Director::~Director()
Asset::destroy();
Input::destroy();
Screen::destroy();
//Screen::destroy();
OnScreenHelp::destroy();
deleteSounds();
@@ -275,7 +275,7 @@ bool Director::initSDL()
#endif
// Establece el filtro de la textura
if (!SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, std::to_string(options.video.filter).c_str()))
if (!SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, std::to_string(static_cast<int>(options.video.filter)).c_str()))
{
#ifdef VERBOSE
std::cout << "Warning: texture filtering not enabled!\n";
@@ -486,12 +486,6 @@ bool Director::setFileList()
void Director::loadParams(std::string filepath)
{
loadParamsFromFile(filepath);
// Modifica las opciones desde el fichero de parametros
options.video.window.width = options.video.window.size * param.game.width;
options.video.window.height = options.video.window.size * param.game.height;
options.video.gameWidth = param.game.width;
options.video.gameHeight = param.game.height;
}
// Comprueba los parametros del programa