diff options
author | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-10-22 12:15:03 +0200 |
---|---|---|
committer | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-10-22 12:15:03 +0200 |
commit | 9037aca03bfa4312794a6954752628381256f777 (patch) | |
tree | b5402ae6552ca84bb4cdf9a2f1507dc460a399ac /src/crepe/api/AssetManager.cpp | |
parent | 176ac90fce318334f1377d94d6e637e1eff84c3c (diff) |
merged further and changed to standard
Diffstat (limited to 'src/crepe/api/AssetManager.cpp')
-rw-r--r-- | src/crepe/api/AssetManager.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/crepe/api/AssetManager.cpp b/src/crepe/api/AssetManager.cpp new file mode 100644 index 0000000..0ecdae5 --- /dev/null +++ b/src/crepe/api/AssetManager.cpp @@ -0,0 +1,25 @@ + + +#include "resource_manager.h" +#include <string> +#include <unordered_map> + +using namespace crepe::api; + +ResourceManager& ResourceManager::get_instance(){ + static ResourceManager instance; + return instance; +} + + +ResourceManager::~ResourceManager(){ + m_resources.clear(); +} + + +void ResourceManager::Unload(const std::string& file_path){ + if(m_resources.find(file_path) != m_resources.end()){ + m_resources.erase(file_path); + } +} + |