cmasmasizat el codi
This commit is contained in:
+5
-5
@@ -1,13 +1,13 @@
|
||||
#include "sprite.h"
|
||||
|
||||
// Constructor
|
||||
Sprite::Sprite(Texture *texture)
|
||||
Sprite::Sprite(std::shared_ptr<Texture> texture)
|
||||
: texture_(texture),
|
||||
pos_{0, 0, 0, 0},
|
||||
clip_{0, 0, 0, 0} {}
|
||||
pos_{0.0f, 0.0f, 0.0f, 0.0f},
|
||||
clip_{0.0f, 0.0f, 0.0f, 0.0f} {}
|
||||
|
||||
// Establece la posición del sprite
|
||||
void Sprite::setPos(SDL_Point pos)
|
||||
void Sprite::setPos(SDL_FPoint pos)
|
||||
{
|
||||
pos_.x = pos.x;
|
||||
pos_.y = pos.y;
|
||||
@@ -26,7 +26,7 @@ void Sprite::setClip(SDL_FRect clip)
|
||||
}
|
||||
|
||||
// Establece el tamaño del sprite
|
||||
void Sprite::setSize(int w, int h)
|
||||
void Sprite::setSize(float w, float h)
|
||||
{
|
||||
pos_.w = w;
|
||||
pos_.h = h;
|
||||
|
||||
Reference in New Issue
Block a user