diff options
Diffstat (limited to 'src/resources/image.cpp')
-rw-r--r-- | src/resources/image.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/resources/image.cpp b/src/resources/image.cpp index d94967631..9e9124ab6 100644 --- a/src/resources/image.cpp +++ b/src/resources/image.cpp @@ -119,10 +119,8 @@ Image::~Image() unload(); } -Resource *Image::load(void *buffer, unsigned bufferSize) +Resource *Image::load(SDL_RWops *rw) { - // Load the raw file data from the buffer in an RWops structure - SDL_RWops *rw = SDL_RWFromMem(buffer, bufferSize); SDL_Surface *tmpImage = IMG_Load_RW(rw, 1); if (!tmpImage) @@ -137,9 +135,8 @@ Resource *Image::load(void *buffer, unsigned bufferSize) return image; } -Resource *Image::load(void *buffer, unsigned bufferSize, Dye const &dye) +Resource *Image::load(SDL_RWops *rw, Dye const &dye) { - SDL_RWops *rw = SDL_RWFromMem(buffer, bufferSize); SDL_Surface *tmpImage = IMG_Load_RW(rw, 1); if (!tmpImage) |