From c18d789b35f29611c88d0e3bdbb5619500ea7a2a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 27 May 2016 21:37:03 +0300 Subject: Move spritedef load function from resourcemanager into separate file. --- src/resources/sprite/animatedsprite.cpp | 4 +++- src/resources/sprite/animationdelayload.cpp | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src/resources/sprite') diff --git a/src/resources/sprite/animatedsprite.cpp b/src/resources/sprite/animatedsprite.cpp index 6ada9c394..8a60de0f3 100644 --- a/src/resources/sprite/animatedsprite.cpp +++ b/src/resources/sprite/animatedsprite.cpp @@ -32,6 +32,8 @@ #include "resources/animation/animation.h" +#include "resources/loaders/spritedefloader.h" + #include "resources/resourcemanager/resourcemanager.h" #include "resources/sprite/animationdelayload.h" @@ -67,7 +69,7 @@ AnimatedSprite::AnimatedSprite(SpriteDef *restrict const sprite) : AnimatedSprite *AnimatedSprite::load(const std::string &restrict filename, const int variant) { - SpriteDef *restrict const s = resourceManager->getSprite( + SpriteDef *restrict const s = Loader::getSprite( filename, variant); if (!s) return nullptr; diff --git a/src/resources/sprite/animationdelayload.cpp b/src/resources/sprite/animationdelayload.cpp index fa33ff5f5..838dad42d 100644 --- a/src/resources/sprite/animationdelayload.cpp +++ b/src/resources/sprite/animationdelayload.cpp @@ -22,7 +22,7 @@ #include "const/resources/spriteaction.h" -#include "resources/resourcemanager/resourcemanager.h" +#include "resources/loaders/spritedefloader.h" #include "resources/sprite/animatedsprite.h" @@ -56,7 +56,7 @@ void AnimationDelayLoad::load() { if (mSprite) { - SpriteDef *const s = resourceManager->getSprite(mFileName, mVariant); + SpriteDef *const s = Loader::getSprite(mFileName, mVariant); if (!s) return; mSprite->setSprite(s); -- cgit v1.2.3-70-g09d2