jugant amb clang-tidy
This commit is contained in:
@@ -3,9 +3,9 @@
|
||||
#include "texture.h" // Para Texture
|
||||
|
||||
// Constructor
|
||||
Sprite::Sprite(std::shared_ptr<Texture> texture, float x, float y, float w, float h)
|
||||
Sprite::Sprite(std::shared_ptr<Texture> texture, float pos_x, float pos_y, float width, float height)
|
||||
: texture_(texture),
|
||||
pos_((SDL_FRect){x, y, w, h}),
|
||||
pos_((SDL_FRect){pos_x, pos_y, width, height}),
|
||||
sprite_clip_((SDL_FRect){0, 0, pos_.w, pos_.h}) {}
|
||||
|
||||
Sprite::Sprite(std::shared_ptr<Texture> texture, SDL_FRect rect)
|
||||
@@ -24,15 +24,15 @@ void Sprite::render() {
|
||||
}
|
||||
|
||||
// Establece la posición del objeto
|
||||
void Sprite::setPosition(float x, float y) {
|
||||
pos_.x = x;
|
||||
pos_.y = y;
|
||||
void Sprite::setPosition(float pos_x, float pos_y) {
|
||||
pos_.x = pos_x;
|
||||
pos_.y = pos_y;
|
||||
}
|
||||
|
||||
// Establece la posición del objeto
|
||||
void Sprite::setPosition(SDL_FPoint p) {
|
||||
pos_.x = p.x;
|
||||
pos_.y = p.y;
|
||||
void Sprite::setPosition(SDL_FPoint point) {
|
||||
pos_.x = point.x;
|
||||
pos_.y = point.y;
|
||||
}
|
||||
|
||||
// Reinicia las variables a cero
|
||||
|
||||
Reference in New Issue
Block a user