1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

Use cache for CAnimImage. Improves performance of CAnimImage

This commit is contained in:
Ivan Savenko
2024-04-17 18:19:04 +03:00
parent 49a28355a9
commit 7d93206786

View File

@@ -19,6 +19,7 @@
#include "../render/CAnimation.h"
#include "../render/Canvas.h"
#include "../render/ColorFilter.h"
#include "../render/Graphics.h"
#include "../battle/BattleInterface.h"
#include "../battle/BattleInterfaceClasses.h"
@@ -177,7 +178,7 @@ CAnimImage::CAnimImage(const AnimationPath & name, size_t Frame, size_t Group, i
{
pos.x += x;
pos.y += y;
anim = GH.renderHandler().loadAnimation(name);
anim = graphics->getAnimation(name);
init();
}