Segmentation fault

This commit is contained in:
2023-05-07 18:08:36 +02:00
parent 90ebea4807
commit c1f8e16963
17 changed files with 163 additions and 73 deletions

View File

@@ -1,9 +1,11 @@
#include "movingsprite.h"
#include <iostream>
// Constructor
MovingSprite::MovingSprite(float x, float y, int w, int h, float velx, float vely, float accelx, float accely, Texture *texture, SDL_Renderer *renderer)
{
//std::cout << "Construido MovingSprite" << std::endl;
// Copia los punteros
this->texture = texture;
this->renderer = renderer;
@@ -53,6 +55,12 @@ MovingSprite::MovingSprite(float x, float y, int w, int h, float velx, float vel
currentFlipV = false;
};
// Destructor
MovingSprite::~MovingSprite()
{
//std::cout << "Destruido MovingSprite" << std::endl;
}
// Reinicia todas las variables
void MovingSprite::clear()
{