1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

basic algorithm

This commit is contained in:
Laserlicht
2025-07-11 22:50:16 +02:00
parent 0d9fd09a6d
commit 7eae917497
8 changed files with 407 additions and 9 deletions

View File

@@ -25,6 +25,12 @@ SharedImageLocator::SharedImageLocator(const JsonNode & config, EImageBlitMode m
if(!config["defFile"].isNull())
defFile = AnimationPath::fromJson(config["defFile"]);
if(!config["generateShadow"].isNull())
generateShadow = static_cast<SharedImageLocator::ShadowMode>(config["generateShadow"].Integer());
if(!config["generateOverlay"].isNull())
generateOverlay = static_cast<SharedImageLocator::OverlayMode>(config["generateOverlay"].Integer());
}
SharedImageLocator::SharedImageLocator(const ImagePath & path, EImageBlitMode mode)
@@ -60,6 +66,10 @@ bool SharedImageLocator::operator < (const SharedImageLocator & other) const
return defFrame < other.defFrame;
if(layer != other.layer)
return layer < other.layer;
if(generateShadow != other.generateShadow)
return generateShadow < other.generateShadow;
if(generateOverlay != other.generateOverlay)
return generateOverlay < other.generateOverlay;
return false;
}