corregida la llista de inicialització en clang-format
creat Balloon::Config per a inicialitzar globos
This commit is contained in:
@@ -52,7 +52,8 @@ class Resource {
|
||||
JA_Sound_t *sound; // Objeto con el sonido
|
||||
|
||||
ResourceSound(std::string name, JA_Sound_t *sound = nullptr)
|
||||
: name(std::move(name)), sound(sound) {}
|
||||
: name(std::move(name)),
|
||||
sound(sound) {}
|
||||
};
|
||||
|
||||
struct ResourceMusic {
|
||||
@@ -60,7 +61,8 @@ class Resource {
|
||||
JA_Music_t *music; // Objeto con la música
|
||||
|
||||
ResourceMusic(std::string name, JA_Music_t *music = nullptr)
|
||||
: name(std::move(name)), music(music) {}
|
||||
: name(std::move(name)),
|
||||
music(music) {}
|
||||
};
|
||||
|
||||
struct ResourceTexture {
|
||||
@@ -68,7 +70,8 @@ class Resource {
|
||||
std::shared_ptr<Texture> texture; // Objeto con la textura
|
||||
|
||||
ResourceTexture(std::string name, std::shared_ptr<Texture> texture = nullptr)
|
||||
: name(std::move(name)), texture(std::move(texture)) {}
|
||||
: name(std::move(name)),
|
||||
texture(std::move(texture)) {}
|
||||
};
|
||||
|
||||
struct ResourceTextFile {
|
||||
@@ -76,7 +79,8 @@ class Resource {
|
||||
std::shared_ptr<Text::File> text_file; // Objeto con los descriptores de la fuente de texto
|
||||
|
||||
ResourceTextFile(std::string name, std::shared_ptr<Text::File> text_file = nullptr)
|
||||
: name(std::move(name)), text_file(std::move(text_file)) {}
|
||||
: name(std::move(name)),
|
||||
text_file(std::move(text_file)) {}
|
||||
};
|
||||
|
||||
struct ResourceText {
|
||||
@@ -84,7 +88,8 @@ class Resource {
|
||||
std::shared_ptr<Text> text; // Objeto de texto
|
||||
|
||||
ResourceText(std::string name, std::shared_ptr<Text> text = nullptr)
|
||||
: name(std::move(name)), text(std::move(text)) {}
|
||||
: name(std::move(name)),
|
||||
text(std::move(text)) {}
|
||||
};
|
||||
|
||||
struct ResourceAnimation {
|
||||
@@ -92,7 +97,8 @@ class Resource {
|
||||
AnimationsFileBuffer animation; // Objeto con las animaciones
|
||||
|
||||
ResourceAnimation(std::string name, AnimationsFileBuffer animation = {})
|
||||
: name(std::move(name)), animation(std::move(animation)) {}
|
||||
: name(std::move(name)),
|
||||
animation(std::move(animation)) {}
|
||||
};
|
||||
|
||||
// --- Estructura para el progreso de carga ---
|
||||
@@ -100,8 +106,12 @@ class Resource {
|
||||
size_t total; // Número total de recursos
|
||||
size_t loaded; // Número de recursos cargados
|
||||
|
||||
ResourceCount() : total(0), loaded(0) {}
|
||||
ResourceCount(size_t total) : total(total), loaded(0) {}
|
||||
ResourceCount()
|
||||
: total(0),
|
||||
loaded(0) {}
|
||||
ResourceCount(size_t total)
|
||||
: total(total),
|
||||
loaded(0) {}
|
||||
|
||||
void add(size_t amount) { loaded += amount; }
|
||||
void increase() { loaded++; }
|
||||
@@ -128,7 +138,7 @@ class Resource {
|
||||
std::string loading_resource_name_; // Nombre del recurso que se está cargando
|
||||
SDL_FRect loading_wired_rect_;
|
||||
SDL_FRect loading_full_rect_;
|
||||
|
||||
|
||||
// --- Archivos temporales ---
|
||||
std::vector<std::string> temp_audio_files_; // Rutas de archivos temporales de audio para limpieza
|
||||
|
||||
|
||||
Reference in New Issue
Block a user