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/particleemitter.cpp | |
parent | 59271755dc75f5de6c288308df92f687deaa32b4 (diff) | |
download | mv-e2f03241a1ba9d6b536b0b7a6f995e4e8d894408.tar.gz mv-e2f03241a1ba9d6b536b0b7a6f995e4e8d894408.tar.bz2 mv-e2f03241a1ba9d6b536b0b7a6f995e4e8d894408.tar.xz mv-e2f03241a1ba9d6b536b0b7a6f995e4e8d894408.zip |
Move images load function from resourcemanager into separate file.
Diffstat (limited to 'src/particle/particleemitter.cpp')
-rw-r--r-- | src/particle/particleemitter.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
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; |