clang-format
This commit is contained in:
@@ -28,15 +28,15 @@ struct JA_Sound_t; // lines 12-12
|
||||
|
||||
// Helper para cargar archivos de audio desde pack o filesystem en memoria
|
||||
namespace {
|
||||
struct AudioData {
|
||||
struct AudioData {
|
||||
std::vector<uint8_t> data;
|
||||
std::string filepath;
|
||||
};
|
||||
};
|
||||
|
||||
auto loadAudioData(const std::string& file_path) -> AudioData {
|
||||
auto resource_data = ResourceHelper::loadFile(file_path);
|
||||
return AudioData{.data = std::move(resource_data), .filepath = file_path};
|
||||
}
|
||||
auto loadAudioData(const std::string& file_path) -> AudioData {
|
||||
auto resource_data = ResourceHelper::loadFile(file_path);
|
||||
return AudioData{.data = std::move(resource_data), .filepath = file_path};
|
||||
}
|
||||
} // namespace
|
||||
|
||||
// Declaraciones de funciones que necesitas implementar en otros archivos
|
||||
@@ -371,9 +371,9 @@ auto Resource::loadTextLazy(const std::string& name) -> std::shared_ptr<Text> {
|
||||
|
||||
// Mapeo de objetos de texto a sus recursos
|
||||
struct TextMapping {
|
||||
std::string key;
|
||||
std::string texture_file;
|
||||
std::string text_file;
|
||||
std::string key;
|
||||
std::string texture_file;
|
||||
std::string text_file;
|
||||
};
|
||||
|
||||
const std::vector<TextMapping> TEXT_MAPPINGS = {
|
||||
@@ -573,9 +573,9 @@ void Resource::createPlayerTextures() {
|
||||
|
||||
// Configuración de jugadores y sus paletas
|
||||
struct PlayerConfig {
|
||||
std::string base_texture;
|
||||
std::vector<std::string> palette_files;
|
||||
std::string name_prefix;
|
||||
std::string base_texture;
|
||||
std::vector<std::string> palette_files;
|
||||
std::string name_prefix;
|
||||
};
|
||||
|
||||
std::vector<PlayerConfig> players = {
|
||||
@@ -649,12 +649,12 @@ void Resource::createPlayerTextures() {
|
||||
// Crea texturas a partir de textos para mostrar puntuaciones y mensajes
|
||||
void Resource::createTextTextures() {
|
||||
struct NameAndText {
|
||||
std::string name;
|
||||
std::string text;
|
||||
std::string name;
|
||||
std::string text;
|
||||
|
||||
NameAndText(std::string name_init, std::string text_init)
|
||||
: name(std::move(name_init)),
|
||||
text(std::move(text_init)) {}
|
||||
NameAndText(std::string name_init, std::string text_init)
|
||||
: name(std::move(name_init)),
|
||||
text(std::move(text_init)) {}
|
||||
};
|
||||
|
||||
Logger::cr();
|
||||
@@ -695,16 +695,16 @@ void Resource::createTextTextures() {
|
||||
// Crea los objetos de texto a partir de los archivos de textura y texto
|
||||
void Resource::createText() {
|
||||
struct ResourceInfo {
|
||||
std::string key;
|
||||
std::string texture_file;
|
||||
std::string text_file;
|
||||
std::string white_texture_file; // Textura blanca opcional
|
||||
std::string key;
|
||||
std::string texture_file;
|
||||
std::string text_file;
|
||||
std::string white_texture_file; // Textura blanca opcional
|
||||
|
||||
ResourceInfo(std::string k, std::string t_file, std::string txt_file, std::string w_file = "")
|
||||
: key(std::move(k)),
|
||||
texture_file(std::move(t_file)),
|
||||
text_file(std::move(txt_file)),
|
||||
white_texture_file(std::move(w_file)) {}
|
||||
ResourceInfo(std::string k, std::string t_file, std::string txt_file, std::string w_file = "")
|
||||
: key(std::move(k)),
|
||||
texture_file(std::move(t_file)),
|
||||
text_file(std::move(txt_file)),
|
||||
white_texture_file(std::move(w_file)) {}
|
||||
};
|
||||
|
||||
Logger::cr();
|
||||
|
||||
Reference in New Issue
Block a user