Browse Source

Use cache for CAnimImage. Improves performance of CAnimImage

Ivan Savenko 1 year ago
parent
commit
7d93206786
1 changed files with 2 additions and 1 deletions
  1. 2 1
      client/widgets/Images.cpp

+ 2 - 1
client/widgets/Images.cpp

@@ -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();
 }