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_fabricator.cpp | |
parent | 765485ced528ca2f4cf644a1503b9446c5826731 (diff) |
spritesheet and image changed
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; -} |