diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-08-25 15:36:23 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-08-25 15:36:23 +0300 |
commit | 735a20bc923d0a7bf4b0ca0e4d005413ca8de0f8 (patch) | |
tree | 6c8bd501bee54a9320206ed1792ead2b15743471 /src/resources/image.cpp | |
parent | 2ed588669e77c3dc9d6cae36ee148cab3125b901 (diff) | |
download | manaplus-735a20bc923d0a7bf4b0ca0e4d005413ca8de0f8.tar.gz manaplus-735a20bc923d0a7bf4b0ca0e4d005413ca8de0f8.tar.bz2 manaplus-735a20bc923d0a7bf4b0ca0e4d005413ca8de0f8.tar.xz manaplus-735a20bc923d0a7bf4b0ca0e4d005413ca8de0f8.zip |
add code for image creation/deletion.
Diffstat (limited to 'src/resources/image.cpp')
-rw-r--r-- | src/resources/image.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/resources/image.cpp b/src/resources/image.cpp index 7f2fd6fbd..49650fef3 100644 --- a/src/resources/image.cpp +++ b/src/resources/image.cpp @@ -65,6 +65,10 @@ Image::Image(SDL_Surface *const image, const bool hasAlphaChannel0, mIsAlphaVisible(hasAlphaChannel0), mIsAlphaCalculated(false) { +#ifdef DEBUG_IMAGES + logger->log("created: %p", this); +#endif + mBounds.x = 0; mBounds.y = 0; @@ -102,6 +106,10 @@ Image::Image(const GLuint glimage, const int width, const int height, mIsAlphaVisible(true), mIsAlphaCalculated(false) { +#ifdef DEBUG_IMAGES + logger->log("created: %p", this); +#endif + mBounds.x = 0; mBounds.y = 0; mBounds.w = static_cast<uint16_t>(width); @@ -121,6 +129,9 @@ Image::Image(const GLuint glimage, const int width, const int height, Image::~Image() { +#ifdef DEBUG_IMAGES + logger->log("delete: %p, %s, %s", this, mIdPath.c_str(), mSource.c_str()); +#endif unload(); } |