Deshaciendose de sdl_image y sdl_mixer

This commit is contained in:
2022-10-21 10:08:29 +02:00
parent 0a16c1cd0e
commit 33ad51e1c2
31 changed files with 17866 additions and 4068 deletions
+30 -30
View File
@@ -1,31 +1,31 @@
#include "background.h"
// Constructor
Background::Background()
{
init(0, 0, 0, 0, NULL);
}
// Inicializador
void Background::init(int x, int y, int w, int h, LTexture *texture)
{
// Establece el alto y el ancho del sprite del fondo
mSprite.setWidth(w);
mSprite.setHeight(h);
// Establece la posición X,Y del sprite del fondo
mSprite.setPosX(x);
mSprite.setPosY(y);
// Establece la textura donde están los gráficos para el sprite del fondo
mSprite.setTexture(*texture);
// Establece el rectangulo de donde coger la imagen
mSprite.setSpriteClip(0, 0, mSprite.getWidth(), mSprite.getHeight());
}
// Pinta el fondo en la pantalla
void Background::render()
{
mSprite.render();
#include "background.h"
// Constructor
Background::Background()
{
init(0, 0, 0, 0, NULL);
}
// Inicializador
void Background::init(int x, int y, int w, int h, LTexture *texture)
{
// Establece el alto y el ancho del sprite del fondo
mSprite.setWidth(w);
mSprite.setHeight(h);
// Establece la posición X,Y del sprite del fondo
mSprite.setPosX(x);
mSprite.setPosY(y);
// Establece la textura donde están los gráficos para el sprite del fondo
mSprite.setTexture(*texture);
// Establece el rectangulo de donde coger la imagen
mSprite.setSpriteClip(0, 0, mSprite.getWidth(), mSprite.getHeight());
}
// Pinta el fondo en la pantalla
void Background::render()
{
mSprite.render();
}