diff options
author | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-09-30 10:56:13 +0200 |
---|---|---|
committer | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-09-30 10:56:13 +0200 |
commit | a08f5acf483d5371ccab70ba75c39ac6a5f96ce7 (patch) | |
tree | 433be57896814c82625066ff901b1c7bc951c951 /resource-manager/resource_fabricator.h | |
parent | a6f3b8c71513a1a7d416ec57627836ed4d9a7d94 (diff) |
changed resource manager based on feedback
Diffstat (limited to 'resource-manager/resource_fabricator.h')
-rw-r--r-- | resource-manager/resource_fabricator.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/resource-manager/resource_fabricator.h b/resource-manager/resource_fabricator.h index 2d46b00..cb6929f 100644 --- a/resource-manager/resource_fabricator.h +++ b/resource-manager/resource_fabricator.h @@ -2,12 +2,10 @@ -#include "Audio_asset.h" -#include "Image_asset.h" #include "resource.h" #include "constants.h" -#include "spritesheet.h" #include <SDL_render.h> +#include <string> @@ -20,9 +18,13 @@ public: template<typename T> static Resource* create_resource(const Constants::FILE_PATH& file_path){ - return new T(file_path); + + return new T(convert_file_to_string(file_path)); } +private: + static std::string convert_file_to_string(const std::string& path); + }; |