activa -Wextra -Wpedantic i neteja warnings
This commit is contained in:
@@ -114,7 +114,9 @@ void BalloonManager::deployRandomFormation(int stage) {
|
||||
.size = balloon.size,
|
||||
.vel_x = balloon.vel_x,
|
||||
.game_tempo = balloon_speed_,
|
||||
.creation_counter = creation_time_enabled_ ? balloon.creation_counter : 0.0F};
|
||||
.creation_counter = creation_time_enabled_ ? balloon.creation_counter : 0.0F,
|
||||
.animation = {},
|
||||
.sound = {}};
|
||||
createBalloon(config);
|
||||
}
|
||||
|
||||
@@ -135,7 +137,9 @@ void BalloonManager::deployFormation(int formation_id) {
|
||||
.size = balloon.size,
|
||||
.vel_x = balloon.vel_x,
|
||||
.game_tempo = balloon_speed_,
|
||||
.creation_counter = balloon.creation_counter};
|
||||
.creation_counter = balloon.creation_counter,
|
||||
.animation = {},
|
||||
.sound = {}};
|
||||
createBalloon(config);
|
||||
}
|
||||
}
|
||||
@@ -151,7 +155,9 @@ void BalloonManager::deployFormation(int formation_id, float y) {
|
||||
.size = balloon.size,
|
||||
.vel_x = balloon.vel_x,
|
||||
.game_tempo = balloon_speed_,
|
||||
.creation_counter = balloon.creation_counter};
|
||||
.creation_counter = balloon.creation_counter,
|
||||
.animation = {},
|
||||
.sound = {}};
|
||||
createBalloon(config);
|
||||
}
|
||||
}
|
||||
@@ -213,7 +219,9 @@ void BalloonManager::createChildBalloon(const std::shared_ptr<Balloon>& parent_b
|
||||
.size = static_cast<Balloon::Size>(static_cast<int>(parent_balloon->getSize()) - 1),
|
||||
.vel_x = direction == "LEFT" ? Balloon::VELX_NEGATIVE : Balloon::VELX_POSITIVE,
|
||||
.game_tempo = balloon_speed_,
|
||||
.creation_counter = 0};
|
||||
.creation_counter = 0,
|
||||
.animation = {},
|
||||
.sound = {}};
|
||||
|
||||
// Crea el globo hijo
|
||||
auto child_balloon = createBalloon(config);
|
||||
@@ -267,6 +275,8 @@ void BalloonManager::createPowerBall() {
|
||||
.texture = balloon_textures_.at(4),
|
||||
.animation = balloon_animations_.at(4),
|
||||
.sound = {
|
||||
.bouncing_file = {},
|
||||
.popping_file = {},
|
||||
.bouncing_enabled = bouncing_sound_enabled_,
|
||||
.poping_enabled = poping_sound_enabled_,
|
||||
.enabled = sound_enabled_}};
|
||||
|
||||
@@ -262,7 +262,7 @@ namespace Options {
|
||||
void clearPlayers() { players_.clear(); } // Limpia la lista de jugadores
|
||||
|
||||
// Asigna el mando a un jugador
|
||||
void assignTo(const Input::Gamepad& gamepad, Player::Id player_id) {
|
||||
void assignTo(const Input::Gamepad& /*gamepad*/, Player::Id /*player_id*/) {
|
||||
}
|
||||
|
||||
// Asigna los mandos físicos basándose en la configuración actual de nombres.
|
||||
|
||||
@@ -800,7 +800,7 @@ void Game::renderPathSprites() {
|
||||
}
|
||||
|
||||
// Acciones a realizar cuando el jugador colisiona con un globo
|
||||
void Game::handlePlayerCollision(std::shared_ptr<Player>& player, const std::shared_ptr<Balloon>& balloon) {
|
||||
void Game::handlePlayerCollision(std::shared_ptr<Player>& player, const std::shared_ptr<Balloon>& /*balloon*/) {
|
||||
if (!player->isPlaying() || player->isInvulnerable()) {
|
||||
return; // Si no está jugando o tiene inmunidad, no hace nada
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ void Instructions::iniSprites() {
|
||||
// Inicializa los sprites
|
||||
for (int i = 0; std::cmp_less(i, item_textures_.size()); ++i) {
|
||||
auto sprite = std::make_unique<Sprite>(item_textures_[i], 0, 0, Item::WIDTH, Item::HEIGHT);
|
||||
sprite->setPosition((SDL_FPoint){.x = sprite_pos_.x, .y = sprite_pos_.y + ((Item::HEIGHT + item_space_) * i)});
|
||||
sprite->setPosition(SDL_FPoint{.x = sprite_pos_.x, .y = sprite_pos_.y + ((Item::HEIGHT + item_space_) * i)});
|
||||
sprites_.push_back(std::move(sprite));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,11 +39,11 @@ class MenuOption {
|
||||
|
||||
[[nodiscard]] virtual auto getBehavior() const -> Behavior = 0;
|
||||
[[nodiscard]] virtual auto getValueAsString() const -> std::string { return ""; }
|
||||
virtual void adjustValue(bool adjust_up) {}
|
||||
virtual void adjustValue(bool /*adjust_up*/) {}
|
||||
[[nodiscard]] virtual auto getTargetGroup() const -> ServiceMenu::SettingsGroup { return ServiceMenu::SettingsGroup::MAIN; }
|
||||
virtual void executeAction() {}
|
||||
|
||||
virtual auto getMaxValueWidth(Text* text_renderer) const -> int { return 0; } // Método virtual para que cada opción calcule el ancho de su valor más largo
|
||||
virtual auto getMaxValueWidth(Text* /*text_renderer*/) const -> int { return 0; } // Método virtual para que cada opción calcule el ancho de su valor más largo
|
||||
|
||||
protected:
|
||||
// --- Variables ---
|
||||
|
||||
@@ -45,7 +45,7 @@ void MenuRenderer::ShowHideAnimation::stop() {
|
||||
elapsed = 0.0F;
|
||||
}
|
||||
|
||||
MenuRenderer::MenuRenderer(const ServiceMenu* menu_state, std::shared_ptr<Text> element_text, std::shared_ptr<Text> title_text)
|
||||
MenuRenderer::MenuRenderer(const ServiceMenu* /*menu_state*/, std::shared_ptr<Text> element_text, std::shared_ptr<Text> title_text)
|
||||
: element_text_(std::move(element_text)),
|
||||
title_text_(std::move(title_text)) {
|
||||
initializeMaxSizes();
|
||||
@@ -145,7 +145,7 @@ void MenuRenderer::render(const ServiceMenu* menu_state) {
|
||||
}
|
||||
}
|
||||
|
||||
void MenuRenderer::update(const ServiceMenu* menu_state, float delta_time) {
|
||||
void MenuRenderer::update(const ServiceMenu* /*menu_state*/, float delta_time) {
|
||||
updateAnimations(delta_time);
|
||||
|
||||
if (visible_) {
|
||||
|
||||
@@ -259,7 +259,7 @@ void Notifier::show(std::vector<std::string> texts, int icon, const std::string&
|
||||
|
||||
// Dibuja el icono de la notificación
|
||||
if (has_icons_ && icon >= 0 && texts.size() >= 2) {
|
||||
auto sp = std::make_unique<Sprite>(icon_texture_, (SDL_FRect){.x = 0, .y = 0, .w = ICON_SIZE, .h = ICON_SIZE});
|
||||
auto sp = std::make_unique<Sprite>(icon_texture_, SDL_FRect{.x = 0, .y = 0, .w = ICON_SIZE, .h = ICON_SIZE});
|
||||
sp->setPosition({.x = PADDING_IN_H, .y = PADDING_IN_V, .w = ICON_SIZE, .h = ICON_SIZE});
|
||||
sp->setSpriteClip(SDL_FRect{
|
||||
.x = static_cast<float>(ICON_SIZE * (icon % 10)),
|
||||
|
||||
Reference in New Issue
Block a user