Actualizada la clase screen con nuevos procedimientos. Incluído el fichero const.h. Cambio de tamaño de ventana y pantalla completa

This commit is contained in:
2022-08-30 17:59:10 +02:00
parent 16b7bcc091
commit a5c983df9d
9 changed files with 162 additions and 54 deletions

View File

@@ -9,8 +9,8 @@ Prog::Prog(std::string executablePath)
options->windowSize = 2;
options->filter = FILTER_NEAREST;
options->vSync = true;
options->screenWidth = GAME_WIDTH * options->windowSize;
options->screenHeight = GAME_HEIGHT * options->windowSize;
options->screenWidth = GAMECANVAS_WIDTH * options->windowSize;
options->screenHeight = GAMECANVAS_HEIGHT * options->windowSize;
options->integerScale = true;
options->keepAspect = true;
@@ -29,7 +29,8 @@ Prog::Prog(std::string executablePath)
section.name = SECTION_PROG_GAME;
}
input = new Input(asset->get("gamecontrollerdb.txt"));
screen = new Screen(window, renderer, options);
screen = new Screen(window, renderer, options, GAMECANVAS_WIDTH, GAMECANVAS_HEIGHT);
screen->setBorderColor(borderColor);
// Controles
input->bindKey(INPUT_UP, SDL_SCANCODE_UP);