Precàrrega de tots els recursos al inici del joc

8.000.000 de cherrypickings que he anat fent pel codi
This commit is contained in:
2024-10-20 11:06:10 +02:00
parent f23dcae5b6
commit a4b4e188cd
32 changed files with 532 additions and 364 deletions

View File

@@ -63,7 +63,7 @@ private:
SDL_Renderer *renderer_; // El renderizador de la ventana
std::shared_ptr<Texture> icon_texture_; // Textura para los iconos de las notificaciones
std::unique_ptr<Text> text_; // Objeto para dibujar texto
std::shared_ptr<Text> text_; // Objeto para dibujar texto
// Variables
Color bg_color_; // Color de fondo de las notificaciones
@@ -82,14 +82,14 @@ private:
// [SINGLETON] Ahora el constructor y el destructor son privados, para no poder crear objetos notifier desde fuera
// Constructor
Notifier(SDL_Renderer *renderer, std::string icon_file, std::string bitmap_file, std::string text_file, const std::string &sound_file);
Notifier(std::string icon_file, std::shared_ptr<Text> text, const std::string &sound_file);
// Destructor
~Notifier();
public:
// [SINGLETON] Crearemos el objeto notifier con esta función estática
static void init(SDL_Renderer *renderer, std::string icon_file, std::string bitmap_file, std::string text_file, const std::string &sound_file);
static void init(std::string icon_file, std::shared_ptr<Text> text, const std::string &sound_file);
// [SINGLETON] Destruiremos el objeto notifier con esta función estática
static void destroy();