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

@@ -136,8 +136,8 @@ void SAnimatedSprite::resetAnimation() {
// Carga la animación desde un vector de cadenas
void SAnimatedSprite::setAnimations(const Animations& animations) {
int frame_width = 1;
int frame_height = 1;
float frame_width = 1.0F;
float frame_height = 1.0F;
int frames_per_row = 1;
int max_tiles = 1;
@@ -190,7 +190,7 @@ void SAnimatedSprite::setAnimations(const Animations& animations) {
// Se introducen los valores separados por comas en un vector
std::stringstream ss(value);
std::string tmp;
SDL_FRect rect = {0, 0, frame_width, frame_height};
SDL_FRect rect = {0.0F, 0.0F, frame_width, frame_height};
while (getline(ss, tmp, ',')) {
// Comprueba que el tile no sea mayor que el maximo indice permitido
const int num_tile = std::stoi(tmp);