migrant a SDL3

This commit is contained in:
2025-03-25 20:26:45 +01:00
parent f1b0303474
commit a9c869baf6
49 changed files with 374 additions and 416 deletions

View File

@@ -2,7 +2,7 @@
#include "texture.h" // Para Texture
// Constructor
MovingSprite::MovingSprite(std::shared_ptr<Texture> texture, SDL_Rect pos, Rotate rotate, float zoom_w, float zoom_h, SDL_RendererFlip flip)
MovingSprite::MovingSprite(std::shared_ptr<Texture> texture, SDL_FRect pos, Rotate rotate, float zoom_w, float zoom_h, SDL_RendererFlip flip)
: Sprite(texture, pos),
x_(pos.x),
y_(pos.y),
@@ -11,7 +11,7 @@ MovingSprite::MovingSprite(std::shared_ptr<Texture> texture, SDL_Rect pos, Rotat
zoom_h_(zoom_h),
flip_(flip) {}
MovingSprite::MovingSprite(std::shared_ptr<Texture> texture, SDL_Rect pos)
MovingSprite::MovingSprite(std::shared_ptr<Texture> texture, SDL_FRect pos)
: Sprite(texture, pos),
x_(pos.x),
y_(pos.y),
@@ -96,7 +96,7 @@ void MovingSprite::setRotate(bool enable)
}
// Establece la posición y_ el tamaño del objeto
void MovingSprite::setPos(SDL_Rect rect)
void MovingSprite::setPos(SDL_FRect rect)
{
x_ = static_cast<float>(rect.x);
y_ = static_cast<float>(rect.y);