aboutsummaryrefslogtreecommitdiff
path: root/resource-manager/resource_manager.h
diff options
context:
space:
mode:
Diffstat (limited to 'resource-manager/resource_manager.h')
-rw-r--r--resource-manager/resource_manager.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/resource-manager/resource_manager.h b/resource-manager/resource_manager.h
index fd6657c..5570313 100644
--- a/resource-manager/resource_manager.h
+++ b/resource-manager/resource_manager.h
@@ -2,8 +2,7 @@
-#include <algorithm>
-#include <string>
+#include <SDL_render.h>
#include <unordered_map>
@@ -11,6 +10,15 @@
#include "constants.h"
#include "resource_fabricator.h"
+
+enum class asset_type{
+ TEXTURE,
+ SPRITESHEET,
+ AUDIO,
+ MAP,
+ UNKNOWN,
+};
+
using namespace crepe;
@@ -29,7 +37,7 @@ public:
return static_cast<T*>(m_resources[file_path]);
}
- Resource* resource = ResourceFactory::create_resource(file_path);
+ Resource* resource = ResourceFactory::create_resource<T>(file_path);
if (resource) {
m_resources[file_path] = std::move(resource);
}
@@ -42,5 +50,4 @@ private:
std::unordered_map<Constants::FILE_PATH, Resource*> m_resources;
-
};