forked from jaildesigner-jailgames/jaildoctors_dilemma
Modificadas las llamadas para crear texturas
This commit is contained in:
@@ -13,8 +13,7 @@ Player::Player(player_t ini, std::string tileset, std::string animation, SDL_Ren
|
||||
this->input = input;
|
||||
|
||||
// Crea objetos
|
||||
texture = new LTexture();
|
||||
texture->loadFromFile(asset->get(tileset), renderer);
|
||||
texture = new LTexture(renderer, asset->get(tileset));
|
||||
sprite = new AnimatedSprite(texture, renderer, animation);
|
||||
|
||||
// Inicializa variables
|
||||
@@ -41,12 +40,8 @@ Player::Player(player_t ini, std::string tileset, std::string animation, SDL_Ren
|
||||
// Destructor
|
||||
Player::~Player()
|
||||
{
|
||||
texture->unload();
|
||||
delete texture;
|
||||
texture = nullptr;
|
||||
|
||||
delete sprite;
|
||||
sprite = nullptr;
|
||||
}
|
||||
|
||||
// Pinta el jugador en pantalla
|
||||
|
||||
Reference in New Issue
Block a user