renombrades extensions .h a .hpp
This commit is contained in:
29
source/asset_integrated.hpp
Normal file
29
source/asset_integrated.hpp
Normal file
@@ -0,0 +1,29 @@
|
||||
#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
|
||||
std::vector<uint8_t> loadFile(const std::string& filename);
|
||||
|
||||
// Verifica si un archivo existe (pack o filesystem)
|
||||
bool fileExists(const std::string& filename) const;
|
||||
|
||||
// Obtiene la ruta completa para archivos del sistema/config
|
||||
std::string getSystemPath(const std::string& filename) const;
|
||||
|
||||
private:
|
||||
static bool resource_pack_enabled_;
|
||||
|
||||
// Determina si un archivo debe cargarse del pack o del filesystem
|
||||
bool shouldUseResourcePack(const std::string& filepath) const;
|
||||
};
|
||||
Reference in New Issue
Block a user