Sustituyendo todos los defines de const.h

This commit is contained in:
2022-08-29 21:07:52 +02:00
parent 0d27774c74
commit add7e5201a
12 changed files with 19 additions and 24 deletions

View File

@@ -1,4 +1,4 @@
#include "const.h"
#include "utils.h"
#include "director.h"
#include <iostream>
@@ -41,10 +41,6 @@ Director::Director(std::string path)
// Inicializa JailAudio
initJailAudio();
// Aplica las opciones
SDL_SetWindowFullscreen(window, options->fullScreenMode);
SDL_SetWindowSize(window, SCREEN_WIDTH * options->windowSize, SCREEN_HEIGHT * options->windowSize);
// Inicializa el resto de variables
init(section);
}
@@ -122,7 +118,7 @@ bool Director::initSDL()
}
// Crea la ventana
window = SDL_CreateWindow(WINDOW_CAPTION, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, VIEW_WIDTH, VIEW_HEIGHT, SDL_WINDOW_SHOWN | SDL_WINDOW_ALLOW_HIGHDPI);
window = SDL_CreateWindow(WINDOW_CAPTION, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, options->screenWidth, options->screenHeight, SDL_WINDOW_SHOWN | SDL_WINDOW_ALLOW_HIGHDPI);
if (window == NULL)
{
printf("Window could not be created!\nSDL Error: %s\n", SDL_GetError());
@@ -147,7 +143,7 @@ bool Director::initSDL()
SDL_SetRenderDrawColor(renderer, 0x00, 0x00, 0x00, 0xFF);
// Establece el tamaño del buffer de renderizado
SDL_RenderSetLogicalSize(renderer, SCREEN_WIDTH, SCREEN_HEIGHT);
SDL_RenderSetLogicalSize(renderer, options->screenWidth, options->screenHeight);
// Establece el modo de mezcla
SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_BLEND);