convertit Asset i Audio

This commit is contained in:
2025-05-27 11:06:17 +02:00
parent 9bc07b2bcb
commit ada141cb09
29 changed files with 493 additions and 472 deletions

View File

@@ -5,27 +5,6 @@
#include <string> // Para allocator, string, char_traits, operator+
#include "utils.h" // Para getFileName
// [SINGLETON] Hay que definir las variables estáticas, desde el .h sólo la hemos declarado
Asset *Asset::asset_ = nullptr;
// [SINGLETON] Crearemos el objeto asset con esta función estática
void Asset::init(const std::string &executable_path)
{
Asset::asset_ = new Asset(executable_path);
}
// [SINGLETON] Destruiremos el objeto asset con esta función estática
void Asset::destroy()
{
delete Asset::asset_;
}
// [SINGLETON] Con este método obtenemos el objeto asset y podemos trabajar con él
Asset *Asset::get()
{
return Asset::asset_;
}
// Añade un elemento a la lista
void Asset::add(const std::string &file, AssetType type, bool required, bool absolute)
{