eliminat el punter al renderer de 50.000 llocs

This commit is contained in:
2024-07-28 10:45:14 +02:00
parent 7501b4936f
commit 2948684ad3
58 changed files with 492 additions and 401 deletions

View File

@@ -94,7 +94,7 @@ Text::Text(std::string bitmapFile, std::string textFile, SDL_Renderer *renderer)
// Crea los objetos
texture = new Texture(renderer, bitmapFile);
sprite = new Sprite({0, 0, boxWidth, boxHeight}, texture, renderer);
sprite = new Sprite({0, 0, boxWidth, boxHeight}, texture);
// Inicializa variables
fixedWidth = false;
@@ -118,7 +118,7 @@ Text::Text(std::string textFile, Texture *texture, SDL_Renderer *renderer)
// Crea los objetos
this->texture = nullptr;
sprite = new Sprite({0, 0, boxWidth, boxHeight}, texture, renderer);
sprite = new Sprite({0, 0, boxWidth, boxHeight}, texture);
// Inicializa variables
fixedWidth = false;
@@ -139,7 +139,7 @@ Text::Text(textFile_t *textFile, Texture *texture, SDL_Renderer *renderer)
// Crea los objetos
this->texture = nullptr;
sprite = new Sprite({0, 0, boxWidth, boxHeight}, texture, renderer);
sprite = new Sprite({0, 0, boxWidth, boxHeight}, texture);
// Inicializa variables
fixedWidth = false;