Mil arreglos de paletes, gifs i colors transparents

El gif del jugador de game over estava mal
This commit is contained in:
2025-03-08 20:04:43 +01:00
parent 7b3f82aa34
commit a14f6fcf6f
22 changed files with 61 additions and 193 deletions

View File

@@ -487,28 +487,15 @@ void Room::fillMapTexture()
// Tiled pone los tiles vacios del mapa como cero y empieza a contar de 1 a n.
// Al cargar el mapa en memoria, se resta uno, por tanto los tiles vacios son -1
// Tampoco hay que dibujar los tiles animados que estan en la fila 19 (indices)
const int index = (y * MAP_WIDTH_) + x;
const bool a = (tile_map_[index] >= 18 * tile_set_width_) && (tile_map_[index] < 19 * tile_set_width_);
const bool b = tile_map_[index] > -1;
const int INDEX = (y * MAP_WIDTH_) + x;
const bool A = (tile_map_[INDEX] >= 18 * tile_set_width_) && (tile_map_[INDEX] < 19 * tile_set_width_);
const bool B = tile_map_[INDEX] > -1;
if (b && !a)
if (B && !A)
{
clip.x = (tile_map_[index] % tile_set_width_) * TILE_SIZE_;
clip.y = (tile_map_[index] / tile_set_width_) * TILE_SIZE_;
clip.x = (tile_map_[INDEX] % tile_set_width_) * TILE_SIZE_;
clip.y = (tile_map_[INDEX] / tile_set_width_) * TILE_SIZE_;
surface_->render(x * TILE_SIZE_, y * TILE_SIZE_, &clip);
#ifdef DEBUG
/*if (Debug::get()->getEnabled())
{
if (clip.x != -TILE_SIZE_)
{
clip.x = x * TILE_SIZE_;
clip.y = y * TILE_SIZE_;
SDL_SetRenderDrawColor(Screen::get()->getRenderer(), 64, 64, 64, 224);
SDL_RenderFillRect(Screen::get()->getRenderer(), &clip);
}
}*/
#endif
}
}