diff options
| author | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-11-16 15:26:54 +0100 | 
|---|---|---|
| committer | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-11-16 15:26:54 +0100 | 
| commit | 6b3feac981ce78144fb69e490640a4b07dd29f1d (patch) | |
| tree | 88c9a7b1b03ada97a8152591deb035681f99b7c8 /src/crepe/api/AssetManager.h | |
| parent | 8209678e20605936b2ce58331c1a65d8f23fee91 (diff) | |
| parent | 9f6475e7b0698c414138e2a8140b47f01ce9c5d1 (diff) | |
Merge branch 'master' of https://github.com/lonkaars/crepe into wouter/events
Diffstat (limited to 'src/crepe/api/AssetManager.h')
| -rw-r--r-- | src/crepe/api/AssetManager.h | 25 | 
1 files changed, 11 insertions, 14 deletions
| diff --git a/src/crepe/api/AssetManager.h b/src/crepe/api/AssetManager.h index 86a9902..fee6780 100644 --- a/src/crepe/api/AssetManager.h +++ b/src/crepe/api/AssetManager.h @@ -8,13 +8,12 @@  namespace crepe {  /** - * \brief The AssetManager is responsible for storing and managing assets over - * multiple scenes. + * \brief The AssetManager is responsible for storing and managing assets over multiple scenes.   *  - * The AssetManager ensures that assets are loaded once and can be accessed - * across different scenes. It caches assets to avoid reloading them every time - * a scene is loaded. Assets are retained in memory until the AssetManager is - * destroyed, at which point the cached assets are cleared. + * The AssetManager ensures that assets are loaded once and can be accessed across different + * scenes. It caches assets to avoid reloading them every time a scene is loaded. Assets are + * retained in memory until the AssetManager is destroyed, at which point the cached assets are + * cleared.   */  class AssetManager { @@ -44,20 +43,18 @@ public:  	 * \brief Caches an asset by loading it from the given file path.  	 *  	 * \param file_path The path to the asset file to load. -	 * \param reload If true, the asset will be reloaded from the file, even if -	 * it is already cached. +	 * \param reload If true, the asset will be reloaded from the file, even if 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.  	 *  -	 * 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 -	 * cache. +	 * 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 cache.  	 */  	template <typename T> -	std::shared_ptr<T> cache(const std::string & file_path, -							 bool reload = false); +	std::shared_ptr<T> cache(const std::string & file_path, bool reload = false);  };  } // namespace crepe |