añadidos nuevos ficheros de clases

This commit is contained in:
2022-08-07 12:29:53 +02:00
parent 04c1df4352
commit 26d4ba7c6a
18 changed files with 1083 additions and 1566 deletions

View File

@@ -3,7 +3,7 @@
// Constructor
Sprite::Sprite()
{
init(0, 0, 0, 0, nullptr, nullptr);
init(nullptr, nullptr);
}
// Destructor
@@ -14,7 +14,7 @@ Sprite::~Sprite()
}
// Inicializador
void Sprite::init(int x, int y, Uint16 w, Uint16 h, LTexture *texture, SDL_Renderer *renderer)
/*void Sprite::init(LTexture *texture, SDL_Renderer *renderer, int x, int y, Uint16 w, Uint16 h)
{
// Establece el alto y el ancho del sprite
setWidth(w);
@@ -32,10 +32,10 @@ void Sprite::init(int x, int y, Uint16 w, Uint16 h, LTexture *texture, SDL_Rende
// Establece el rectangulo de donde coger la imagen
setSpriteClip(0, 0, w, h);
}
}*/
// Inicializador
void Sprite::init(SDL_Rect rect, LTexture *texture, SDL_Renderer *renderer)
void Sprite::init(LTexture *texture, SDL_Renderer *renderer, SDL_Rect rect)
{
// Establece el alto y el ancho del sprite
mWidth = rect.w;