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

@@ -1,11 +1,10 @@
#include "movingsprite.h"
// 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)
{
// Copia los punteros
this->texture = texture;
this->renderer = renderer;
// Establece el alto y el ancho del sprite
this->w = w;
@@ -96,7 +95,7 @@ void MovingSprite::render()
{
if (enabled)
{
texture->render(renderer, (int)x, (int)y, &spriteClip, zoomW, zoomH, angle, center, currentFlip);
texture->render((int)x, (int)y, &spriteClip, zoomW, zoomH, angle, center, currentFlip);
}
}