Arreglos en la estructura i format del codi

This commit is contained in:
2025-03-01 22:36:22 +01:00
parent 360ebfd2e6
commit aca2be98af
27 changed files with 371 additions and 560 deletions

View File

@@ -1,17 +1,17 @@
#pragma once
#include <SDL2/SDL_render.h> // for SDL_Texture, SDL_Renderer
#include <SDL2/SDL_stdinc.h> // for Uint32
#include <memory> // for shared_ptr
#include <string> // for string
#include <vector> // for vector
#include "utils.h" // for Color
class AnimatedSprite; // lines 10-10
class Asset; // lines 11-11
class Input; // lines 12-12
class Resource; // lines 13-13
class Screen; // lines 14-14
class Text; // lines 15-15
#include <SDL2/SDL_render.h> // for SDL_Texture, SDL_Renderer
#include <SDL2/SDL_stdinc.h> // for Uint32
#include <memory> // for shared_ptr
#include <string> // for string
#include <vector> // for vector
#include "utils.h" // for Color
class AnimatedSprite; // lines 10-10
class Asset; // lines 11-11
class Input; // lines 12-12
class Resource; // lines 13-13
class Screen; // lines 14-14
class Text; // lines 15-15
class Credits
{
@@ -23,21 +23,15 @@ private:
};
// Objetos y punteros
Screen *screen_; // Objeto encargado de dibujar en pantalla
SDL_Renderer *renderer_; // El renderizador de la ventana
Resource *resource_; // Objeto con los recursos
Asset *asset_; // Objeto con los ficheros de recursos
Input *input_; // Objeto pata gestionar la entrada
std::shared_ptr<Text> text_; // Objeto para escribir texto en pantalla
SDL_Texture *text_texture_; // Textura para dibujar el texto
SDL_Texture *cover_texture_; // Textura para cubrir el texto
std::shared_ptr<AnimatedSprite> sprite_; // Sprite para el brillo del corazón
// Variables
int counter_ = 0; // Contador
bool counter_enabled_ = true; // Indica si esta activo el contador
int sub_counter_ = 0; // Contador secundario
Uint32 ticks_ = 0; // Contador de ticks para ajustar la velocidad del programa
int counter_ = 0; // Contador
bool counter_enabled_ = true; // Indica si esta activo el contador
int sub_counter_ = 0; // Contador secundario
Uint32 ticks_ = 0; // Contador de ticks para ajustar la velocidad del programa
std::vector<Captions> texts_; // Vector con los textos
// Actualiza las variables