commit de acabar la jornada laboral

This commit is contained in:
2024-10-17 13:57:41 +02:00
parent db884cb422
commit 59de566c5b
24 changed files with 78 additions and 274 deletions

View File

@@ -59,9 +59,7 @@ std::string Asset::get(const std::string &text) const
}
}
#ifdef VERBOSE
std::cout << "Warning: file " << text.c_str() << " not found" << std::endl;
#endif
return "";
}
@@ -70,12 +68,10 @@ bool Asset::check() const
{
bool success = true;
#ifdef VERBOSE
std::cout << "\n** Checking files" << std::endl;
std::cout << "Executable path is: " << executable_path_ << std::endl;
std::cout << "Sample filepath: " << file_list_.back().file << std::endl;
#endif
// Comprueba la lista de ficheros clasificandolos por tipo
for (int type = 0; type < static_cast<int>(AssetType::MAX_ASSET_TYPE); ++type)
@@ -94,9 +90,7 @@ bool Asset::check() const
// Si hay ficheros de ese tipo, comprueba si existen
if (any)
{
#ifdef VERBOSE
std::cout << "\n>> " << getTypeName(static_cast<AssetType>(type)).c_str() << " FILES" << std::endl;
#endif
for (const auto &f : file_list_)
{
@@ -108,10 +102,8 @@ bool Asset::check() const
}
}
// Resultado
#ifdef VERBOSE
// Resultado
std::cout << (success ? "\n** All files OK.\n" : "\n** A file is missing. Exiting.\n") << std::endl;
#endif
return success;
}
@@ -130,7 +122,6 @@ bool Asset::checkFile(const std::string &path) const
SDL_RWclose(file);
}
#ifdef VERBOSE
const std::string file_name = path.substr(path.find_last_of("\\/") + 1);
std::cout.setf(std::ios::left, std::ios::adjustfield);
std::cout << "Checking file: ";
@@ -138,7 +129,6 @@ bool Asset::checkFile(const std::string &path) const
std::cout.fill('.');
std::cout << file_name;
std::cout << (success ? " [OK]" : " [ERROR]") << std::endl;
#endif
return success;
}