From ef44da3f5e9ca533782da5e185e69e28c295d226 Mon Sep 17 00:00:00 2001 From: heavydemon21 Date: Tue, 1 Oct 2024 19:53:56 +0200 Subject: Added resources to crepe --- src/crepe/api/resource_manager.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/crepe/api/resource_manager.cpp (limited to 'src/crepe/api/resource_manager.cpp') diff --git a/src/crepe/api/resource_manager.cpp b/src/crepe/api/resource_manager.cpp new file mode 100644 index 0000000..a5644ee --- /dev/null +++ b/src/crepe/api/resource_manager.cpp @@ -0,0 +1,25 @@ + + +#include "resource_manager.h" +#include +#include + +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); + } +} + -- cgit v1.2.3