mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-15 01:24:45 +02:00
Added RenderHandler that acts as factory for images and animations
This commit is contained in:
@ -16,6 +16,7 @@
|
||||
#include "CreatureAnimation.h"
|
||||
|
||||
#include "../render/Canvas.h"
|
||||
#include "../render/IRenderHandler.h"
|
||||
#include "../gui/CGuiHandler.h"
|
||||
#include "../CGameInfo.h"
|
||||
|
||||
@ -190,7 +191,7 @@ void BattleProjectileController::initStackProjectile(const CStack * stack)
|
||||
|
||||
std::shared_ptr<CAnimation> BattleProjectileController::createProjectileImage(const AnimationPath & path )
|
||||
{
|
||||
std::shared_ptr<CAnimation> projectile = std::make_shared<CAnimation>(path);
|
||||
std::shared_ptr<CAnimation> projectile = GH.renderHandler().loadAnimation(path);
|
||||
projectile->preload();
|
||||
|
||||
if(projectile->size(1) != 0)
|
||||
|
Reference in New Issue
Block a user