forked from jaildesigner-jailgames/jaildoctors_dilemma
corregides cridades a SDL3 i migrat casi tot de int a float. Falta jail_shader
This commit is contained in:
@@ -3,13 +3,13 @@
|
||||
#include "surface.h" // Para Surface
|
||||
|
||||
// Constructor
|
||||
SMovingSprite::SMovingSprite(std::shared_ptr<Surface> surface, SDL_Rect pos, SDL_RendererFlip flip)
|
||||
SMovingSprite::SMovingSprite(std::shared_ptr<Surface> surface, SDL_FRect pos, SDL_FlipMode flip)
|
||||
: SSprite(surface, pos),
|
||||
x_(pos.x),
|
||||
y_(pos.y),
|
||||
flip_(flip) { SSprite::pos_ = pos; }
|
||||
|
||||
SMovingSprite::SMovingSprite(std::shared_ptr<Surface> surface, SDL_Rect pos)
|
||||
SMovingSprite::SMovingSprite(std::shared_ptr<Surface> surface, SDL_FRect pos)
|
||||
: SSprite(surface, pos),
|
||||
x_(pos.x),
|
||||
y_(pos.y),
|
||||
@@ -65,7 +65,7 @@ void SMovingSprite::render(Uint8 source_color, Uint8 target_color) {
|
||||
}
|
||||
|
||||
// Establece la posición y_ el tamaño del objeto
|
||||
void SMovingSprite::setPos(SDL_Rect rect) {
|
||||
void SMovingSprite::setPos(SDL_FRect rect) {
|
||||
x_ = static_cast<float>(rect.x);
|
||||
y_ = static_cast<float>(rect.y);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user