clang-tidy
clang-format
This commit is contained in:
2025-08-10 22:01:18 +02:00
parent 659a4ced44
commit 41e3fd1d8d
29 changed files with 235 additions and 302 deletions

View File

@@ -2,8 +2,9 @@
#include <SDL3/SDL.h> // Para SDL_FRect, SDL_FPoint
#include <memory> // Para shared_ptr
#include <vector> // Para vector
#include <cstddef> // Para size_t
#include <memory> // Para shared_ptr
#include <vector> // Para vector
class Texture;
@@ -53,12 +54,12 @@ class Sprite {
[[nodiscard]] auto getTexture() const -> std::shared_ptr<Texture> { return textures_.at(texture_index_); }
void setTexture(std::shared_ptr<Texture> texture) { textures_.at(texture_index_) = texture; }
void addTexture(std::shared_ptr<Texture> texture) { textures_.push_back(texture); }
bool setActiveTexture(size_t index); // Cambia la textura activa por índice
size_t getActiveTextureIndex() const { return texture_index_; } // Obtiene el índice de la textura activa
size_t getTextureCount() const { return textures_.size(); } // Obtiene el número total de texturas
auto setActiveTexture(size_t index) -> bool; // Cambia la textura activa por índice
[[nodiscard]] auto getActiveTextureIndex() const -> size_t { return texture_index_; } // Obtiene el índice de la textura activa
[[nodiscard]] auto getTextureCount() const -> size_t { return textures_.size(); } // Obtiene el número total de texturas
protected:
std::shared_ptr<Texture>& getTextureRef() {
auto getTextureRef() -> std::shared_ptr<Texture>& {
return textures_.at(texture_index_);
}