migracio a SDL3

This commit is contained in:
2026-04-03 10:04:49 +02:00
parent 1e73a3159f
commit 7e570e2814
44 changed files with 826 additions and 801 deletions

View File

@@ -1,15 +1,12 @@
#include "instructions.h"
#include <SDL2/SDL_error.h> // for SDL_GetError
#include <SDL2/SDL_pixels.h> // for SDL_PIXELFORMAT_RGBA8888
#include <SDL2/SDL_rect.h> // for SDL_Rect
#include <SDL2/SDL_timer.h> // for SDL_GetTicks
#include <SDL3/SDL.h>
#include <algorithm> // for max
#include <iostream> // for char_traits, basic_ostream, operator<<
#include <string> // for basic_string
#include "asset.h" // for Asset
#include "const.h" // for shdwTxtColor, GAMECANVAS_CENTER_X, GAME...
#include "input.h" // for Input, REPEAT_FALSE, inputs_e
#include "jail_audio.h" // for JA_StopMusic
#include "jail_audio.hpp" // for JA_StopMusic
#include "lang.h" // for Lang
#include "screen.h" // for Screen
#include "sprite.h" // for Sprite
@@ -216,7 +213,8 @@ void Instructions::render()
}
// Copia el backbuffer al renderizador
SDL_RenderCopy(renderer, backbuffer, nullptr, &window);
SDL_FRect fWindow = {(float)window.x, (float)window.y, (float)window.w, (float)window.h};
SDL_RenderTexture(renderer, backbuffer, nullptr, &fWindow);
// Vuelca el contenido del renderizador en pantalla
screen->blit();
@@ -229,7 +227,7 @@ void Instructions::checkEvents()
while (SDL_PollEvent(eventHandler) != 0)
{
// Evento de salida de la aplicación
if (eventHandler->type == SDL_QUIT)
if (eventHandler->type == SDL_EVENT_QUIT)
{
section->name = SECTION_PROG_QUIT;
break;