aboutsummaryrefslogtreecommitdiff
path: root/resource-manager/Image_asset.cpp
blob: 10b35f87a7f75ff34629d396768c5ae2a8cb49df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "Image_asset.h"
#include "spritesheet.h"
#include <SDL2/SDL_surface.h>
#include <SDL_image.h>
#include <string>


Image::Image(const std::string& path){
	surface = IMG_Load(path.c_str());
}


Image::~Image(){
	SDL_FreeSurface(surface);
}

SDL_Surface* Image::getSurface() const {
	return surface;
}