29 lines
1.0 KiB
C++
29 lines
1.0 KiB
C++
#pragma once
|
|
|
|
#include <memory>
|
|
|
|
#include "asset.hpp"
|
|
#include "resource_loader.hpp"
|
|
|
|
// Extensión de Asset que integra ResourceLoader
|
|
class AssetIntegrated : public Asset {
|
|
public:
|
|
// Inicializa Asset con ResourceLoader
|
|
static void initWithResourcePack(const std::string& executable_path,
|
|
const std::string& resource_pack_path = "resources.pack");
|
|
|
|
// Carga un archivo usando ResourceLoader como primera opción
|
|
static auto loadFile(const std::string& filename) -> std::vector<uint8_t>;
|
|
|
|
// Verifica si un archivo existe (pack o filesystem)
|
|
static auto fileExists(const std::string& filename) -> bool;
|
|
|
|
// Obtiene la ruta completa para archivos del sistema/config
|
|
static auto getSystemPath(const std::string& filename) -> std::string;
|
|
|
|
private:
|
|
static bool resource_pack_enabled;
|
|
|
|
// Determina si un archivo debe cargarse del pack o del filesystem
|
|
static auto shouldUseResourcePack(const std::string& filepath) -> bool;
|
|
}; |