aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/resource_manager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe/api/resource_manager.cpp')
-rw-r--r--src/crepe/api/resource_manager.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/crepe/api/resource_manager.cpp b/src/crepe/api/resource_manager.cpp
new file mode 100644
index 0000000..0ecdae5
--- /dev/null
+++ b/src/crepe/api/resource_manager.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);
+ }
+}
+