migrant a SDL3
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
#include "instructions.h"
|
||||
#include <SDL2/SDL_blendmode.h> // Para SDL_BLENDMODE_BLEND
|
||||
#include <SDL2/SDL_events.h> // Para SDL_PollEvent, SDL_Event
|
||||
#include <SDL2/SDL_pixels.h> // Para SDL_PIXELFORMAT_RGBA8888
|
||||
#include <SDL2/SDL_timer.h> // Para SDL_GetTicks
|
||||
#include <SDL3/SDL_blendmode.h> // Para SDL_BLENDMODE_BLEND
|
||||
#include <SDL3/SDL_events.h> // Para SDL_PollEvent, SDL_Event
|
||||
#include <SDL3/SDL_pixels.h> // Para SDL_PIXELFORMAT_RGBA8888
|
||||
#include <SDL3/SDL_timer.h> // Para SDL_GetTicks
|
||||
#include <algorithm> // Para max
|
||||
#include <utility> // Para move
|
||||
#include <vector> // Para vector
|
||||
@@ -186,7 +186,7 @@ void Instructions::fillBackbuffer()
|
||||
SDL_RenderClear(renderer_);
|
||||
|
||||
// Coloca el texto de fondo
|
||||
SDL_RenderCopy(renderer_, texture_, nullptr, nullptr);
|
||||
SDL_RenderTexture(renderer_, texture_, nullptr, nullptr);
|
||||
|
||||
// Dibuja los sprites
|
||||
for (auto &sprite : sprites_)
|
||||
@@ -251,7 +251,7 @@ void Instructions::render()
|
||||
if (view_.y == 0)
|
||||
renderLines(renderer_, backbuffer_, lines_);
|
||||
else
|
||||
SDL_RenderCopy(renderer_, backbuffer_, nullptr, &view_);
|
||||
SDL_RenderTexture(renderer_, backbuffer_, nullptr, &view_);
|
||||
|
||||
fade_->render();
|
||||
|
||||
@@ -340,7 +340,7 @@ void Instructions::renderLines(SDL_Renderer *renderer, SDL_Texture *texture, con
|
||||
{
|
||||
SDL_Rect srcRect = {0, line.y, 320, 1};
|
||||
SDL_Rect dstRect = {static_cast<int>(line.x), line.y, 320, 1};
|
||||
SDL_RenderCopy(renderer, texture, &srcRect, &dstRect);
|
||||
SDL_RenderTexture(renderer, texture, &srcRect, &dstRect);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user