Trabajando en el ending

This commit is contained in:
2022-11-03 22:32:30 +01:00
parent 0b1b9f2d15
commit 9b66c7e275
6 changed files with 97 additions and 5 deletions

View File

@@ -138,7 +138,14 @@ void Sprite::setSpriteClip(SDL_Rect rect)
// Establece el valor de la variable
void Sprite::setSpriteClip(int x, int y, int w, int h)
{
spriteClip = {x, y, w, h};
if (w == -1 || h == -1)
{
spriteClip = {x, y, this->w, this->h};
}
else
{
spriteClip = {x, y, w, h};
}
}
// Obten el valor de la variable