Optimizaciones de código

This commit is contained in:
2022-09-24 19:16:39 +02:00
parent f3aeed9428
commit b44869341c
99 changed files with 441 additions and 509 deletions

View File

@@ -16,7 +16,7 @@ Logo::Logo(SDL_Renderer *renderer, Screen *screen, Asset *asset)
sprite2->setSpriteClip(0, 0, texture2->getWidth(), texture2->getHeight());
texture2->setColor(0, 0, 0);
for (int i = 0; i < texture->getHeight(); i++)
for (int i = 0; i < texture->getHeight(); ++i)
{
sprite.push_back(new Sprite(0, i, texture->getWidth(), 1, texture, renderer));
if (i % 2 == 0)
@@ -110,7 +110,7 @@ void Logo::updateJAILGAMES()
{
if (counter > 30)
{
for (int i = 1; i < sprite.size(); i++)
for (int i = 1; i < (int)sprite.size(); ++i)
{
const int speed = 8;
const int dest = 37;
@@ -227,7 +227,7 @@ void Logo::update()
checkEventHandler();
// Incrementa el contador
counter++;
++counter;
// Gestiona el logo de JAILGAME
updateJAILGAMES();