Aplicar formato automático con clang-format a todo el código fuente

- Reformatear archivos .cpp y .h según configuración Google personalizada
- Mejorar consistencia en indentación y espaciado
- Reorganizar includes y declaraciones de clases
- Mantener funcionalidad existente sin cambios

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-09-15 13:57:01 +02:00
parent 230046152c
commit 79c27dad6a
9 changed files with 494 additions and 585 deletions

View File

@@ -1,4 +1,5 @@
#include "sprite.h"
#include "texture.h" // for Texture
// Constructor
@@ -8,33 +9,28 @@ Sprite::Sprite(std::shared_ptr<Texture> texture)
clip_{0.0f, 0.0f, 0.0f, 0.0f} {}
// Establece la posición del sprite
void Sprite::setPos(SDL_FPoint pos)
{
void Sprite::setPos(SDL_FPoint pos) {
pos_.x = pos.x;
pos_.y = pos.y;
}
// Pinta el sprite
void Sprite::render()
{
void Sprite::render() {
texture_->render(&clip_, &pos_);
}
// Establece el rectangulo de la textura que se va a pintar
void Sprite::setClip(SDL_FRect clip)
{
void Sprite::setClip(SDL_FRect clip) {
clip_ = clip;
}
// Establece el tamaño del sprite
void Sprite::setSize(float w, float h)
{
void Sprite::setSize(float w, float h) {
pos_.w = w;
pos_.h = h;
}
// Modulación de color
void Sprite::setColor(int r, int g, int b)
{
void Sprite::setColor(int r, int g, int b) {
texture_->setColor(r, g, b);
}