migrant a SDL3

This commit is contained in:
2025-03-25 14:13:58 +01:00
parent 9cc41aaf53
commit f1b0303474
71 changed files with 303 additions and 360 deletions

View File

@@ -1,10 +1,10 @@
#include "intro.h"
#include <SDL2/SDL_blendmode.h> // Para SDL_BLENDMODE_BLEND, SDL_BLENDMODE_MOD
#include <SDL2/SDL_events.h> // Para SDL_PollEvent, SDL_Event
#include <SDL2/SDL_pixels.h> // Para SDL_PIXELFORMAT_RGBA8888
#include <SDL2/SDL_rect.h> // Para SDL_Rect
#include <SDL2/SDL_render.h> // Para SDL_SetTextureBlendMode, SDL_GetRend...
#include <SDL2/SDL_timer.h> // Para SDL_GetTicks
#include <SDL3/SDL_blendmode.h> // Para SDL_BLENDMODE_BLEND, SDL_BLENDMODE_MOD
#include <SDL3/SDL_events.h> // Para SDL_PollEvent, SDL_Event
#include <SDL3/SDL_pixels.h> // Para SDL_PIXELFORMAT_RGBA8888
#include <SDL3/SDL_rect.h> // Para SDL_Rect
#include <SDL3/SDL_render.h> // Para SDL_SetTextureBlendMode, SDL_GetRend...
#include <SDL3/SDL_timer.h> // Para SDL_GetTicks
#include <array> // Para array
#include <functional> // Para function
#include <string> // Para basic_string, string
@@ -354,10 +354,10 @@ void Intro::initSprites()
SDL_SetRenderDrawColor(Screen::get()->getRenderer(), 0xFF, 0x00, 0x00, 0xFF);
SDL_RenderClear(Screen::get()->getRenderer());
SDL_Rect rect = {BORDER / 2, BORDER / 2, SPRITE_WIDTH, SPRITE_HEIGHT};
SDL_FRect rect = {BORDER / 2, BORDER / 2, SPRITE_WIDTH, SPRITE_HEIGHT};
auto inner_texture = Resource::get()->getTexture(TEXTURE_LIST.at(i))->getSDLTexture();
SDL_SetTextureBlendMode(inner_texture, SDL_BLENDMODE_MOD);
SDL_RenderCopy(Screen::get()->getRenderer(), inner_texture, nullptr, &rect);
SDL_RenderTexture(Screen::get()->getRenderer(), inner_texture, nullptr, &rect);
SDL_SetTextureBlendMode(inner_texture, SDL_BLENDMODE_NONE);
SDL_SetRenderTarget(Screen::get()->getRenderer(), temp);