Corregits mil warnings de int a float

Corregit getDisplayInfo per al calcul del zoomMax
This commit is contained in:
2025-10-16 10:12:03 +02:00
parent e811cf0a1d
commit 9a4b3b04a5
13 changed files with 95 additions and 55 deletions

View File

@@ -51,10 +51,9 @@ bool Texture::loadFromFile(const std::string& file_path) {
printWithDots("Image : ", getFileName(file_path), "[ LOADED ]");
}
int depth, pitch;
int pitch;
SDL_PixelFormat pixel_format;
// STBI_rgb_alpha (RGBA)
depth = 32;
pitch = 4 * width;
pixel_format = SDL_PIXELFORMAT_RGBA32;
@@ -125,7 +124,7 @@ void Texture::setBlendMode(SDL_BlendMode blending) { SDL_SetTextureBlendMode(tex
void Texture::setAlpha(Uint8 alpha) { SDL_SetTextureAlphaMod(texture_, alpha); }
// Renderiza la textura en un punto específico
void Texture::render(int x, int y, SDL_FRect* clip, float zoomW, float zoomH, double angle, SDL_FPoint* center, SDL_FlipMode flip) {
void Texture::render(float x, float y, SDL_FRect* clip, float zoomW, float zoomH, double angle, SDL_FPoint* center, SDL_FlipMode flip) {
// Establece el destino de renderizado en la pantalla
SDL_FRect render_quad = {x, y, width_, height_};