31 lines
927 B
C++
31 lines
927 B
C++
// resource_helper.hpp - Funciones de ajuda per gestió de recursos
|
|
// © 2026 JailDesigner
|
|
// API simplificada i normalització de rutes
|
|
|
|
#pragma once
|
|
|
|
#include <cstdint>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
namespace Resource::Helper {
|
|
|
|
// Inicialización del sistema
|
|
auto initializeResourceSystem(const std::string& pack_file, bool fallback) -> bool;
|
|
|
|
// Càrrega de archivos
|
|
auto loadFile(const std::string& filepath) -> std::vector<uint8_t>;
|
|
auto fileExists(const std::string& filepath) -> bool;
|
|
|
|
// Llistat de recursos disponibles amb un prefix (ex. "shapes/", "sounds/").
|
|
auto listResources(const std::string& prefix) -> std::vector<std::string>;
|
|
|
|
// Normalització de rutes
|
|
auto getPackPath(const std::string& asset_path) -> std::string;
|
|
auto normalizePath(const std::string& path) -> std::string;
|
|
|
|
// Estat
|
|
auto isPackLoaded() -> bool;
|
|
|
|
} // namespace Resource::Helper
|