diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-14 18:04:03 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-14 18:04:03 +0100 |
commit | ab0b4923c4f49e7a28f6d17e994d3e013ca344bb (patch) | |
tree | b385693017be292b8f4862e88b912dba7c6be619 /src/crepe/api/ResourceManager.h | |
parent | 213f947d0907858cace470736c15f87caa934591 (diff) |
more WIP audio system + utilities
Diffstat (limited to 'src/crepe/api/ResourceManager.h')
-rw-r--r-- | src/crepe/api/ResourceManager.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/crepe/api/ResourceManager.h b/src/crepe/api/ResourceManager.h index a69a9fa..468af16 100644 --- a/src/crepe/api/ResourceManager.h +++ b/src/crepe/api/ResourceManager.h @@ -51,22 +51,23 @@ public: * it is already cached. * \tparam T The type of asset to cache (e.g., texture, sound, etc.). * - * \return A shared pointer to the cached asset. + * \return A reference to the resource * * This template function caches the asset at the given file path. If the - * asset is already cached and `reload` is false, the existing cached version - * will be returned. Otherwise, the asset will be reloaded and added to the + * asset is already cached, the existing instance will be returned. + * Otherwise, the concrete resource will be instantiated and added to the * cache. */ template <typename T> T & cache(const Asset & asset); - /** - * \brief Clear the resource cache - */ + //! Clear the resource cache void clear(); }; +template <> +Sound & ResourceManager::cache<Sound>(const Asset & asset); + } // namespace crepe #include "ResourceManager.hpp" |