diff options
author | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-09-25 13:07:13 +0200 |
---|---|---|
committer | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-09-25 13:07:13 +0200 |
commit | 35224c07549448e919a18a463e5dec81bbabf7c6 (patch) | |
tree | 6c9dea5b449625b057511f7f052842ab3cd1d7e8 /resource-manager/resource_manager.h | |
parent | 765485ced528ca2f4cf644a1503b9446c5826731 (diff) |
spritesheet and image changed
Diffstat (limited to 'resource-manager/resource_manager.h')
-rw-r--r-- | resource-manager/resource_manager.h | 15 |
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; - }; |