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

@@ -26,7 +26,7 @@ struct TextFile
};
// Llena una estructuta TextFile desde un fichero
TextFile LoadTextFile(std::string file);
std::shared_ptr<TextFile> loadTextFile(const std::string &file_path);
// Clase texto. Pinta texto en pantalla a partir de un bitmap
class Text
@@ -45,8 +45,8 @@ private:
public:
// Constructor
Text(const std::string &bitmap_file, const std::string &text_file, SDL_Renderer *renderer);
Text(const std::string &text_file, std::shared_ptr<Texture> texture);
Text(TextFile *text_file, std::shared_ptr<Texture> texture);
Text(std::shared_ptr<Texture> texture, const std::string &text_file);
Text(std::shared_ptr<Texture> texture, std::shared_ptr<TextFile> text_file);
// Destructor
~Text() = default;