diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-05-25 14:13:51 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-05-25 14:13:51 +0300 |
commit | e2f03241a1ba9d6b536b0b7a6f995e4e8d894408 (patch) | |
tree | 2bfd5cda7899a5793de62b5f47925a09eac320f5 /src/particle | |
parent | 59271755dc75f5de6c288308df92f687deaa32b4 (diff) | |
download | manaplus-e2f03241a1ba9d6b536b0b7a6f995e4e8d894408.tar.gz manaplus-e2f03241a1ba9d6b536b0b7a6f995e4e8d894408.tar.bz2 manaplus-e2f03241a1ba9d6b536b0b7a6f995e4e8d894408.tar.xz manaplus-e2f03241a1ba9d6b536b0b7a6f995e4e8d894408.zip |
Move images load function from resourcemanager into separate file.
Diffstat (limited to 'src/particle')
-rw-r--r-- | src/particle/particle.cpp | 4 | ||||
-rw-r--r-- | src/particle/particleemitter.cpp | 8 | ||||
-rw-r--r-- | src/particle/particleengine.cpp | 4 |
3 files changed, 9 insertions, 7 deletions
diff --git a/src/particle/particle.cpp b/src/particle/particle.cpp index 422dbe561..3c3a0b836 100644 --- a/src/particle/particle.cpp +++ b/src/particle/particle.cpp @@ -34,7 +34,7 @@ #include "resources/dye/dye.h" -#include "resources/resourcemanager/resourcemanager.h" +#include "resources/loaders/imageloader.h" #include "utils/delete2.h" #include "utils/dtor.h" @@ -440,7 +440,7 @@ Particle *Particle::addEffect(const std::string &restrict particleEffectFile, imageSrc = XmlChildContent(node); if (!imageSrc.empty() && !dyePalettes.empty()) Dye::instantiate(imageSrc, dyePalettes); - Image *const img = resourceManager->getImage(imageSrc); + Image *const img = ImageLoader::getImage(imageSrc); newParticle = new ImageParticle(img); newParticle->setMap(mMap); diff --git a/src/particle/particleemitter.cpp b/src/particle/particleemitter.cpp index 35a1a8ddb..fa0f45fc7 100644 --- a/src/particle/particleemitter.cpp +++ b/src/particle/particleemitter.cpp @@ -34,6 +34,8 @@ #include "resources/dye/dye.h" +#include "resources/loaders/imageloader.h" + #include "resources/resourcemanager/resourcemanager.h" #include "debug.h" @@ -119,7 +121,7 @@ ParticleEmitter::ParticleEmitter(const XmlNodePtrConst emitterNode, { if (!dyePalettes.empty()) Dye::instantiate(image, dyePalettes); - mParticleImage = resourceManager->getImage(image); + mParticleImage = ImageLoader::getImage(image); } } else if (name == "subimage") @@ -131,7 +133,7 @@ ParticleEmitter::ParticleEmitter(const XmlNodePtrConst emitterNode, { if (!dyePalettes.empty()) Dye::instantiate(image, dyePalettes); - Image *img = resourceManager->getImage(image); + Image *img = ImageLoader::getImage(image); if (img) { mParticleImage = resourceManager->getSubImage(img, @@ -370,7 +372,7 @@ ImageSet *ParticleEmitter::getImageSet(XmlNodePtrConst node) const int subX = XML::getProperty(node, "subX", -1); if (subX != -1) { - Image *const img = resourceManager->getImage(XML::getProperty( + Image *const img = ImageLoader::getImage(XML::getProperty( node, "imageset", "")); if (!img) return nullptr; diff --git a/src/particle/particleengine.cpp b/src/particle/particleengine.cpp index 81387a38b..bd05e967b 100644 --- a/src/particle/particleengine.cpp +++ b/src/particle/particleengine.cpp @@ -31,7 +31,7 @@ #include "resources/dye/dye.h" -#include "resources/resourcemanager/resourcemanager.h" +#include "resources/loaders/imageloader.h" #include "utils/dtor.h" @@ -176,7 +176,7 @@ Particle *ParticleEngine::addEffect(const std::string &restrict imageSrc = XmlChildContent(node); if (!imageSrc.empty() && !dyePalettes.empty()) Dye::instantiate(imageSrc, dyePalettes); - Image *const img = resourceManager->getImage(imageSrc); + Image *const img = ImageLoader::getImage(imageSrc); newParticle = new ImageParticle(img); newParticle->setMap(mMap); |