diff options
Diffstat (limited to 'resource-manager/resource_fabricator.cpp')
-rw-r--r-- | resource-manager/resource_fabricator.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/resource-manager/resource_fabricator.cpp b/resource-manager/resource_fabricator.cpp index 03e3f74..2b1f5f7 100644 --- a/resource-manager/resource_fabricator.cpp +++ b/resource-manager/resource_fabricator.cpp @@ -15,12 +15,8 @@ Resource* ResourceFactory::create_resource(const Constants::FILE_PATH &file_path std::string extension = std::filesystem::path(file_path).extension(); - - if( extension == Constants::PNG_EXT ) { - Image* img = new Image; - img->surface = IMG_Load(file_path.c_str()); - return img; + return new Image(file_path); } else if ( extension == Constants::OGG_EXT ){ return new Audio; |