Eliminados los comentarios de creación y destrucción de objetos
This commit is contained in:
@@ -4,7 +4,6 @@
|
|||||||
// Constructor
|
// Constructor
|
||||||
Asset::Asset(string executablePath)
|
Asset::Asset(string executablePath)
|
||||||
{
|
{
|
||||||
//cout << "Construido Asset" << endl;
|
|
||||||
this->executablePath = executablePath.substr(0, executablePath.find_last_of("\\/"));
|
this->executablePath = executablePath.substr(0, executablePath.find_last_of("\\/"));
|
||||||
longestName = 0;
|
longestName = 0;
|
||||||
verbose = true;
|
verbose = true;
|
||||||
@@ -13,7 +12,6 @@ Asset::Asset(string executablePath)
|
|||||||
// Destructot
|
// Destructot
|
||||||
Asset::~Asset()
|
Asset::~Asset()
|
||||||
{
|
{
|
||||||
//cout << "Destruido Asset" << endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Añade un elemento a la lista
|
// Añade un elemento a la lista
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
// Constructor
|
// Constructor
|
||||||
MovingSprite::MovingSprite(float x, float y, int w, int h, float velx, float vely, float accelx, float accely, Texture *texture, SDL_Renderer *renderer)
|
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
|
// Copia los punteros
|
||||||
this->texture = texture;
|
this->texture = texture;
|
||||||
this->renderer = renderer;
|
this->renderer = renderer;
|
||||||
@@ -58,7 +57,6 @@ MovingSprite::MovingSprite(float x, float y, int w, int h, float velx, float vel
|
|||||||
// Destructor
|
// Destructor
|
||||||
MovingSprite::~MovingSprite()
|
MovingSprite::~MovingSprite()
|
||||||
{
|
{
|
||||||
//std::cout << "Destruido MovingSprite" << std::endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reinicia todas las variables
|
// Reinicia todas las variables
|
||||||
|
|||||||
@@ -6,8 +6,6 @@
|
|||||||
// Constructor
|
// Constructor
|
||||||
Notify::Notify(SDL_Renderer *renderer, string iconFile, string bitmapFile, string textFile, string soundFile, options_t *options)
|
Notify::Notify(SDL_Renderer *renderer, string iconFile, string bitmapFile, string textFile, string soundFile, options_t *options)
|
||||||
{
|
{
|
||||||
//std::cout << "Construido Notify" << std::endl;
|
|
||||||
|
|
||||||
// Inicializa variables
|
// Inicializa variables
|
||||||
this->renderer = renderer;
|
this->renderer = renderer;
|
||||||
this->options = options;
|
this->options = options;
|
||||||
@@ -23,8 +21,6 @@ Notify::Notify(SDL_Renderer *renderer, string iconFile, string bitmapFile, strin
|
|||||||
// Destructor
|
// Destructor
|
||||||
Notify::~Notify()
|
Notify::~Notify()
|
||||||
{
|
{
|
||||||
//std::cout << "Destruido Notify" << std::endl;
|
|
||||||
|
|
||||||
// Libera la memoria de los objetos
|
// Libera la memoria de los objetos
|
||||||
if (iconTexture != nullptr)
|
if (iconTexture != nullptr)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
// Constructor
|
// Constructor
|
||||||
Screen::Screen(SDL_Window *window, SDL_Renderer *renderer, options_t *options)
|
Screen::Screen(SDL_Window *window, SDL_Renderer *renderer, options_t *options)
|
||||||
{
|
{
|
||||||
//cout << "Construido Screen" << endl;
|
|
||||||
// Inicializa variables
|
// Inicializa variables
|
||||||
this->window = window;
|
this->window = window;
|
||||||
this->renderer = renderer;
|
this->renderer = renderer;
|
||||||
@@ -38,7 +37,6 @@ Screen::Screen(SDL_Window *window, SDL_Renderer *renderer, options_t *options)
|
|||||||
// Destructor
|
// Destructor
|
||||||
Screen::~Screen()
|
Screen::~Screen()
|
||||||
{
|
{
|
||||||
//cout << "Destruido Screen" << endl;
|
|
||||||
if (notify != nullptr)
|
if (notify != nullptr)
|
||||||
{
|
{
|
||||||
delete notify;
|
delete notify;
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
// Constructor
|
// Constructor
|
||||||
Sprite::Sprite(int x, int y, int w, int h, Texture *texture, SDL_Renderer *renderer)
|
Sprite::Sprite(int x, int y, int w, int h, Texture *texture, SDL_Renderer *renderer)
|
||||||
{
|
{
|
||||||
//std::cout << "Construido Sprite" << std::endl;
|
|
||||||
// Establece la posición X,Y del sprite
|
// Establece la posición X,Y del sprite
|
||||||
this->x = x;
|
this->x = x;
|
||||||
this->y = y;
|
this->y = y;
|
||||||
@@ -30,7 +29,6 @@ Sprite::Sprite(int x, int y, int w, int h, Texture *texture, SDL_Renderer *rende
|
|||||||
|
|
||||||
Sprite::Sprite(SDL_Rect rect, Texture *texture, SDL_Renderer *renderer)
|
Sprite::Sprite(SDL_Rect rect, Texture *texture, SDL_Renderer *renderer)
|
||||||
{
|
{
|
||||||
//std::cout << "Construido Sprite" << std::endl;
|
|
||||||
// Establece la posición X,Y del sprite
|
// Establece la posición X,Y del sprite
|
||||||
this->x = rect.x;
|
this->x = rect.x;
|
||||||
this->y = rect.y;
|
this->y = rect.y;
|
||||||
@@ -57,7 +55,6 @@ Sprite::Sprite(SDL_Rect rect, Texture *texture, SDL_Renderer *renderer)
|
|||||||
// Destructor
|
// Destructor
|
||||||
Sprite::~Sprite()
|
Sprite::~Sprite()
|
||||||
{
|
{
|
||||||
//std::cout << "Destruido Sprite" << std::endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Muestra el sprite por pantalla
|
// Muestra el sprite por pantalla
|
||||||
|
|||||||
@@ -79,7 +79,6 @@ textFile_t LoadTextFile(string file, bool verbose)
|
|||||||
// Constructor
|
// Constructor
|
||||||
Text::Text(string textFile, string bitmapFile, SDL_Renderer *renderer)
|
Text::Text(string textFile, string bitmapFile, SDL_Renderer *renderer)
|
||||||
{
|
{
|
||||||
//std::cout << "Construido Text" << std::endl;
|
|
||||||
// Carga los offsets desde el fichero
|
// Carga los offsets desde el fichero
|
||||||
textFile_t tf = LoadTextFile(textFile);
|
textFile_t tf = LoadTextFile(textFile);
|
||||||
|
|
||||||
@@ -105,7 +104,6 @@ Text::Text(string textFile, string bitmapFile, SDL_Renderer *renderer)
|
|||||||
// Constructor
|
// Constructor
|
||||||
Text::Text(string textFile, Texture *texture, SDL_Renderer *renderer)
|
Text::Text(string textFile, Texture *texture, SDL_Renderer *renderer)
|
||||||
{
|
{
|
||||||
//std::cout << "Construido Text" << std::endl;
|
|
||||||
// Carga los offsets desde el fichero
|
// Carga los offsets desde el fichero
|
||||||
textFile_t tf = LoadTextFile(textFile);
|
textFile_t tf = LoadTextFile(textFile);
|
||||||
|
|
||||||
@@ -130,7 +128,6 @@ Text::Text(string textFile, Texture *texture, SDL_Renderer *renderer)
|
|||||||
// Constructor
|
// Constructor
|
||||||
Text::Text(textFile_t *textFile, Texture *texture, SDL_Renderer *renderer)
|
Text::Text(textFile_t *textFile, Texture *texture, SDL_Renderer *renderer)
|
||||||
{
|
{
|
||||||
//std::cout << "Construido Text" << std::endl;
|
|
||||||
// Inicializa variables desde la estructura
|
// Inicializa variables desde la estructura
|
||||||
boxHeight = textFile->boxHeight;
|
boxHeight = textFile->boxHeight;
|
||||||
boxWidth = textFile->boxWidth;
|
boxWidth = textFile->boxWidth;
|
||||||
@@ -152,7 +149,6 @@ Text::Text(textFile_t *textFile, Texture *texture, SDL_Renderer *renderer)
|
|||||||
// Destructor
|
// Destructor
|
||||||
Text::~Text()
|
Text::~Text()
|
||||||
{
|
{
|
||||||
//std::cout << "Destruido Text" << std::endl;
|
|
||||||
if (sprite != nullptr)
|
if (sprite != nullptr)
|
||||||
{
|
{
|
||||||
delete sprite;
|
delete sprite;
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
// Constructor
|
// Constructor
|
||||||
Texture::Texture(SDL_Renderer *renderer, string path, bool verbose)
|
Texture::Texture(SDL_Renderer *renderer, string path, bool verbose)
|
||||||
{
|
{
|
||||||
//cout << "Construido Texture" << endl;
|
|
||||||
// Copia punteros
|
// Copia punteros
|
||||||
this->renderer = renderer;
|
this->renderer = renderer;
|
||||||
this->path = path;
|
this->path = path;
|
||||||
@@ -27,8 +26,6 @@ Texture::Texture(SDL_Renderer *renderer, string path, bool verbose)
|
|||||||
// Destructor
|
// Destructor
|
||||||
Texture::~Texture()
|
Texture::~Texture()
|
||||||
{
|
{
|
||||||
//cout << "Destruido Texture" << endl;
|
|
||||||
|
|
||||||
// Libera memoria
|
// Libera memoria
|
||||||
unload();
|
unload();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user