fix: s'havien fotut els dos finals, pero ja estan corregits

This commit is contained in:
2025-03-02 13:43:23 +01:00
parent cdf0b0a694
commit 0d74a8a29f
15 changed files with 214 additions and 277 deletions

View File

@@ -52,35 +52,13 @@ Screen::Screen(SDL_Window *window, SDL_Renderer *renderer)
SDL_RenderSetIntegerScale(renderer_, options.video.integer_scale ? SDL_TRUE : SDL_FALSE);
// Crea la textura donde se vuelcan las surfaces
surface_texture_ = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STREAMING, options.game.width, options.game.height);
if (surface_texture_ == nullptr)
{
if (options.console)
{
std::cout << "surface_texture_ could not be created!\nSDL Error: " << SDL_GetError() << std::endl;
}
}
//SDL_SetTextureBlendMode(surface_texture_, SDL_BLENDMODE_BLEND);
surface_texture_ = createTexture(renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STREAMING, options.game.width, options.game.height);
// Crea la textura donde se dibujan los graficos del juego
game_texture_ = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_TARGET, options.game.width, options.game.height);
if (game_texture_ == nullptr)
{
if (options.console)
{
std::cout << "game_texture_ could not be created!\nSDL Error: " << SDL_GetError() << std::endl;
}
}
game_texture_ = createTexture(renderer, options.game.width, options.game.height);
// Crea la textura donde se dibuja el borde que rodea el area de juego
border_texture_ = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_TARGET, options.game.width + options.video.border.width * 2, options.game.height + options.video.border.height * 2);
if (border_texture_ == nullptr)
{
if (options.console)
{
std::cout << "border_texture_ could not be created!\nSDL Error: " << SDL_GetError() << std::endl;
}
}
border_texture_ = createTexture(renderer,options.game.width + options.video.border.width * 2, options.game.height + options.video.border.height * 2);
setBorderColor(border_color_);
// Crea la surface donde se pinta el juego