From f10be8c27775be3b55d1177561d7d154ad24d47c Mon Sep 17 00:00:00 2001 From: Sergio Valor Date: Sat, 16 May 2026 21:34:10 +0200 Subject: [PATCH] =?UTF-8?q?marca=20par=C3=A0metre=20animation=20com=20a=20?= =?UTF-8?q?const=20al=20constructor=20de=20Balloon=20i=20Item?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/game/entities/balloon.cpp | 2 +- source/game/entities/balloon.h | 4 ++-- source/game/entities/item.cpp | 2 +- source/game/entities/item.h | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/source/game/entities/balloon.cpp b/source/game/entities/balloon.cpp index 7e9c85c..928c2c3 100644 --- a/source/game/entities/balloon.cpp +++ b/source/game/entities/balloon.cpp @@ -9,7 +9,7 @@ #include "game/defaults.hpp" // for PLAY_AREA_LEFT, PLAY_AREA_RIGHT, PLAY_AR... // Constructor -Balloon::Balloon(float x, float y, Uint8 kind, float velx, float speed, Uint16 creationtimer, Texture *texture, std::vector *animation, SDL_Renderer *renderer) { +Balloon::Balloon(float x, float y, Uint8 kind, float velx, float speed, Uint16 creationtimer, Texture *texture, const std::vector *animation, SDL_Renderer *renderer) { sprite_ = new AnimatedSprite(texture, renderer, "", animation); disable(); diff --git a/source/game/entities/balloon.h b/source/game/entities/balloon.h index 57547cb..6a1e658 100644 --- a/source/game/entities/balloon.h +++ b/source/game/entities/balloon.h @@ -60,8 +60,8 @@ class Balloon { static constexpr int POWERBALL_SCREENPOWER_MINIMUM = 10; static constexpr int POWERBALL_COUNTER = 8; - Balloon(float x, float y, Uint8 kind, float velx, float speed, Uint16 creationtimer, Texture *texture, std::vector *animation, SDL_Renderer *renderer); // Constructor - ~Balloon(); // Destructor + Balloon(float x, float y, Uint8 kind, float velx, float speed, Uint16 creationtimer, Texture *texture, const std::vector *animation, SDL_Renderer *renderer); // Constructor + ~Balloon(); // Destructor Balloon(const Balloon &) = delete; auto operator=(const Balloon &) -> Balloon & = delete; diff --git a/source/game/entities/item.cpp b/source/game/entities/item.cpp index 35fa9f7..234bd22 100644 --- a/source/game/entities/item.cpp +++ b/source/game/entities/item.cpp @@ -7,7 +7,7 @@ class Texture; // Constructor -Item::Item(Id id, float x, float y, Texture *texture, std::vector *animation, SDL_Renderer *renderer) { +Item::Item(Id id, float x, float y, Texture *texture, const std::vector *animation, SDL_Renderer *renderer) { sprite_ = new AnimatedSprite(texture, renderer, "", animation); this->id_ = id; diff --git a/source/game/entities/item.h b/source/game/entities/item.h index 17fd763..62db6eb 100644 --- a/source/game/entities/item.h +++ b/source/game/entities/item.h @@ -23,8 +23,8 @@ class Item { COFFEE_MACHINE = 6, }; - Item(Id id, float x, float y, Texture *texture, std::vector *animation, SDL_Renderer *renderer); // Constructor - ~Item(); // Destructor + Item(Id id, float x, float y, Texture *texture, const std::vector *animation, SDL_Renderer *renderer); // Constructor + ~Item(); // Destructor Item(const Item &) = delete; auto operator=(const Item &) -> Item & = delete;