summaryrefslogtreecommitdiff
path: root/src/resources/atlasmanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-08-25 15:36:23 +0300
committerAndrei Karas <akaras@inbox.ru>2013-08-25 15:36:23 +0300
commit735a20bc923d0a7bf4b0ca0e4d005413ca8de0f8 (patch)
tree6c8bd501bee54a9320206ed1792ead2b15743471 /src/resources/atlasmanager.cpp
parent2ed588669e77c3dc9d6cae36ee148cab3125b901 (diff)
downloadmanaverse-735a20bc923d0a7bf4b0ca0e4d005413ca8de0f8.tar.gz
manaverse-735a20bc923d0a7bf4b0ca0e4d005413ca8de0f8.tar.bz2
manaverse-735a20bc923d0a7bf4b0ca0e4d005413ca8de0f8.tar.xz
manaverse-735a20bc923d0a7bf4b0ca0e4d005413ca8de0f8.zip
add code for image creation/deletion.
Diffstat (limited to 'src/resources/atlasmanager.cpp')
-rw-r--r--src/resources/atlasmanager.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/resources/atlasmanager.cpp b/src/resources/atlasmanager.cpp
index a5d7c2ccc..01ea66233 100644
--- a/src/resources/atlasmanager.cpp
+++ b/src/resources/atlasmanager.cpp
@@ -123,6 +123,9 @@ void AtlasManager::loadImages(const StringVect &files,
if (image)
{
image->mIdPath = str;
+#ifdef DEBUG_IMAGES
+ logger->log("set name %p, %s", image, image->mIdPath.c_str());
+#endif
images.push_back(image);
}
}
@@ -268,6 +271,9 @@ void AtlasManager::convertAtlas(TextureAtlas *const atlas)
return;
image->mIdPath = atlas->name;
+#ifdef DEBUG_IMAGES
+ logger->log("set name %p, %s", image, image->mIdPath.c_str());
+#endif
image->incRef();
FOR_EACH (std::vector<AtlasItem*>::iterator, it, atlas->items)
@@ -282,6 +288,9 @@ void AtlasManager::convertAtlas(TextureAtlas *const atlas)
if (image2)
{
image2->mIdPath = item->name;
+#ifdef DEBUG_IMAGES
+ logger->log("set name %p, %s", image2, image2->mIdPath.c_str());
+#endif
image2->incRef();
}
}