1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-05 00:49:09 +02:00

animations working

This commit is contained in:
Laserlicht
2024-11-30 15:44:09 +01:00
parent 3967c70bf2
commit 6795c9afb6
5 changed files with 24 additions and 15 deletions

View File

@ -18,11 +18,12 @@
#include "../../lib/filesystem/Filesystem.h"
#include "../../lib/json/JsonUtils.h"
bool CAnimation::loadFrame(size_t frame, size_t group)
bool CAnimation::loadFrame(size_t frame, size_t group, bool verbose)
{
if(size(group) <= frame)
{
printError(frame, group, "LoadFrame");
if(verbose)
printError(frame, group, "LoadFrame");
return false;
}
@ -119,7 +120,7 @@ void CAnimation::duplicateImage(const size_t sourceGroup, const size_t sourceFra
std::shared_ptr<IImage> CAnimation::getImage(size_t frame, size_t group, bool verbose)
{
if (!loadFrame(frame, group))
if (!loadFrame(frame, group, verbose))
return nullptr;
return getImageImpl(frame, group, verbose);
}