aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/AssetManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe/api/AssetManager.cpp')
-rw-r--r--src/crepe/api/AssetManager.cpp25
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);
+ }
+}
+