1
0
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:
Ivan Savenko
2023-09-04 18:01:44 +03:00
parent 3f921fa771
commit 1d0e696db6
38 changed files with 246 additions and 126 deletions

View File

@ -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)