diff options
Diffstat (limited to 'src/util/asset_manager.h')
| -rw-r--r-- | src/util/asset_manager.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/util/asset_manager.h b/src/util/asset_manager.h index 1714c21..09483e5 100644 --- a/src/util/asset_manager.h +++ b/src/util/asset_manager.h @@ -5,12 +5,12 @@ #pragma once #include "asset_manager_dcl.h" +enum class AssetType : uint8_t { STATIC, PROC, PROC_GPU, MP3 }; + struct AssetRecord { const uint8_t* data; // Pointer to asset data (static or dynamic) size_t size; // Size of the asset data - bool is_procedural; // True if data was dynamically allocated by a procedural - // generator - bool is_gpu_procedural; // True if GPU compute shader generates texture + AssetType type; const char* proc_func_name_str; // Name of procedural generation function // (string literal) const float* proc_params; // Parameters for procedural generation (static, @@ -30,6 +30,9 @@ void DropAsset(AssetId asset_id, const uint8_t* asset); // found. AssetId GetAssetIdByName(const char* name); +// Returns the AssetType for a given asset id. +AssetType GetAssetType(AssetId asset_id); + #if !defined(STRIP_ALL) // Hot-reload: Parse and reload assets from config file (debug only) bool ReloadAssetsFromFile(const char* config_path); |
