summaryrefslogtreecommitdiff
path: root/src/resources/atlas
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-04-07 02:48:12 +0300
committerAndrei Karas <akaras@inbox.ru>2017-04-08 16:46:28 +0300
commit27a2dd4fce2d529cd1d96aa5ddce1e74b4f54a2f (patch)
treec2c38e1b4f308ca885dc3c3581560cfbc6833a8e /src/resources/atlas
parentd4e28aa97cbce34a0053d3c02cf070ef9065439f (diff)
downloadmanaverse-27a2dd4fce2d529cd1d96aa5ddce1e74b4f54a2f.tar.gz
manaverse-27a2dd4fce2d529cd1d96aa5ddce1e74b4f54a2f.tar.bz2
manaverse-27a2dd4fce2d529cd1d96aa5ddce1e74b4f54a2f.tar.xz
manaverse-27a2dd4fce2d529cd1d96aa5ddce1e74b4f54a2f.zip
Move resourcemanager from class to namespace.
Diffstat (limited to 'src/resources/atlas')
-rw-r--r--src/resources/atlas/atlasmanager.cpp16
-rw-r--r--src/resources/atlas/atlasresource.cpp2
2 files changed, 9 insertions, 9 deletions
diff --git a/src/resources/atlas/atlasmanager.cpp b/src/resources/atlas/atlasmanager.cpp
index b9107a757..91749e597 100644
--- a/src/resources/atlas/atlasmanager.cpp
+++ b/src/resources/atlas/atlasmanager.cpp
@@ -132,12 +132,12 @@ void AtlasManager::loadImages(const StringVect &files,
const std::string str = *it;
// check is image with same name already in cache
// and if yes, move it to deleted set
- Resource *const res = resourceManager->getTempResource(str);
+ Resource *const res = ResourceManager::getTempResource(str);
if (res)
{
// increase counter because in moveToDeleted it will be decreased.
res->incRef();
- resourceManager->moveToDeleted(res);
+ ResourceManager::moveToDeleted(res);
}
std::string path = str;
@@ -181,12 +181,12 @@ void AtlasManager::loadEmptyImages(const StringVect &files,
const std::string str = *it;
// check is image with same name already in cache
// and if yes, move it to deleted set
- Resource *const res = resourceManager->getTempResource(str);
+ Resource *const res = ResourceManager::getTempResource(str);
if (res)
{
// increase counter because in moveToDeleted it will be decreased.
res->incRef();
- resourceManager->moveToDeleted(res);
+ ResourceManager::moveToDeleted(res);
}
Image *const image = new Image(0,
@@ -395,14 +395,14 @@ void AtlasManager::injectToResources(const AtlasResource *const resource)
{
Image *const image = atlas->atlasImage;
if (image)
- resourceManager->addResource(atlas->name, image);
+ ResourceManager::addResource(atlas->name, image);
FOR_EACH (std::vector<AtlasItem*>::iterator, it2, atlas->items)
{
AtlasItem *const item = *it2;
if (!item)
continue;
// add each atlas sub image to resources
- resourceManager->addResource(item->name, item->image);
+ ResourceManager::addResource(item->name, item->image);
}
}
}
@@ -422,7 +422,7 @@ void AtlasManager::moveToDeleted(AtlasResource *const resource)
if (image)
{
// move each atlas image to deleted
- resourceManager->moveToDeleted(image);
+ ResourceManager::moveToDeleted(image);
}
FOR_EACH (std::vector<AtlasItem*>::iterator, it2, atlas->items)
{
@@ -433,7 +433,7 @@ void AtlasManager::moveToDeleted(AtlasResource *const resource)
if (image2)
{
// move each atlas sub image to deleted
- resourceManager->moveToDeleted(image2);
+ ResourceManager::moveToDeleted(image2);
}
}
}
diff --git a/src/resources/atlas/atlasresource.cpp b/src/resources/atlas/atlasresource.cpp
index 5f2a3d3c7..06ae62542 100644
--- a/src/resources/atlas/atlasresource.cpp
+++ b/src/resources/atlas/atlasresource.cpp
@@ -53,7 +53,7 @@ AtlasResource::~AtlasResource()
delete atlas;
}
}
- resourceManager->clearDeleted(false);
+ ResourceManager::clearDeleted(false);
}
void AtlasResource::incRef()