forked from jaildesigner-jailgames/jaildoctors_dilemma
Trabajando en el ending
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -198,4 +198,10 @@ int Texture::getHeight()
|
||||
bool Texture::reLoad()
|
||||
{
|
||||
return loadFromFile(path, renderer);
|
||||
}
|
||||
|
||||
// Obtiene la textura
|
||||
SDL_Texture *Texture::getSDLTexture()
|
||||
{
|
||||
return texture;
|
||||
}
|
||||
@@ -58,6 +58,9 @@ public:
|
||||
|
||||
// Recarga la textura
|
||||
bool reLoad();
|
||||
|
||||
// Obtiene la textura
|
||||
SDL_Texture *getSDLTexture();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user