aboutsummaryrefslogtreecommitdiff
path: root/resource-manager/resource_fabricator.cpp
diff options
context:
space:
mode:
authorheavydemon21 <nielsstunnebrink1@gmail.com>2024-09-22 10:58:21 +0200
committerheavydemon21 <nielsstunnebrink1@gmail.com>2024-09-22 10:58:21 +0200
commit765485ced528ca2f4cf644a1503b9446c5826731 (patch)
treee9d35c04a8768afb38873daa31d1b47a3da93e54 /resource-manager/resource_fabricator.cpp
parent507a97739726feb74ffa91e317ead1773183ccbf (diff)
spritesheet werkt
Diffstat (limited to 'resource-manager/resource_fabricator.cpp')
-rw-r--r--resource-manager/resource_fabricator.cpp6
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;