corregida la llista de inicialització en clang-format

creat Balloon::Config per a inicialitzar globos
This commit is contained in:
2025-08-24 17:16:49 +02:00
parent fe950e6f17
commit 928335576c
61 changed files with 964 additions and 733 deletions

View File

@@ -1,37 +1,38 @@
#ifndef RESOURCE_LOADER_H
#define RESOURCE_LOADER_H
#include "resource_pack.h"
#include <memory>
#include "resource_pack.h"
class ResourceLoader {
private:
static std::unique_ptr<ResourceLoader> instance;
ResourcePack* resourcePack;
std::string packPath;
bool fallbackToFiles;
private:
static std::unique_ptr<ResourceLoader> instance;
ResourcePack* resourcePack;
std::string packPath;
bool fallbackToFiles;
ResourceLoader();
ResourceLoader();
public:
static ResourceLoader& getInstance();
~ResourceLoader();
bool initialize(const std::string& packFile, bool enableFallback = true);
void shutdown();
std::vector<uint8_t> loadResource(const std::string& filename);
bool resourceExists(const std::string& filename);
void setFallbackToFiles(bool enable) { fallbackToFiles = enable; }
bool getFallbackToFiles() const { return fallbackToFiles; }
size_t getLoadedResourceCount() const;
std::vector<std::string> getAvailableResources() const;
public:
static ResourceLoader& getInstance();
~ResourceLoader();
private:
std::vector<uint8_t> loadFromFile(const std::string& filename);
std::string getDataPath(const std::string& filename);
bool initialize(const std::string& packFile, bool enableFallback = true);
void shutdown();
std::vector<uint8_t> loadResource(const std::string& filename);
bool resourceExists(const std::string& filename);
void setFallbackToFiles(bool enable) { fallbackToFiles = enable; }
bool getFallbackToFiles() const { return fallbackToFiles; }
size_t getLoadedResourceCount() const;
std::vector<std::string> getAvailableResources() const;
private:
std::vector<uint8_t> loadFromFile(const std::string& filename);
std::string getDataPath(const std::string& filename);
};
#endif