Ta muestra información de depuración
This commit is contained in:
@@ -4,13 +4,16 @@
|
||||
#include <fstream>
|
||||
|
||||
// Constructor
|
||||
Text::Text(std::string file, LTexture *texture, SDL_Renderer *renderer)
|
||||
Text::Text(std::string bitmapFile, std::string textFile, SDL_Renderer *renderer)
|
||||
{
|
||||
texture = new LTexture();
|
||||
loadTextureFromFile(texture, bitmapFile, renderer);
|
||||
|
||||
SDL_Rect rect = {0,0,0,0};
|
||||
mSprite = new Sprite(rect, texture, renderer);
|
||||
mSprite->setTexture(texture);
|
||||
mSprite->setRenderer(renderer);
|
||||
mFile = file;
|
||||
mFile = textFile;
|
||||
|
||||
init();
|
||||
}
|
||||
@@ -18,6 +21,10 @@ Text::Text(std::string file, LTexture *texture, SDL_Renderer *renderer)
|
||||
// Destructor
|
||||
Text::~Text()
|
||||
{
|
||||
texture->unload();
|
||||
delete texture;
|
||||
texture = nullptr;
|
||||
|
||||
delete mSprite;
|
||||
mSprite = nullptr;
|
||||
}
|
||||
@@ -144,7 +151,6 @@ void Text::initOffsetFromFile()
|
||||
if (rfile.is_open() && rfile.good())
|
||||
{
|
||||
std::string buffer;
|
||||
//printf("Reading %s file\n", mFile.c_str());
|
||||
|
||||
// Lee los dos primeros valores del fichero
|
||||
std::getline(rfile, buffer);
|
||||
|
||||
Reference in New Issue
Block a user