Reticadas las classes de la carpeta utils

This commit is contained in:
2022-10-18 19:48:13 +02:00
parent 5c68006cb5
commit 07a9ba5b87
15 changed files with 846 additions and 504 deletions
+3 -1
View File
@@ -22,7 +22,9 @@ Screen::Screen(SDL_Window *window, SDL_Renderer *renderer, options_t *options, i
// Crea la textura donde se dibujan los graficos del juego
gameCanvas = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_TARGET, gameCanvasWidth, gameCanvasHeight);
if (gameCanvas == nullptr)
{
printf("TitleSurface could not be created!\nSDL Error: %s\n", SDL_GetError());
}
// Establece el modo de video
setVideoMode(options->fullScreenMode);
@@ -344,7 +346,7 @@ void Screen::renderSpectrumFade()
const float step = (float)spectrumFadeCounter / (float)spectrumFadeLenght;
const int max = spectrumColor.size() - 1;
const int index = max + (0 - max) * step;
const color_t c = spectrumColor[index];
const color_t c = spectrumColor.at(index);
SDL_SetTextureColorMod(gameCanvas, c.r, c.g, c.b);
}