diff options
Diffstat (limited to 'resource-manager/resource_fabricator.cpp')
-rw-r--r-- | resource-manager/resource_fabricator.cpp | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/resource-manager/resource_fabricator.cpp b/resource-manager/resource_fabricator.cpp index 2b1f5f7..36353e4 100644 --- a/resource-manager/resource_fabricator.cpp +++ b/resource-manager/resource_fabricator.cpp @@ -1,26 +1,4 @@ -#include <filesystem> -#include <string> - #include "resource_fabricator.h" -#include "resource.h" -#include "Image_asset.h" -#include "Audio_asset.h" - -#include <SDL2/SDL_image.h> - - -Resource* ResourceFactory::create_resource(const Constants::FILE_PATH &file_path){ - - std::string extension = std::filesystem::path(file_path).extension(); - - if( extension == Constants::PNG_EXT ) { - return new Image(file_path); - } - else if ( extension == Constants::OGG_EXT ){ - return new Audio; - } - return nullptr; -} |