summaryrefslogtreecommitdiff
path: root/src/resources/sdlimagehelper.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-08-26 16:09:58 +0300
committerAndrei Karas <akaras@inbox.ru>2013-08-26 16:52:08 +0300
commit929aeb1591e739588cd8cf629e7d7ac5a95261b1 (patch)
tree2b61b477d0e0ffed31a90ba2d6c019da926282aa /src/resources/sdlimagehelper.cpp
parentb661524e8b7b41cec237492ecd52fdda7b9be394 (diff)
downloadmv-929aeb1591e739588cd8cf629e7d7ac5a95261b1.tar.gz
mv-929aeb1591e739588cd8cf629e7d7ac5a95261b1.tar.bz2
mv-929aeb1591e739588cd8cf629e7d7ac5a95261b1.tar.xz
mv-929aeb1591e739588cd8cf629e7d7ac5a95261b1.zip
add surface allocation debug code.
Diffstat (limited to 'src/resources/sdlimagehelper.cpp')
-rw-r--r--src/resources/sdlimagehelper.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/resources/sdlimagehelper.cpp b/src/resources/sdlimagehelper.cpp
index 7a7de1906..cc5460fde 100644
--- a/src/resources/sdlimagehelper.cpp
+++ b/src/resources/sdlimagehelper.cpp
@@ -68,9 +68,9 @@ Image *SDLImageHelper::load(SDL_RWops *const rw, Dye const &dye) const
rgba.Amask = 0x000000FF;
#endif
- SDL_Surface *const surf = SDL_ConvertSurface(
+ SDL_Surface *const surf = MSDL_ConvertSurface(
tmpImage, &rgba, SDL_SWSURFACE);
- SDL_FreeSurface(tmpImage);
+ MSDL_FreeSurface(tmpImage);
uint32_t *pixels = static_cast<uint32_t *>(surf->pixels);
const int type = dye.getType();
@@ -100,7 +100,7 @@ Image *SDLImageHelper::load(SDL_RWops *const rw, Dye const &dye) const
}
Image *const image = load(surf);
- SDL_FreeSurface(surf);
+ MSDL_FreeSurface(surf);
return image;
}
@@ -183,7 +183,7 @@ SDL_Surface* SDLImageHelper::SDLDuplicateSurface(SDL_Surface *const tmpImage)
if (!tmpImage || !tmpImage->format)
return nullptr;
- return SDL_ConvertSurface(tmpImage, tmpImage->format, SDL_SWSURFACE);
+ return MSDL_ConvertSurface(tmpImage, tmpImage->format, SDL_SWSURFACE);
}
Image *SDLImageHelper::_SDLload(SDL_Surface *tmpImage) const
@@ -270,7 +270,7 @@ Image *SDLImageHelper::_SDLload(SDL_Surface *tmpImage) const
}
if (converted)
- SDL_FreeSurface(tmpImage);
+ MSDL_FreeSurface(tmpImage);
return new Image(image, hasAlpha, alphaChannel);
}
@@ -293,7 +293,7 @@ SDL_Surface *SDLImageHelper::create32BitSurface(int width, int height) const
const int amask = 0xff000000;
#endif
- return SDL_CreateRGBSurface(SDL_SWSURFACE,
+ return MSDL_CreateRGBSurface(SDL_SWSURFACE,
width, height, 32, rmask, gmask, bmask, amask);
}